HW VLAN filtering control (resend)
Subsystems (2)
PATCH 1/2 HW VLAN filtering control (resend)
Add support to the VLAN subsystem for enabling/disabling hardware VLAN filtering at runtime. This is useful for debugging purposes.
The existing vconfig utility can be used without modification.
Signed-off-by Mitch Williams <[email protected]>
include/linux/if_vlan.h +15 -9
@@ -106,7 +106,20 @@ struct vlan_priority_tci_mapping {*/ struct vlan_priority_tci_mapping *next; }; - +#define VLAN_FLAG_REORDER 1/* (1 << 0) re_order_header This option will cause the +* VLAN code to move around the ethernet header on +* ingress to make the skb look **exactly** like it +* came in from an ethernet port. This destroys some of +* the VLAN information in the skb, but it fixes programs +* like DHCP that use packet-filtering and don't understand +* 802.1Q +*/ + +#define VLAN_FLAG_DISABLE_FILTER 2/* (1 << 1) disable HW filtering. This flag allows +* devices that perform hardware filtering to +* turn off filtering. This may be useful for +* debugging or for sniffer applications. +*/ /* Holds information that makes sense if this device is a VLAN device. */ struct vlan_dev_info {/** This will be the mapping that correlates skb->priority to
@@ -116,14 +129,7 @@ struct vlan_dev_info {struct vlan_priority_tci_mapping *egress_priority_map[16 ];/* hash table */ unsigned short vlan_id;/* The VLAN Identifier for this interface. */ -unsigned short flags;/* (1 << 0) re_order_header This option will cause the -* VLAN code to move around the ethernet header on -* ingress to make the skb look **exactly** like it -* came in from an ethernet port. This destroys some of -* the VLAN information in the skb, but it fixes programs -* like DHCP that use packet-filtering and don't understand -* 802.1Q -*/ +unsigned short flags;struct dev_mc_list *old_mc_list;/* old multi-cast list for the VLAN interface.. * we save this so we can tell what changes were * made, in order to feed the right changes down
include/linux/netdevice.h +3 -1
@@ -522,7 +522,9 @@ struct net_device unsigned short vid);void (*vlan_rx_kill_vid)(struct net_device *dev,unsigned short vid); - +#define HAVE_VLAN_FLAGS +int (*vlan_set_flag)(struct net_device *dev, +unsigned int flag,int value);int (*hard_header_parse)(struct sk_buff *skb,unsigned char *haddr);int (*neigh_setup)(struct net_device *dev,struct neigh_parms *);
net/8021q/vlan_dev.c +46 -25
83 lines not on this page · raw message