summaryrefslogtreecommitdiff
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2016-02-28 20:03:56 -0500
committerJohannes Berg <johannes.berg@intel.com>2016-04-05 10:56:30 +0200
commit2bdaf386f99c4a82788812e583ff59c6714ae4d6 (patch)
tree903aff9c23f928cc3c1f5811ac4ff129d0206546 /net/mac80211/ieee80211_i.h
parent12880d169471fb14c46d6f323f31127702a6d5e6 (diff)
mac80211: mesh: move path tables into if_mesh
The mesh path and mesh gate hashtables are global, containing all of the mpaths for every mesh interface, but the paths are all tied logically to a single interface. The common case is just a single mesh interface, so optimize for that by moving the global hashtable into the per-interface struct. Doing so allows us to drop sdata pointer comparisons inside the lookups and also saves a few bytes of BSS and data. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 804575ff7af5..db7f0dbebc4b 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -696,6 +696,18 @@ struct ieee80211_if_mesh {
/* offset from skb->data while building IE */
int meshconf_offset;
+
+ struct mesh_table __rcu *mesh_paths;
+ struct mesh_table __rcu *mpp_paths; /* Store paths for MPP&MAP */
+ int mesh_paths_generation;
+ int mpp_paths_generation;
+
+ /* Protects assignment of the mesh_paths/mpp_paths table
+ * pointer for resize against reading it for add/delete
+ * of individual paths. Pure readers (lookups) just use
+ * RCU.
+ */
+ rwlock_t pathtbl_resize_lock;
};
#ifdef CONFIG_MAC80211_MESH