summaryrefslogtreecommitdiff
path: root/include/linux/if_vlan.h
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-12-08 04:11:18 +0000
committerDavid S. Miller <davem@davemloft.net>2011-12-08 19:52:42 -0500
commit5b9ea6e022e9ba0fe39cb349ac40361f78d5da5b (patch)
tree11f0de492ee799fd4174f79ac6aae4c3533beb25 /include/linux/if_vlan.h
parent87002b03baabd2b8f6281ab6411ed88d24958de1 (diff)
downloadlwn-5b9ea6e022e9ba0fe39cb349ac40361f78d5da5b.tar.gz
lwn-5b9ea6e022e9ba0fe39cb349ac40361f78d5da5b.zip
vlan: introduce vid list with reference counting
This allows to keep track of vids needed to be in rx vlan filters of devices even if they are used in bond/team etc. vlan_info as well as vlan_group previously was, is allocated when first vid is added and dealocated whan last vid is deleted. vlan_group definition is moved to private header. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r--include/linux/if_vlan.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 71168a6f3347..0c9691305298 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -74,22 +74,7 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
/* found in socket.c */
extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *));
-/* if this changes, algorithm will have to be reworked because this
- * depends on completely exhausting the VLAN identifier space. Thus
- * it gives constant time look-up, but in many cases it wastes memory.
- */
-#define VLAN_GROUP_ARRAY_SPLIT_PARTS 8
-#define VLAN_GROUP_ARRAY_PART_LEN (VLAN_N_VID/VLAN_GROUP_ARRAY_SPLIT_PARTS)
-
-struct vlan_group {
- struct net_device *real_dev; /* The ethernet(like) device
- * the vlan is attached to.
- */
- unsigned int nr_vlans;
- struct hlist_node hlist; /* linked list */
- struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS];
- struct rcu_head rcu;
-};
+struct vlan_info;
static inline int is_vlan_dev(struct net_device *dev)
{