]>
Commit | Line | Data |
---|---|---|
d6e9c606 GKH |
1 | From 0e7e63e4b65a06692d85f68a4111f7610e184eba Mon Sep 17 00:00:00 2001 |
2 | From: "Denis V. Lunev" <den@openvz.org> | |
3 | Date: Wed, 13 Mar 2013 00:24:15 +0000 | |
4 | Subject: ipv4: fix definition of FIB_TABLE_HASHSZ | |
5 | ||
6 | ||
7 | From: "Denis V. Lunev" <den@openvz.org> | |
8 | ||
9 | [ Upstream commit 5b9e12dbf92b441b37136ea71dac59f05f2673a9 ] | |
10 | ||
11 | a long time ago by the commit | |
12 | ||
13 | commit 93456b6d7753def8760b423ac6b986eb9d5a4a95 | |
14 | Author: Denis V. Lunev <den@openvz.org> | |
15 | Date: Thu Jan 10 03:23:38 2008 -0800 | |
16 | ||
17 | [IPV4]: Unify access to the routing tables. | |
18 | ||
19 | the defenition of FIB_HASH_TABLE size has obtained wrong dependency: | |
20 | it should depend upon CONFIG_IP_MULTIPLE_TABLES (as was in the original | |
21 | code) but it was depended from CONFIG_IP_ROUTE_MULTIPATH | |
22 | ||
23 | This patch returns the situation to the original state. | |
24 | ||
25 | The problem was spotted by Tingwei Liu. | |
26 | ||
27 | Signed-off-by: Denis V. Lunev <den@openvz.org> | |
28 | CC: Tingwei Liu <tingw.liu@gmail.com> | |
29 | CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> | |
30 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
31 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
32 | --- | |
33 | include/net/ip_fib.h | 12 +++++------- | |
34 | 1 file changed, 5 insertions(+), 7 deletions(-) | |
35 | ||
36 | --- a/include/net/ip_fib.h | |
37 | +++ b/include/net/ip_fib.h | |
38 | @@ -152,18 +152,16 @@ struct fib_result_nl { | |
39 | }; | |
40 | ||
41 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | |
42 | - | |
43 | #define FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel]) | |
44 | - | |
45 | -#define FIB_TABLE_HASHSZ 2 | |
46 | - | |
47 | #else /* CONFIG_IP_ROUTE_MULTIPATH */ | |
48 | - | |
49 | #define FIB_RES_NH(res) ((res).fi->fib_nh[0]) | |
50 | +#endif /* CONFIG_IP_ROUTE_MULTIPATH */ | |
51 | ||
52 | +#ifdef CONFIG_IP_MULTIPLE_TABLES | |
53 | #define FIB_TABLE_HASHSZ 256 | |
54 | - | |
55 | -#endif /* CONFIG_IP_ROUTE_MULTIPATH */ | |
56 | +#else | |
57 | +#define FIB_TABLE_HASHSZ 2 | |
58 | +#endif | |
59 | ||
60 | extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); | |
61 |