From: Eric Garver <e@erig.me>
To: Jiri Benc <jbenc@redhat.com>
Cc: netdev@vger.kernel.org, pravin shelar <pshelar@ovn.org>
Subject: Re: [PATCH net-next 1/2] openvswitch: remove nonreachable code in vlan parsing
Date: Tue, 4 Oct 2016 20:06:18 -0400 [thread overview]
Message-ID: <20161005000618.GN25403@egarver> (raw)
In-Reply-To: <cfc3e476bc30c1e15506e80955bf43563de3c16c.1475583870.git.jbenc@redhat.com>
Hi Jiri,
On Tue, Oct 04, 2016 at 02:30:01PM +0200, Jiri Benc wrote:
> It can never happen that there's a vlan tag in the packet but not in
> skb->vlan_tci. This is ensured in __netif_receive_skb_core and honored by
> skb_vlan_push and skb_vlan_pop. The code dealing with such case is a dead
> code.
>
This code is also called for packets passed back down from userspace
(after the flow key miss and upcall). So it does happen that we have a
skb without skb->vlan_tci set.
See the chain:
ovs_packet_cmd_execute()
ovs_flow_key_extract_userspace()
key_extract()
parse_vlan()
> Moreover, the likely() statement around skb_vlan_tag_present is bogus. This
> code is called whenever flow key is being extracted from the packet. The
> packet may be as likely vlan tagged as not.
>
I guess the unlikely scenario is the one I mention above.
next prev parent reply other threads:[~2016-10-05 0:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-04 12:30 [PATCH net-next 0/2] openvswitch: vlan fixes Jiri Benc
2016-10-04 12:30 ` [PATCH net-next 1/2] openvswitch: remove nonreachable code in vlan parsing Jiri Benc
2016-10-05 0:06 ` Eric Garver [this message]
2016-10-05 12:53 ` Jiri Benc
2016-10-04 12:30 ` [PATCH net-next 2/2] openvswitch: fix vlan subtraction from packet length Jiri Benc
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=20161005000618.GN25403@egarver \
--to=e@erig.me \
--cc=jbenc@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pshelar@ovn.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 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.