lkml.org 
[lkml]   [2014]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 01/24] net, diet: Reduce netdev name hash table for CONFIG_BASE_SMALL
Date
From: Andi Kleen <ak@linux.intel.com>

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

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
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


\
 
 \ /
  Last update: 2014-05-06 01:21    [W:0.356 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site