netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Netfilter Development Mailinglist
	<netfilter-devel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	Jesper Dangaard Brouer <hawk@diku.dk>
Subject: Re: [RFC] netfilter: get rid of atomic ops in fast path
Date: Thu, 17 Mar 2011 11:39:01 +0100	[thread overview]
Message-ID: <4D81E4C5.5060009@trash.net> (raw)
In-Reply-To: <1300302005.3202.23.camel@edumazet-laptop>

Am 16.03.2011 20:00, schrieb Eric Dumazet:
> We currently use a percpu spinlock to 'protect' rule bytes/packets
> counters, after various attempts to use RCU instead.
> 
> Lately we added a seqlock so that get_counters() can run without
> blocking BH or 'writers'. But we really use the seqcount in it.
> 
> Spinlock itself is only locked by the current cpu, so we can remove it
> completely.
> 
> This cleanups api, using correct 'writer' vs 'reader' semantic.
> 
> At replace time, the get_counters() call makes sure all cpus are done
> using the old table.
> 
> We could probably avoid blocking BH (we currently block them in xmit
> path), but thats a different topic ;)
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
> This is a POC patch (based on net-next-2.6), only handling ip_tables.
> ip6/arp/... need similar changes.

Thanks Eric, this looks good to me.

      parent reply	other threads:[~2011-03-17 10:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 19:00 [RFC] netfilter: get rid of atomic ops in fast path Eric Dumazet
2011-03-16 20:16 ` David Miller
2011-03-17 10:35   ` [PATCH] netfilter: xtables: fix reentrancy Eric Dumazet
2011-03-17 11:36     ` Jesper Dangaard Brouer
2011-03-17 11:45       ` Eric Dumazet
2011-03-17 13:17         ` Eric Dumazet
2011-03-18 10:27           ` Jesper Dangaard Brouer
2011-03-18 10:50             ` Eric Dumazet
2011-03-17 10:39 ` Patrick McHardy [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=4D81E4C5.5060009@trash.net \
    --to=kaber@trash.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hawk@diku.dk \
    --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 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).