From: Harald Welte <laforge@netfilter.org>
To: jamal <hadi@cyberus.ca>
Cc: sandr8@crocetta.org, devik@cdi.cz, netdev@oss.sgi.com,
netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH 2/4] deferred drop, __parent workaround, reshape_fail
Date: Mon, 16 Aug 2004 09:35:30 +0200 [thread overview]
Message-ID: <20040816073530.GI15418@sunbeam2> (raw)
In-Reply-To: <1092518370.2876.3.camel@jzny.localdomain>
[-- Attachment #1: Type: text/plain, Size: 3725 bytes --]
On Sat, Aug 14, 2004 at 05:21:31PM -0400, jamal wrote:
> > the conntrack stuff (actually that little part of code that adds
> > unbilling to ACCT in case of a drop) is something that comes later
> > (patch 4) and is not in the pkt sched part. please, don't let it
> > divert your mind from the real point. just forget it for the moment...
> > [in any case it is _not_ in the pkt sched area and as i said in mail
> > 4/4 i don't like to put the variables into dev.c, that's why i am
> > there asking for alternatives]
>
> This actually seems to be the core issue.
> Correct me if i misunderstood what you are trying to achieve:
> Somewhere above, the netfilter code bills some packet. Packet gets
> all the way to the scheduler on egress.
> Scheduler drops packet although it has been billed already.
> You being a man looking for justice ;-> decides that was unfair and
> you are trying to undo it. Is this accurate?
Yes, that's how I understoo Allesandro's efforts. While I don't think
it's worth being that precise (and rather change the definition of what
is being accounted to 'number of packets/bytes recevived in this flow').
> Also is their a corrective factor that happens once the _accounting_
> data has been shipped? Example:
> - account for packet
> - ship accounting data to some billing server
> - oops, unbill
> - what now?
Yes, this is a race condition. However, I don't this is not very likely
to occurr, since the accounting data is by default only sent to
userspace via ctnetlink once the connection tracking entry is deleted.
Yes, you can read it while the connection is still alive, but this will
not reset/update the counters, but rather give you a current snapshot.
If you send this to your accounting server, the accounting server has to
cope with the fact that this intermediate snapshot can be updated by
some later data. It SHOULD not care whether this later data for the
same flow has bigger or smaller byte/packet counters. [and
it is very unlikely that the total will be lower, since then in the
timeframe [snapshot, terminations] more packets have to be dropped than
accepted. Still, if this is documented with ctnetlink I'm perfectly
fine which such behaviour.
> BTW, what happens if you clone the packet below netfilter and send
> several copies of it possibly over several different interfaces? This
> may happen with tc extensions.
oh yes, I think somebody has written a similar iptables target, too. I'm
not sure whether there is a good solution for the 'unbill' feature. Do
you have any thoughts/recommendations for this?
> I think accounting is important - especially if it is almost free with
> contracking.
Totally agreed.
The reason for not delaying accounting update until qdisc has happened
is locking. Then we would have to re-grab the conntrack write lock to
make the counter update... whrereas in my patch counter updates happen
while we are already under write lock for the timer/timeout update.
> Lets talk about this issue first instead of confusing it with everything
> else you have in other patches.
Also, if this 'unbill' feature gets into the kernel in some form, I
would definitely make it a CONFIG_ or sysctl... after all people could
be interested in the Rx side only...
> cheers,
> jamal
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-08-16 7:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-13 0:48 [PATCH 2/4] deferred drop, __parent workaround, reshape_fail sandr8
2004-08-13 12:51 ` jamal
2004-08-13 14:09 ` sandr8
2004-08-14 21:21 ` jamal
2004-08-16 7:35 ` Harald Welte [this message]
2004-08-16 13:29 ` jamal
2004-08-24 18:57 ` Harald Welte
2004-08-25 12:12 ` jamal
2004-08-16 7:20 ` Harald Welte
2004-08-16 13:00 ` jamal
2004-08-16 13:08 ` Harald Welte
2004-08-16 15:19 ` sandr8
2004-08-17 11:52 ` jamal
2004-08-17 13:40 ` [PATCH 2/4] deferred drop, __parent workaround, reshape_fail , netdev@oss.sgi.com , sandr8
2004-08-22 15:17 ` Billing 1: WAS (Re: " jamal
2004-08-23 9:33 ` sandr8
2004-08-24 18:38 ` Harald Welte
2004-08-22 15:38 ` Billing 2: WAS(Re: " jamal
2004-08-22 16:12 ` Billing 3: " jamal
2004-08-23 9:39 ` sandr8
2004-08-23 11:38 ` Billing 3-1: " jamal
2004-08-23 12:04 ` sandr8
2004-08-23 12:31 ` jamal
2004-08-23 11:58 ` Billing 3: " jamal
2004-08-23 12:27 ` sandr8
2004-08-25 11:34 ` jamal
2004-08-23 12:15 ` Billing 3-3: " jamal
2004-08-24 18:46 ` Billing 3: " Harald Welte
2004-08-25 11:50 ` jamal
2004-08-17 13:49 ` [PATCH 2/4] deferred drop, __parent workaround, reshape_fail sandr8
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=20040816073530.GI15418@sunbeam2 \
--to=laforge@netfilter.org \
--cc=devik@cdi.cz \
--cc=hadi@cyberus.ca \
--cc=netdev@oss.sgi.com \
--cc=netfilter-devel@lists.netfilter.org \
--cc=sandr8@crocetta.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).