Netdev List
 help / color / mirror / Atom feed
From: Tom Herbert <tom@herbertland.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: [PATCH net-next 3/6] net: Add VLAN ID to flow_keys
Date: Mon, 4 May 2015 16:02:37 -0700	[thread overview]
Message-ID: <1430780560-2758924-4-git-send-email-tom@herbertland.com> (raw)
In-Reply-To: <1430780560-2758924-1-git-send-email-tom@herbertland.com>

In flow_dissector set vlan_id in flow_keys when VLAN is found.

Signed-off-by: Tom Herbert <tom@herbertland.com>
---
 include/net/flow_keys.h   | 1 +
 net/core/flow_dissector.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h
index c8bc6aa..14298e2 100644
--- a/include/net/flow_keys.h
+++ b/include/net/flow_keys.h
@@ -26,6 +26,7 @@ struct flow_keys {
 	__be16	n_proto;
 	u8	ip_proto;
 	u8	padding;
+	u32	vlan_id:12;
 
 	union {
 		__be32 ports;
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 69fbaf9..148b989 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -143,6 +143,7 @@ ipv6:
 		if (!vlan)
 			return false;
 
+		flow->vlan_id = skb_vlan_tag_get_id(skb);
 		proto = vlan->h_vlan_encapsulated_proto;
 		nhoff += sizeof(*vlan);
 		goto again;
-- 
1.8.1

  parent reply	other threads:[~2015-05-04 23:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 23:02 [PATCH net-next 0/6] net: Increase inputs to flow_keys hashing Tom Herbert
2015-05-04 23:02 ` [PATCH net-next 1/6] net: Get skb hash over flow_keys structure Tom Herbert
2015-05-04 23:02 ` [PATCH net-next 2/6] net: Add full IPv6 addresses to flow_keys Tom Herbert
2015-05-04 23:02 ` Tom Herbert [this message]
2015-05-04 23:02 ` [PATCH net-next 4/6] net: Add IPv6 flow label " Tom Herbert
2015-05-04 23:02 ` [PATCH net-next 5/6] net: Add GRE keyid in flow_keys Tom Herbert
2015-05-04 23:02 ` [PATCH net-next 6/6] mpls: Add MPLS entropy label " Tom Herbert
2015-05-05  0:56   ` Alexei Starovoitov
2015-05-05  2:13     ` Tom Herbert

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=1430780560-2758924-4-git-send-email-tom@herbertland.com \
    --to=tom@herbertland.com \
    --cc=davem@davemloft.net \
    --cc=netdev@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