From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: netdev@vger.kernel.org
Cc: Russell King <linux@armlinux.org.uk> (maintainer:ARM PORT),
linux-arm-kernel@lists.infradead.org (moderated list:ARM PORT),
Ralf Baechle <ralf@linux-mips.org> (supporter:MIPS),
linux-mips@linux-mips.org (open list:MIPS),
Benjamin Herrenschmidt <benh@kernel.crashing.org>
(supporter:LINUX FOR POWERPC (32-BIT AND 64-BIT)),
Paul Mackerras <paulus@samba.org> (supporter:LINUX FOR POWERPC
(32-BIT AND 64-BIT)),
Michael Ellerman <mpe@ellerman.id.au> (supporter:LINUX FOR
POWERPC (32-BIT AND 64-BIT), commit_signer:2/5=40%),
linuxppc-dev@lists.ozlabs.org (open list:LINUX FOR POWERPC
(32-BIT AND 64-BIT)),
"David S. Miller" <davem@davemloft.net> (maintainer:SPARC +
UltraSPARC (sparc/sparc64), commit_signer:2/4=50%),
sparclinux@vger.kernel.org (open list:SPARC + UltraSPARC
(sparc/sparc64))
Subject: [PATCH net-next 18/27] net/skbuff: add macros for VLAN_PRESENT bit
Date: Tue, 13 Dec 2016 01:12:38 +0100 (CET) [thread overview]
Message-ID: <3cad1213a287755f5b6d698b45d839ca76d6d841.1481586602.git.mirq-linux@rere.qmqm.pl> (raw)
In-Reply-To: <cover.1481586602.git.mirq-linux@rere.qmqm.pl>
Signed-off-by: Michał Mirosław <mirq-linux@rere.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
next parent reply other threads:[~2016-12-13 0:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1481586602.git.mirq-linux@rere.qmqm.pl>
2016-12-13 0:12 ` Michał Mirosław [this message]
2016-12-13 0:12 ` [PATCH net-next 21/27] net/bpf_jit: PPC: split VLAN_PRESENT bit handling from VLAN_TCI Michał Mirosław
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3cad1213a287755f5b6d698b45d839ca76d6d841.1481586602.git.mirq-linux@rere.qmqm.pl \
--to=mirq-linux@rere.qmqm.pl \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mips@linux-mips.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
--cc=ralf@linux-mips.org \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).