All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: shmulik.ladkani@gmail.com
Cc: netdev@vger.kernel.org, jhs@mojatatu.com, daniel@iogearbox.net,
	pshelar@ovn.org, jiri@mellanox.com
Subject: Re: [PATCH v3 net 2/2] net: skbuff: Limit skb_vlan_pop/push() to expect skb->data at mac header
Date: Mon, 03 Oct 2016 21:42:35 -0400 (EDT)	[thread overview]
Message-ID: <20161003.214235.1262526925870231271.davem@davemloft.net> (raw)
In-Reply-To: <1475140241-23586-2-git-send-email-shmulik.ladkani@gmail.com>

From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Date: Thu, 29 Sep 2016 12:10:41 +0300

> skb_vlan_pop/push were too generic, trying to support the cases where
> skb->data is at mac header, and cases where skb->data is arbitrarily
> elsewhere.
> 
> Supporting an arbitrary skb->data was complex and bogus:
>  - It failed to unwind skb->data to its original location post actual
>    pop/push.
>    (Also, semantic is not well defined for unwinding: If data was into
>     the eth header, need to use same offset from start; But if data was
>     at network header or beyond, need to adjust the original offset
>     according to the push/pull)
>  - It mangled the rcsum post actual push/pop, without taking into account
>    that the eth bytes might already have been pulled out of the csum.
> 
> Most callers (ovs, bpf) already had their skb->data at mac_header upon
> invoking skb_vlan_pop/push.
> Last caller that failed to do so (act_vlan) has been recently fixed.
> 
> Therefore, to simplify things, no longer support arbitrary skb->data
> inputs for skb_vlan_pop/push().
> 
> skb->data is expected to be exactly at mac_header; WARN otherwise.
> 
> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>

Applied.

  reply	other threads:[~2016-10-04  1:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29  9:10 [PATCH v3 net 1/2] net/sched: act_vlan: Push skb->data to mac_header prior calling skb_vlan_*() functions Shmulik Ladkani
2016-09-29  9:10 ` [PATCH v3 net 2/2] net: skbuff: Limit skb_vlan_pop/push() to expect skb->data at mac header Shmulik Ladkani
2016-10-04  1:42   ` David Miller [this message]
2016-09-29  9:20 ` [PATCH v3 net 1/2] net/sched: act_vlan: Push skb->data to mac_header prior calling skb_vlan_*() functions Shmulik Ladkani
2016-10-04  1:42 ` David Miller

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=20161003.214235.1262526925870231271.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=daniel@iogearbox.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@ovn.org \
    --cc=shmulik.ladkani@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.