All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Heinz <creatix@hipac.org>
To: Harald Welte <laforge@gnumonks.org>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: "Atomic" snapshot of counters
Date: Sat, 01 Feb 2003 00:28:21 +0100	[thread overview]
Message-ID: <3E3B0695.1070808@hipac.org> (raw)
In-Reply-To: 20030131114514.GT9073@naboo.cybercafe42

Hi Harald

Thanks for your comment.

You wrote:
>>How important is it to have such an atomic snapshot? 
> 
> From my current point of view: not that important.  My pkt_tables plans
> [which are meant to eventually replace ip_tables] also don't have this
> atomicity anymore.

Well, Michael and I had some discussion about the counter issue.
Finally, we decided to implement atomic counters but without freezing
the packet matching. We're using two counter pairs per rule. One is
a kind of overflow counter which is used after a snapshot has been
requested, i.e. all packets being machted after the snapshot has been
requested are added to the second counter. After the rules are delivered
to user space the counter pairs are "fixed", i.e. the second counter
is added to the first one and set to 0 afterwards.

This is simple. The more complicated part is based on the fact that an
insert or delete operation which appears sort of "atomic" to the user
might be expanded to several hipac rules on the kernel side.
But we also found a solution for this issue that does not require
stopping the packet matching.

BTW another topic: I've just read that you don't consider the
netfilter-devel mailing list the right place for gtk-iptables
announcements. In the past, Michael and I also posted announcements
about nf-hipac to netfilter-devel (and netfilter user mailing list) :-)
We did so because we thought (and still believe :) that nf-hipac
might be interesting for netfilter developers too (especially the
next version which will include generic support for iptables
targets/matches and user-defined chains).

Just drop us a line if you think that upcoming nf-hipac announcements
should not be posted to netfilter-devel. This is not a problem or
whatsoever ;-)


Regards,

Thomas

      reply	other threads:[~2003-01-31 23:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-24  0:35 "Atomic" snapshot of counters Thomas Heinz
2003-01-31 11:45 ` Harald Welte
2003-01-31 23:28   ` Thomas Heinz [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=3E3B0695.1070808@hipac.org \
    --to=creatix@hipac.org \
    --cc=laforge@gnumonks.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.