diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2012-10-29 19:15:32 -0200 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-10-29 19:15:32 -0200 |
commit | 19bf7f8ac3f8131100027281c495dbbe00cd5ae0 (patch) | |
tree | 270b97e3ca47c0f62a1babca2ae37f79a76a309c /include/linux/if_vlan.h | |
parent | 787c57c0fb393fe8a3974d300ddcfe30373386fe (diff) | |
parent | 35fd3dc58da675d659513384221349ef90749a01 (diff) | |
download | linux-19bf7f8ac3f8131100027281c495dbbe00cd5ae0.tar.gz linux-19bf7f8ac3f8131100027281c495dbbe00cd5ae0.tar.bz2 linux-19bf7f8ac3f8131100027281c495dbbe00cd5ae0.zip |
Merge remote-tracking branch 'master' into queue
Merge reason: development work has dependency on kvm patches merged
upstream.
Conflicts:
arch/powerpc/include/asm/Kbuild
arch/powerpc/include/asm/kvm_para.h
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r-- | include/linux/if_vlan.h | 59 |
1 files changed, 5 insertions, 54 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index e6ff12dd717b..d06cc5c8f58c 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -9,15 +9,14 @@ * 2 of the License, or (at your option) any later version. * */ - #ifndef _LINUX_IF_VLAN_H_ #define _LINUX_IF_VLAN_H_ -#ifdef __KERNEL__ #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/rtnetlink.h> #include <linux/bug.h> +#include <uapi/linux/if_vlan.h> #define VLAN_HLEN 4 /* The additional bytes required by VLAN * (in addition to the Ethernet header) @@ -80,6 +79,8 @@ static inline int is_vlan_dev(struct net_device *dev) } #define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT) +#define vlan_tx_nonzero_tag_present(__skb) \ + (vlan_tx_tag_present(__skb) && ((__skb)->vlan_tci & VLAN_VID_MASK)) #define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT) #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) @@ -89,7 +90,7 @@ extern struct net_device *__vlan_find_dev_deep(struct net_device *real_dev, extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); extern u16 vlan_dev_vlan_id(const struct net_device *dev); -extern bool vlan_do_receive(struct sk_buff **skb, bool last_handler); +extern bool vlan_do_receive(struct sk_buff **skb); extern struct sk_buff *vlan_untag(struct sk_buff *skb); extern int vlan_vid_add(struct net_device *dev, unsigned short vid); @@ -120,10 +121,8 @@ static inline u16 vlan_dev_vlan_id(const struct net_device *dev) return 0; } -static inline bool vlan_do_receive(struct sk_buff **skb, bool last_handler) +static inline bool vlan_do_receive(struct sk_buff **skb) { - if (((*skb)->vlan_tci & VLAN_VID_MASK) && last_handler) - (*skb)->pkt_type = PACKET_OTHERHOST; return false; } @@ -361,52 +360,4 @@ static inline void vlan_set_encap_proto(struct sk_buff *skb, */ skb->protocol = htons(ETH_P_802_2); } -#endif /* __KERNEL__ */ - -/* VLAN IOCTLs are found in sockios.h */ - -/* Passed in vlan_ioctl_args structure to determine behaviour. */ -enum vlan_ioctl_cmds { - ADD_VLAN_CMD, - DEL_VLAN_CMD, - SET_VLAN_INGRESS_PRIORITY_CMD, - SET_VLAN_EGRESS_PRIORITY_CMD, - GET_VLAN_INGRESS_PRIORITY_CMD, - GET_VLAN_EGRESS_PRIORITY_CMD, - SET_VLAN_NAME_TYPE_CMD, - SET_VLAN_FLAG_CMD, - GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */ - GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ -}; - -enum vlan_flags { - VLAN_FLAG_REORDER_HDR = 0x1, - VLAN_FLAG_GVRP = 0x2, - VLAN_FLAG_LOOSE_BINDING = 0x4, -}; - -enum vlan_name_types { - VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */ - VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */ - VLAN_NAME_TYPE_PLUS_VID_NO_PAD, /* Name will look like: vlan5 */ - VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD, /* Name will look like: eth0.5 */ - VLAN_NAME_TYPE_HIGHEST -}; - -struct vlan_ioctl_args { - int cmd; /* Should be one of the vlan_ioctl_cmds enum above. */ - char device1[24]; - - union { - char device2[24]; - int VID; - unsigned int skb_priority; - unsigned int name_type; - unsigned int bind_type; - unsigned int flag; /* Matches vlan_dev_priv flags */ - } u; - - short vlan_qos; -}; - #endif /* !(_LINUX_IF_VLAN_H_) */ |