From: Jiri Benc <jbenc@redhat.com>
To: Pravin B Shelar <pshelar@nicira.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/4] vlan: Fix mac_len adjustment.
Date: Wed, 3 Dec 2014 15:32:41 +0100 [thread overview]
Message-ID: <20141203153241.5866bb75@griffin> (raw)
In-Reply-To: <1417473038-2165-1-git-send-email-pshelar@nicira.com>
On Mon, 1 Dec 2014 14:30:38 -0800, Pravin B Shelar wrote:
> skb_reset_mac_len() sets length according to ethernet and network
> offsets, but mpls expects mac-length to be offset to mpls header (ref.
> skb_mpls_header()). Therefore rather than reset we need to subtract
> VLAN_HLEN from mac_len.
>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
> ---
> net/core/skbuff.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 92116df..c45888f 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -4178,7 +4178,7 @@ static int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci)
> if (skb_network_offset(skb) < ETH_HLEN)
> skb_set_network_header(skb, ETH_HLEN);
>
> - skb_reset_mac_len(skb);
> + skb->mac_len -= VLAN_HLEN;
> pull:
> __skb_pull(skb, offset);
>
See my previous explanation why this patch is wrong with the current
code: http://article.gmane.org/gmane.linux.network/339457
Jiri
--
Jiri Benc
prev parent reply other threads:[~2014-12-03 14:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 22:30 [PATCH net-next 2/4] vlan: Fix mac_len adjustment Pravin B Shelar
2014-12-03 14:32 ` Jiri Benc [this message]
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=20141203153241.5866bb75@griffin \
--to=jbenc@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.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).