[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3cad1213a287755f5b6d698b45d839ca76d6d841.1481586602.git.mirq-linux@rere.qmqm.pl>
Date: Tue, 13 Dec 2016 01:12:38 +0100 (CET)
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: netdev@...r.kernel.org
Cc: Russell King <linux@...linux.org.uk> (maintainer:ARM PORT),
linux-arm-kernel@...ts.infradead.org (moderated list:ARM PORT),
Ralf Baechle <ralf@...ux-mips.org> (supporter:MIPS),
linux-mips@...ux-mips.org (open list:MIPS),
Benjamin Herrenschmidt <benh@...nel.crashing.org> (supporter:LINUX
FOR POWERPC (32-BIT AND 64-BIT)),
Paul Mackerras <paulus@...ba.org> (supporter:LINUX FOR POWERPC
(32-BIT AND 64-BIT)),
Michael Ellerman <mpe@...erman.id.au> (supporter:LINUX FOR POWERPC
(32-BIT AND 64-BIT),commit_signer:2/5=40%),
linuxppc-dev@...ts.ozlabs.org (open list:LINUX FOR POWERPC (32-BIT AND
64-BIT)),
"David S. Miller" <davem@...emloft.net> (maintainer:SPARC + UltraSPARC
(sparc/sparc64),commit_signer:2/4=50%),
sparclinux@...r.kernel.org (open list:SPARC + UltraSPARC
(sparc/sparc64))
Subject: [PATCH net-next 18/27] net/skbuff: add macros for VLAN_PRESENT bit
Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
---
include/linux/skbuff.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 332e767..4a85a1f 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -768,6 +768,12 @@ struct sk_buff {
__u32 priority;
int skb_iif;
__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;
__u16 vlan_tci;
#if defined(CONFIG_NET_RX_BUSY_POLL) || defined(CONFIG_XPS)
--
2.10.2
Powered by blists - more mailing lists