From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netfilter-devel@vger.kernel.org, arnd@arndb.de, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] netfilter: nft_counter: rework atomic dump and reset
Date: Sun, 11 Dec 2016 11:41:17 +0100 [thread overview]
Message-ID: <20161211104117.GA2521@salvia> (raw)
In-Reply-To: <1481384408.4930.210.camel@edumazet-glaptop3.roam.corp.google.com>
On Sat, Dec 10, 2016 at 07:40:08AM -0800, Eric Dumazet wrote:
> On Sat, 2016-12-10 at 15:25 +0100, Pablo Neira Ayuso wrote:
> > On Sat, Dec 10, 2016 at 03:16:55PM +0100, Pablo Neira Ayuso wrote:
> =
> >
> > - nft_counter_fetch(priv, &total, reset);
> > + nft_counter_fetch(priv, &total);
> > + if (reset)
> > + nft_counter_reset(priv, &total);
> >
> > if (nla_put_be64(skb, NFTA_COUNTER_BYTES,
> > cpu_to_be64(total.bytes),
> > NFTA_COUNTER_PAD) ||
>
> Night be nitpicking, but you might reset the stats only if the
> nla_put_be64() succeeded.
Right, I've fixed this in the v2.
> But regardless of this detail, patch looks good and is very close to the
> one I cooked and was about to send this morning.
Thanks a lot!
next prev parent reply other threads:[~2016-12-11 10:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-10 14:05 [PATCH net-next] netfilter: nft_counter: rework atomic dump and reset Pablo Neira Ayuso
2016-12-10 14:16 ` Pablo Neira Ayuso
2016-12-10 14:25 ` Pablo Neira Ayuso
2016-12-10 15:40 ` Eric Dumazet
2016-12-11 10:41 ` Pablo Neira Ayuso [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-12-11 10:43 Pablo Neira Ayuso
2016-12-11 15:02 ` David Miller
2016-12-11 15:13 ` Arnd Bergmann
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=20161211104117.GA2521@salvia \
--to=pablo@netfilter.org \
--cc=arnd@arndb.de \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@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 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.