Bug 57851 (Song)

Summary: a mistake about macro definition of FIB_TABLE_HASHSZ
Product: Networking Reporter: Song Yang (nosongyang)
Component: OtherAssignee: Stephen Hemminger (stephen)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.5 Subsystem:
Regression: No Bisected commit-id:

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