Thread (123 messages) flat view 123 messages, 21 authors, 2014-06-23
STALE4458d

[PATCH 01/24] net, diet: Reduce netdev name hash table for CONFIG_BASE_SMALL

From: Andi Kleen <hidden>
Date: 2014-05-05 22:28:33
Also in: lkml
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Andi Kleen <redacted>

Small systems typically only have two network devices, so use
hash shift 2.

Signed-off-by: Andi Kleen <redacted>
---
 include/net/net_namespace.h | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 5f9eb26..d2b8c6c 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -37,7 +37,11 @@ struct sock;
 struct netns_ipvs;
 
 
+#ifdef CONFIG_BASE_SMALL
+#define NETDEV_HASHBITS    2
+#else
 #define NETDEV_HASHBITS    8
+#endif
 #define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS)
 
 struct net {
-- 
1.9.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help