From: Simon Horman <simon.horman@netronome.com>
To: David Miller <davem@davemloft.net>
Cc: john.fastabend@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH/RFC rocker-net-next 1/6] net: flow: Cancel innermost nested attribute first
Date: Tue, 6 Jan 2015 10:03:21 +0900 [thread overview]
Message-ID: <20150106010319.GA14077@vergenet.net> (raw)
In-Reply-To: <20150105.161725.1765207203472571760.davem@davemloft.net>
On Mon, Jan 05, 2015 at 04:17:25PM -0500, David Miller wrote:
> From: Simon Horman <simon.horman@netronome.com>
> Date: Mon, 5 Jan 2015 15:50:05 +0900
>
> > Cancel innermost nested attribute first on error when putting flow actions.
> >
> > Signed-off-by: Simon Horman <simon.horman@netronome.com>
> >
> > ---
> >
> > Its unclear to me if this makes any difference.
> > But it seems more logical to me.
>
> Hmmm. Be careful here. nla_nest_cancel() is just rolling back
> the length of the SKB to right before the netlink attribute being
> given as the cancellation point.
>
> So you really have to cancel attributes in exactly the reverse order
> in which they were added. Otherwise we'll make a trim call with a
> negative adjustment that actually expands the SKB past an already
> cancelled attribute.
Thanks for clarifying that.
The aim of my patch is to perform the roll back in reverse order
which I now know is required.
next prev parent reply other threads:[~2015-01-06 1:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 6:50 [PATCH/RFC rocker-net-next 0/6] net: flow: Minor fixes and cleanups Simon Horman
2015-01-05 6:50 ` [PATCH/RFC rocker-net-next 1/6] net: flow: Cancel innermost nested attribute first Simon Horman
2015-01-05 21:17 ` David Miller
2015-01-05 22:01 ` Thomas Graf
2015-01-05 22:10 ` David Miller
2015-01-06 1:03 ` Simon Horman [this message]
2015-01-05 6:50 ` [PATCH/RFC rocker-net-next 2/6] net: flow: Handle error when putting a field while putting a flow Simon Horman
2015-01-05 17:28 ` John Fastabend
2015-01-06 1:04 ` Simon Horman
2015-01-05 6:50 ` [PATCH/RFC rocker-net-next 3/6] net: flow: Remove unnecessary zero-header check when " Simon Horman
2015-01-05 6:50 ` [PATCH/RFC rocker-net-next 4/6] net: flow: free action args Simon Horman
2015-01-05 6:50 ` [PATCH/RFC rocker-net-next 5/6] net: flow: Return more fine-grained error when handing flows commands Simon Horman
2015-01-05 6:50 ` [PATCH/RFC rocker-net-next 6/6] net: flow: Limit checking of ndo_flow_{set,del}_flows Simon Horman
2015-01-05 17:32 ` John Fastabend
2015-01-06 1:07 ` 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=20150106010319.GA14077@vergenet.net \
--to=simon.horman@netronome.com \
--cc=davem@davemloft.net \
--cc=john.fastabend@gmail.com \
--cc=netdev@vger.kernel.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).