public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ben Pfaff <blp@nicira•com>
To: Simon Horman <simon.horman@netronome•com>
Cc: dev@openvswitch•org, netdev@vger•kernel.org
Subject: Re: [ovs-dev] [PATCH/RFC repost 2/8] netlink: Allow suppression of warnings for duplicate attributes
Date: Fri, 10 Oct 2014 08:31:26 -0700	[thread overview]
Message-ID: <20141010153126.GC17859@nicira.com> (raw)
In-Reply-To: <20141009011831.GF9339@vergenet.net>

On Thu, Oct 09, 2014 at 10:18:32AM +0900, Simon Horman wrote:
> On Fri, Sep 26, 2014 at 04:55:42PM -0700, Ben Pfaff wrote:
> > On Thu, Sep 18, 2014 at 10:55:05AM +0900, Simon Horman wrote:
> > > Add a multiple field to struct nl_policy which if set suppresses
> > > warning of duplicate attributes in nl_parse_nested().
> > > 
> > > As is the case without this patch only the last occurrence of an
> > > attribute is stored in attrs by nl_parse_nested(). As such
> > > if the multiple field of struct nl_policy is set then it
> > > is up to the caller to parse the message to extract all the attributes.
> > > 
> > > This is in preparation for allowing multiple OVS_SELECT_GROUP_ATTR_BUCKET
> > > attributes in a nested OVS_ACTION_ATTR_SELECT_GROUP attribute.
> > > 
> > > Signed-off-by: Simon Horman <simon.horman@netronome•com>
> > 
> > In the other case where we have duplicate attributes, it doesn't make
> > sense to process them with the policy functions, because we want to
> > see all of the instances of the duplicate attributes and policy
> > doesn't allow us to do that.  I'm a little surprised that the new
> > attributes work differently.  What's the idea?
> 
> My idea was to use the policy to obtain the attributes that
> may not be duplicated. And then custom code to pick up all the
> instances of attributes that may be duplicated.
> 
> I'm don't feel strongly about that approach and I'd be just has
> happy to drop this patch and rework things a little so that
> all the attributes are picked out by custom code. It sounds
> like that would match the approach taken elsewhere. Sorry for
> not noticing that earlier.

I see.

That's more like the approach used elsewhere, yes, but in those cases
there wasn't anything (if I recall correctly) that could be usefully
done with the policy parser, so it wasn't considered as an option.  If
the group buckets are different then maybe a different treatment is
warranted.

  reply	other threads:[~2014-10-10 15:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18  1:55 [PATCH/RFC repost 0/8] Open vSwtich ODP Select Group Action Simon Horman
2014-09-18  1:55 ` [PATCH/RFC repost 1/8] odp: select group action attributes Simon Horman
2014-09-18  1:55 ` [PATCH/RFC repost 2/8] netlink: Allow suppression of warnings for duplicate attributes Simon Horman
     [not found]   ` <1411005311-11752-3-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2014-09-26 23:55     ` Ben Pfaff
2014-10-09  1:18       ` [ovs-dev] " Simon Horman
2014-10-10 15:31         ` Ben Pfaff [this message]
2014-09-18  1:55 ` [PATCH/RFC repost 3/8] odp-util: formatting of datapath select group action Simon Horman
     [not found]   ` <1411005311-11752-4-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2014-09-19 13:44     ` Thomas Graf
2014-09-24  4:55       ` Simon Horman
2014-09-18  1:55 ` [PATCH/RFC repost 4/8] datapath: execution of " Simon Horman
     [not found]   ` <1411005311-11752-5-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2014-09-19 14:05     ` Thomas Graf
2014-09-24  6:01       ` Simon Horman
2014-09-24  8:19         ` Thomas Graf
2014-09-25  4:43           ` Simon Horman
2014-09-18  1:55 ` [PATCH/RFC repost 5/8] datapath: Move last_action() helper to datapath.h Simon Horman
     [not found]   ` <1411005311-11752-6-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2014-09-19 14:06     ` Thomas Graf
2014-09-24  6:00       ` Simon Horman
     [not found]         ` <20140924060013.GB13314-IxS8c3vjKQDk1uMJSBkQmQ@public.gmane.org>
2014-09-24  8:20           ` Thomas Graf
2014-09-25  4:42             ` Simon Horman
2014-09-18  1:55 ` [PATCH/RFC repost 6/8] datapath: validation of select group action Simon Horman
2014-09-18  1:55 ` [PATCH/RFC repost 7/8] ofproto: translate datapath " Simon Horman
     [not found]   ` <1411005311-11752-8-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2014-09-26 23:57     ` Ben Pfaff
2014-10-09  1:14       ` [ovs-dev] " Simon Horman
2014-10-13 20:46         ` Ben Pfaff
2014-10-14  4:54           ` Simon Horman
2014-09-18  1:55 ` [PATCH/RFC repost 8/8] hack: ofproto: enable odp select action Simon Horman

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=20141010153126.GC17859@nicira.com \
    --to=blp@nicira$(echo .)com \
    --cc=dev@openvswitch$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=simon.horman@netronome$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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