diff options
author | stephen hemminger <stephen@networkplumber.org> | 2013-08-06 01:51:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-07 19:47:52 -0400 |
commit | 6261d983f226f0a6a8d4d32b57a032bc23a5ebb6 (patch) | |
tree | 4bed875ac9758214183ebbed0e9b0f62afba617b /include | |
parent | 8a56d243ca60c92c0b80307422ae75676873a715 (diff) |
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.h | 4 |
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 { | |||
86 | #define PACKET_RCVD 0 | 86 | #define PACKET_RCVD 0 |
87 | #define PACKET_REJECT 1 | 87 | #define PACKET_REJECT 1 |
88 | 88 | ||
89 | #define IP_TNL_HASH_BITS 10 | 89 | #define IP_TNL_HASH_BITS 7 |
90 | #define IP_TNL_HASH_SIZE (1 << IP_TNL_HASH_BITS) | 90 | #define IP_TNL_HASH_SIZE (1 << IP_TNL_HASH_BITS) |
91 | 91 | ||
92 | struct ip_tunnel_net { | 92 | struct ip_tunnel_net { |
93 | struct hlist_head *tunnels; | ||
94 | struct net_device *fb_tunnel_dev; | 93 | struct net_device *fb_tunnel_dev; |
94 | struct hlist_head tunnels[IP_TNL_HASH_SIZE]; | ||
95 | }; | 95 | }; |
96 | 96 | ||
97 | #ifdef CONFIG_INET | 97 | #ifdef CONFIG_INET |