* [PATCH v2 1/1] ipv4: fix definition of FIB_TABLE_HASHSZ
@ 2013-03-13 10:24 Denis V. Lunev
2013-03-13 15:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Denis V. Lunev @ 2013-03-13 10:24 UTC (permalink / raw)
To: davem; +Cc: netdev, Denis V. Lunev, Tingwei Liu, Alexey Kuznetsov
From: "Denis V. Lunev" <den@openvz.org>
a long time ago by the commit
commit 93456b6d7753def8760b423ac6b986eb9d5a4a95
Author: Denis V. Lunev <den@openvz.org>
Date: Thu Jan 10 03:23:38 2008 -0800
[IPV4]: Unify access to the routing tables.
the defenition of FIB_HASH_TABLE size has obtained wrong dependency:
it should depend upon CONFIG_IP_MULTIPLE_TABLES (as was in the original
code) but it was depended from CONFIG_IP_ROUTE_MULTIPATH
This patch returns the situation to the original state.
The problem was spotted by Tingwei Liu.
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Tingwei Liu <tingw.liu@gmail.com>
CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
---
Changes from v1:
- corrected CONFIG_IP_MULTIPLE_TABLES branches. HASHSZ should be 256
if defined
- holy crap. Original patch has wrong define CONFIG_IP_MULTIPLE_TABLES
I have forgotten all things in kernel :( Fixed too. Checked both
branches with #error inside
include/net/ip_fib.h | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 9497be1..3a7ce04 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -152,18 +152,16 @@ struct fib_result_nl {
};
#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])
+#endif /* CONFIG_IP_ROUTE_MULTIPATH */
+#ifdef CONFIG_IP_MULTIPLE_TABLES
#define FIB_TABLE_HASHSZ 256
-
-#endif /* CONFIG_IP_ROUTE_MULTIPATH */
+#else
+#define FIB_TABLE_HASHSZ 2
+#endif
extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 1/1] ipv4: fix definition of FIB_TABLE_HASHSZ
2013-03-13 10:24 [PATCH v2 1/1] ipv4: fix definition of FIB_TABLE_HASHSZ Denis V. Lunev
@ 2013-03-13 15:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-03-13 15:01 UTC (permalink / raw)
To: den; +Cc: netdev, tingw.liu, kuznet
From: "Denis V. Lunev" <den@openvz.org>
Date: Wed, 13 Mar 2013 14:24:15 +0400
> From: "Denis V. Lunev" <den@openvz.org>
>
> a long time ago by the commit
>
> commit 93456b6d7753def8760b423ac6b986eb9d5a4a95
> Author: Denis V. Lunev <den@openvz.org>
> Date: Thu Jan 10 03:23:38 2008 -0800
>
> [IPV4]: Unify access to the routing tables.
>
> the defenition of FIB_HASH_TABLE size has obtained wrong dependency:
> it should depend upon CONFIG_IP_MULTIPLE_TABLES (as was in the original
> code) but it was depended from CONFIG_IP_ROUTE_MULTIPATH
>
> This patch returns the situation to the original state.
>
> The problem was spotted by Tingwei Liu.
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-13 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 10:24 [PATCH v2 1/1] ipv4: fix definition of FIB_TABLE_HASHSZ Denis V. Lunev
2013-03-13 15:01 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).