summaryrefslogtreecommitdiff
path: root/net/mac80211/mesh.h
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2016-03-19 05:11:29 +0300
committerJohannes Berg <johannes.berg@intel.com>2016-04-05 22:34:51 +0300
commit47a0489ce1e518f4936c7fedb93b3d2abd7ccd2e (patch)
treeabce8be6a632b789e77f66933b3bf128fa9fe948 /net/mac80211/mesh.h
parent0aa7fabbd5d9da1f8a8fdc3e2837c532bcfa5664 (diff)
downloadlinux-47a0489ce1e518f4936c7fedb93b3d2abd7ccd2e.tar.xz
mac80211: mesh: use hlist for rmc cache
The RMC cache has 256 list heads plus a u32, which puts it at the unfortunate size of 4104 bytes with padding. kmalloc() will then round this up to the next power-of-two, so we wind up actually using two pages here where most of the second is wasted. Switch to hlist heads here to reduce the structure size down to fit within a page. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.h')
-rw-r--r--net/mac80211/mesh.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index e1415c952e9c..bc3f9a32b5a4 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -158,14 +158,14 @@ struct mesh_table {
* that are found in the cache.
*/
struct rmc_entry {
- struct list_head list;
+ struct hlist_node list;
u32 seqnum;
unsigned long exp_time;
u8 sa[ETH_ALEN];
};
struct mesh_rmc {
- struct list_head bucket[RMC_BUCKETS];
+ struct hlist_head bucket[RMC_BUCKETS];
u32 idx_mask;
};