aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/types.h
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2011-04-21 15:52:17 +0200
committerSven Eckelmann <sven@narfation.org>2011-05-08 16:10:41 +0200
commit61906ae86d8989e5bd3bc1f51b2fb8d32ffde2c5 (patch)
treedf71d837c147495099a1411897652154bc26c08e /net/batman-adv/types.h
parentbatman-adv: remove misplaced comment (diff)
downloadlinux-dev-61906ae86d8989e5bd3bc1f51b2fb8d32ffde2c5.tar.xz
linux-dev-61906ae86d8989e5bd3bc1f51b2fb8d32ffde2c5.zip
batman-adv: multi vlan support for bridge loop detection
The bridge loop detection for batman-adv allows the bat0 interface to be bridged into an ethernet segment which other batman-adv nodes are connected to. In order to also allow multiple VLANs on top of the bat0 interface to be bridged into the ethernet segment this patch extends the aforementioned bridge loop detection. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to '')
-rw-r--r--net/batman-adv/types.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 947bafc6431a..9ae507ab7bbe 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -146,14 +146,13 @@ struct bat_priv {
atomic_t bcast_queue_left;
atomic_t batman_queue_left;
char num_ifaces;
- struct hlist_head softif_neigh_list;
- struct softif_neigh __rcu *softif_neigh;
struct debug_log *debug_log;
struct kobject *mesh_obj;
struct dentry *debug_dir;
struct hlist_head forw_bat_list;
struct hlist_head forw_bcast_list;
struct hlist_head gw_list;
+ struct hlist_head softif_neigh_vids;
struct list_head vis_send_list;
struct hashtable_t *orig_hash;
struct hashtable_t *hna_local_hash;
@@ -167,6 +166,7 @@ struct bat_priv {
spinlock_t vis_hash_lock; /* protects vis_hash */
spinlock_t vis_list_lock; /* protects vis_info::recv_list */
spinlock_t softif_neigh_lock; /* protects soft-interface neigh list */
+ spinlock_t softif_neigh_vid_lock; /* protects soft-interface vid list */
int16_t num_local_hna;
atomic_t hna_local_changed;
struct delayed_work hna_work;
@@ -270,11 +270,20 @@ struct recvlist_node {
uint8_t mac[ETH_ALEN];
};
+struct softif_neigh_vid {
+ struct hlist_node list;
+ struct bat_priv *bat_priv;
+ short vid;
+ atomic_t refcount;
+ struct softif_neigh __rcu *softif_neigh;
+ struct rcu_head rcu;
+ struct hlist_head softif_neigh_list;
+};
+
struct softif_neigh {
struct hlist_node list;
uint8_t addr[ETH_ALEN];
unsigned long last_seen;
- short vid;
atomic_t refcount;
struct rcu_head rcu;
};