All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Heinz <creatix@hipac.org>
To: netfilter-devel@lists.netfilter.org
Subject: "Atomic" snapshot of counters
Date: Fri, 24 Jan 2003 01:35:00 +0100	[thread overview]
Message-ID: <3E308A34.4020501@hipac.org> (raw)

Hi

Netfilter produces an atomic snapshot of counters, i.e. the table is
locked during the gathering of the counter values. Of course no packet
is matched while this lock is active.

How important is it to have such an atomic snapshot? The reason why
I'm asking this question is because Michael and I intend to implement
the nf-hipac rule listing (and especially the counter gathering)
mechanism in a way that it does not interrupt the packet matching.
This obviously implies that the counter snapshot cannot be atomic and
is therefore inaccurate in some way.
For example consider a chain A containing two rules x and y.
Now we fix the counter value of x and just before fixing the counter
value of y a packet matching x and y is processed. This packet would
only appear in the counter for y but not in the one for x.

Does this really matter or is it in fact unimportant because the error
is very marginal compared to the absolute counter values (not to forget
the performance gain).

Thanks for your rating.


Regards,

Thomas

             reply	other threads:[~2003-01-24  0:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-24  0:35 Thomas Heinz [this message]
2003-01-31 11:45 ` "Atomic" snapshot of counters Harald Welte
2003-01-31 23:28   ` Thomas Heinz

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=3E308A34.4020501@hipac.org \
    --to=creatix@hipac.org \
    --cc=netfilter-devel@lists.netfilter.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.