From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>,
netfilter-devel@vger.kernel.org, fw@strlen.de, eric@garver.life
Subject: Re: [PATCH] netfilter: nf_tables: coalesce multiple notifications into one skbuff
Date: Wed, 2 Sep 2020 16:25:14 +0200 [thread overview]
Message-ID: <20200902142514.GA6210@salvia> (raw)
In-Reply-To: <20200902141639.GD23632@orbyte.nwl.cc>
On Wed, Sep 02, 2020 at 04:16:39PM +0200, Phil Sutter wrote:
> Hi Pablo,
>
> On Thu, Aug 27, 2020 at 07:28:42PM +0200, Pablo Neira Ayuso wrote:
> [...]
> > +static void nft_commit_notify(struct net *net, u32 portid)
> > +{
> > + struct sk_buff *batch_skb = NULL, *nskb, *skb;
> > + unsigned char *data;
> > + int len;
> > +
> > + list_for_each_entry_safe(skb, nskb, &net->nft.notify_list, list) {
> > + if (!batch_skb) {
> > +new_batch:
> > + batch_skb = skb;
> > + NFT_CB(batch_skb).report = NFT_CB(skb).report;
> > + len = NLMSG_GOODSIZE;
>
> This doesn't account for the data in the first skb. After changing the
> line into 'len = NLMSG_GOODSIZE - skb->len;', the reported problem
> disappears and the patch works as expected.
Thanks for narrowing down the problem.
I'll send a v2 including this update.
prev parent reply other threads:[~2020-09-02 14:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 17:28 [PATCH] netfilter: nf_tables: coalesce multiple notifications into one skbuff Pablo Neira Ayuso
2020-08-31 16:36 ` Phil Sutter
2020-09-02 14:16 ` Phil Sutter
2020-09-02 14:25 ` Pablo Neira Ayuso [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=20200902142514.GA6210@salvia \
--to=pablo@netfilter.org \
--cc=eric@garver.life \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/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).