summaryrefslogtreecommitdiffstats
path: root/include/linux/if_vlan.h
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-04-16 00:48:04 -0700
committerDavid S. Miller <davem@davemloft.net>2008-04-16 00:48:04 -0700
commita9fde2607895667823e9d1172fc193087125ef68 (patch)
treecf5481c66e911dc43bd2c9463603562d35af4cfe /include/linux/if_vlan.h
parent669f87baab90183e13b95480aecf8d7bac92ca3c (diff)
downloadop-kernel-dev-a9fde2607895667823e9d1172fc193087125ef68.zip
op-kernel-dev-a9fde2607895667823e9d1172fc193087125ef68.tar.gz
[VLAN]: Tag vlan_group_device with net device, not ifindex.
Currently vlan group is searched using one key - the ifindex. We'll have to lookup the vlan_group by two keys - ifindex and net. Turning the vlan_group lookup key to struct net_device pointer will make this process easier. Besides, this will eliminate one more place in the networking, that assumes that indexes are unique in the kernel. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r--include/linux/if_vlan.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index edd55af..15ace02 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -81,7 +81,9 @@ extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *));
#define VLAN_GROUP_ARRAY_PART_LEN (VLAN_GROUP_ARRAY_LEN/VLAN_GROUP_ARRAY_SPLIT_PARTS)
struct vlan_group {
- int real_dev_ifindex; /* The ifindex of the ethernet(like) device the vlan is attached to. */
+ 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];
OpenPOWER on IntegriCloud