netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Garver <e@erig.me>
To: pravin shelar <pshelar-LZ6Gd1LRuIk@public.gmane.org>
Cc: ovs dev <dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org>,
	Linux Kernel Network Developers
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Thomas F Herbert
	<thomasfherbert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH net-next v21 4/4] openvswitch: report error on VLAN nlattr in ovs_key_from_nlattrs()
Date: Sat, 3 Sep 2016 11:59:37 -0400	[thread overview]
Message-ID: <20160903155937.GI31705@egarver> (raw)
In-Reply-To: <CAOrHB_BhPvf_rM3YR5mRSCQPhvnosBDoBEyFvags98CHtM9Z+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Fri, Sep 02, 2016 at 02:42:41PM -0700, pravin shelar wrote:
> On Thu, Sep 1, 2016 at 1:45 PM, Eric Garver <e@erig.me> wrote:
> > With 802.1ad support these are parsed and set upfront by
> > parse_vlan_from_nlattrs() before ovs_key_from_nlattrs() is ever called.
> > As such we should never see a VLAN attribute in ovs_key_from_nlattrs().
> >
> > Signed-off-by: Eric Garver <e@erig.me>
> > ---
> >  net/openvswitch/flow_netlink.c | 19 +++++--------------
> >  1 file changed, 5 insertions(+), 14 deletions(-)
> >
> > diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
> > index fbe9e0e4792d..0f36aead744b 100644
> > --- a/net/openvswitch/flow_netlink.c
> > +++ b/net/openvswitch/flow_netlink.c
> > @@ -923,20 +923,11 @@ static int ovs_key_from_nlattrs(struct net *net, struct sw_flow_match *match,
> >         }
> >
> >         if (attrs & (1 << OVS_KEY_ATTR_VLAN)) {
> > -               __be16 tci;
> > -
> > -               tci = nla_get_be16(a[OVS_KEY_ATTR_VLAN]);
> > -               if (!(tci & htons(VLAN_TAG_PRESENT))) {
> > -                       if (is_mask)
> > -                               OVS_NLERR(log, "VLAN TCI mask does not have exact match for VLAN_TAG_PRESENT bit.");
> > -                       else
> > -                               OVS_NLERR(log, "VLAN TCI does not have VLAN_TAG_PRESENT bit set.");
> > -
> > -                       return -EINVAL;
> > -               }
> > -
> > -               SW_FLOW_KEY_PUT(match, eth.vlan.tci, tci, is_mask);
> > -               attrs &= ~(1 << OVS_KEY_ATTR_VLAN);
> > +               /* VLAN attribute is always parsed before getting here since it may
> > +                * occur multiple times.
> > +                */
> > +               OVS_NLERR(log, "VLAN attribute unexpected.");
> > +               return -EINVAL;
> >         }
> >
> Is there reason for not merging this patch with earlier patch?

Not a particularly good one. I'll merge it into patch 3.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

      parent reply	other threads:[~2016-09-03 15:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 20:45 [PATCH net-next v21 0/4] openvswitch: add 802.1ad support Eric Garver
     [not found] ` <1472762727-25844-1-git-send-email-e-jCUjZXiOoP8@public.gmane.org>
2016-09-01 20:45   ` [PATCH net-next v21 1/4] openvswitch: 802.1ad uapi changes Eric Garver
2016-09-02 21:41     ` [ovs-dev] " pravin shelar
2016-09-01 20:45   ` [PATCH net-next v21 2/4] vlan: Check for vlan ethernet types for 8021.q or 802.1ad Eric Garver
2016-09-02 21:41     ` [ovs-dev] " pravin shelar
2016-09-01 20:45   ` [PATCH net-next v21 3/4] openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes Eric Garver
     [not found]     ` <1472762727-25844-4-git-send-email-e-jCUjZXiOoP8@public.gmane.org>
2016-09-02 21:42       ` pravin shelar
2016-09-02 22:21         ` [ovs-dev] " pravin shelar
     [not found]         ` <CAOrHB_A6Twwp+S514orUZ5RaKS1hGXgc1uUi7Lj8dxPQrk_sxg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-03 17:30           ` Eric Garver
2016-09-04 11:05             ` Jiri Benc
2016-09-06 12:34               ` [ovs-dev] " Eric Garver
2016-09-01 20:45   ` [PATCH net-next v21 4/4] openvswitch: report error on VLAN nlattr in ovs_key_from_nlattrs() Eric Garver
     [not found]     ` <1472762727-25844-5-git-send-email-e-jCUjZXiOoP8@public.gmane.org>
2016-09-02 21:42       ` pravin shelar
     [not found]         ` <CAOrHB_BhPvf_rM3YR5mRSCQPhvnosBDoBEyFvags98CHtM9Z+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-03 15:59           ` Eric Garver [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=20160903155937.GI31705@egarver \
    --to=e@erig.me \
    --cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pshelar-LZ6Gd1LRuIk@public.gmane.org \
    --cc=thomasfherbert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).