netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Hadar Hen Zion <hadarh@dev.mellanox.co.il>
Cc: Toshiaki Makita <toshiaki.makita1@gmail.com>,
	Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>,
	Hadar Hen Zion <hadarh@mellanox.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>, Jiri Pirko <jiri@mellanox.com>,
	Tom Herbert <tom@herbertland.com>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	Amir Vadai <amirv@mellanox.com>
Subject: Re: [PATCH net-next 1/4] flow_dissector: Get vlan info from skb->vlan_tci instead of skb->data
Date: Mon, 15 Aug 2016 20:06:45 +0200	[thread overview]
Message-ID: <20160815180645.GM2024@nanopsycho> (raw)
In-Reply-To: <CAJL1qvHL27cFDYHwyKFiRoGx4FERMWY_e8ybo3ihoRWhFZLUMg@mail.gmail.com>

Mon, Aug 15, 2016 at 05:51:38PM CEST, hadarh@dev.mellanox.co.il wrote:
>On Mon, Aug 15, 2016 at 5:38 AM, Toshiaki Makita
><toshiaki.makita1@gmail.com> wrote:
>> On 16/08/14 (日) 23:58, Hadar Hen Zion wrote:
>>>
>>> On Fri, Aug 12, 2016 at 9:36 AM, Toshiaki Makita
>>> <makita.toshiaki@lab.ntt.co.jp> wrote:
>>>>
>>>> On 2016/08/10 22:32, Hadar Hen Zion wrote:
>>>>>
>>>>> Early in the datapath skb_vlan_untag function is called, stripped
>>>>> the vlan from the skb and set skb->vlan_tci and skb->vlan_proto fields.
>>>>>
>>>>> The current dissection doesn't handle vlan packets correctly.  Vlan
>>>>> doesn't exist in skb->data anymore when applying flow dissection on the
>>>>> skb, fix that.
>>>>
>>>>
>>>> RPS (and flow-dissector called in RPS) is performed before vlan-strip in
>>>> __netif_receive_skb_core().
>>>
>>>
>>> right, I'll fix it to v2.
>>>
>>>> Also, in cases skb is tagged with multiple vlan headers (typical when
>>>> using 802.1ad), the second level vlan tag is in skb->data.
>>>
>>>
>>> Currently, flow_dissector doesn't support multiple vlan headers, only
>>> one vlan_id field is present.
>>> There aren't any flow_dissector "customers" yet for multiple vlan support.
>>
>>
>> Sure, no need to store second level vlan tag information for now.
>> The point is that current flow-dissector correctly skips any number of vlan
>> tags and get hash value from IP/TCP/UDP headers, so RPS works for multiple
>> vlan tagged packets.
>>
>> Thanks,
>> Toshiaki Makita
>
>ok, so we are on the same page.
>The flow dissector will correctly skip any number of vlans regardless
>if the first vlan is stripped or not.


On RX the first vlan is always stripped either by hw or by skb_vlan_untag.
On TX the first vlan is also stripped as validate_xmit_skb_list which
pushes vlan header is called just before dev_hard_start_xmit.

So I believe you can safely work just with skb->vlan_*

  reply	other threads:[~2016-08-15 18:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-10 13:32 [PATCH net-next 0/4] net_sched, flow_dissector, flower: Introduce vlan tag support Hadar Hen Zion
2016-08-10 13:32 ` [PATCH net-next 1/4] flow_dissector: Get vlan info from skb->vlan_tci instead of skb->data Hadar Hen Zion
2016-08-12  6:24   ` Jiri Pirko
2016-08-12  6:36   ` Toshiaki Makita
2016-08-14 14:58     ` Hadar Hen Zion
2016-08-15  2:38       ` Toshiaki Makita
2016-08-15 15:51         ` Hadar Hen Zion
2016-08-15 18:06           ` Jiri Pirko [this message]
2016-08-10 13:32 ` [PATCH net-next 2/4] flow_dissector: Get vlan priority in addition to vlan id Hadar Hen Zion
2016-08-10 21:54   ` kbuild test robot
2016-08-10 21:58   ` kbuild test robot
2016-08-11 15:23     ` Hadar Hen Zion
2016-08-12  6:26       ` Jiri Pirko
2016-08-10 13:32 ` [PATCH net-next 3/4] net_sched: flower: Add vlan support Hadar Hen Zion
2016-08-12  5:57   ` Jiri Pirko
2016-08-10 13:32 ` [PATCH net-next 4/4] net_sched: act_vlan: Add priority option Hadar Hen Zion
2016-08-12  6:05   ` Jiri Pirko
2016-08-12  8:18   ` Shmulik Ladkani

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=20160815180645.GM2024@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=amirv@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=hadarh@dev.mellanox.co.il \
    --cc=hadarh@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=makita.toshiaki@lab.ntt.co.jp \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=tom@herbertland.com \
    --cc=toshiaki.makita1@gmail.com \
    /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).