Bug 57851 (Song) - a mistake about macro definition of FIB_TABLE_HASHSZ
Summary: a mistake about macro definition of FIB_TABLE_HASHSZ
Status: RESOLVED CODE_FIX
Alias: Song
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-09 10:24 UTC by Song Yang
Modified: 2013-05-10 19:30 UTC (History)
0 users

See Also:
Kernel Version: 3.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Song Yang 2013-05-09 10:24:01 UTC
#ifdef CONFIG_IP_ROUTE_MULTIPATH

#define FIB_RES_NH(res)          ((res).fi->fib_nh[(res).nh_sel])

#define FIB_TABLE_HASHSZ 2

#else /* CONFIG_IP_ROUTE_MULTIPATH */

#define FIB_RES_NH(res)          ((res).fi->fib_nh[0])

#define FIB_TABLE_HASHSZ 256

#endif /* CONFIG_IP_ROUTE_MULTIPATH */

There is a confuse macro definition about the FIB_TABLE_HASHSZ. This mistake can generate an error, but will affect performance.
Comment 1 Stephen Hemminger 2013-05-10 19:30:57 UTC
This has been fixed for nearly 2 months:

commit 5b9e12dbf92b441b37136ea71dac59f05f2673a9
Author: Denis V. Lunev <den@openvz.org>
Date:   Wed Mar 13 00:24:15 2013 +0000

    ipv4: fix definition of FIB_TABLE_HASHSZ

Note You need to log in before you can comment on or make changes to this bug.