提交 5109f9fd 编写于 作者: M Michał Mirosław 提交者: David S. Miller

net/skbuff: add macros for VLAN_PRESENT bit

Wrap VLAN_PRESENT bit using macro like PKT_TYPE_* and CLONED_*,
as used by BPF code.
Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5aa25c05
...@@ -816,6 +816,12 @@ struct sk_buff { ...@@ -816,6 +816,12 @@ struct sk_buff {
__u32 priority; __u32 priority;
int skb_iif; int skb_iif;
__u32 hash; __u32 hash;
#define PKT_VLAN_PRESENT_BIT 4 // CFI (12-th bit) in TCI
#ifdef __BIG_ENDIAN
#define PKT_VLAN_PRESENT_OFFSET() offsetof(struct sk_buff, vlan_tci)
#else
#define PKT_VLAN_PRESENT_OFFSET() (offsetof(struct sk_buff, vlan_tci) + 1)
#endif
__be16 vlan_proto; __be16 vlan_proto;
__u16 vlan_tci; __u16 vlan_tci;
#if defined(CONFIG_NET_RX_BUSY_POLL) || defined(CONFIG_XPS) #if defined(CONFIG_NET_RX_BUSY_POLL) || defined(CONFIG_XPS)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册