aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2013-08-05 22:51:37 -0700
committerDavid S. Miller <davem@davemloft.net>2013-08-07 16:47:52 -0700
commit6261d983f226f0a6a8d4d32b57a032bc23a5ebb6 (patch)
tree4bed875ac9758214183ebbed0e9b0f62afba617b /include
parentbnx2: Update version to 2.2.4 (diff)
downloadlinux-dev-6261d983f226f0a6a8d4d32b57a032bc23a5ebb6.tar.xz
linux-dev-6261d983f226f0a6a8d4d32b57a032bc23a5ebb6.zip
ip_tunnel: embed hash list head
The IP tunnel hash heads can be embedded in the per-net structure since it is a fixed size. Reduce the size so that the total structure fits in a page size. The original size was overly large, even NETDEV_HASHBITS is only 8 bits! Also, add some white space for readability. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Pravin B Shelar <pshelar@nicira.com>. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/ip_tunnels.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h
index 781b3cf86a2f..c6acd9f8f877 100644
--- a/include/net/ip_tunnels.h
+++ b/include/net/ip_tunnels.h
@@ -86,12 +86,12 @@ struct tnl_ptk_info {
#define PACKET_RCVD 0
#define PACKET_REJECT 1
-#define IP_TNL_HASH_BITS 10
+#define IP_TNL_HASH_BITS 7
#define IP_TNL_HASH_SIZE (1 << IP_TNL_HASH_BITS)
struct ip_tunnel_net {
- struct hlist_head *tunnels;
struct net_device *fb_tunnel_dev;
+ struct hlist_head tunnels[IP_TNL_HASH_SIZE];
};
#ifdef CONFIG_INET