All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luciano Coelho <luciano.coelho@nokia.com>
To: ext Jan Engelhardt <jengelh@medozas.de>
Cc: ext Changli Gao <xiaosuo@gmail.com>,
	"netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>,
	Patrick McHardy <kaber@trash.net>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [RFC] setting up throughput threshold indications to userspace
Date: Tue, 17 Aug 2010 08:27:59 +0300	[thread overview]
Message-ID: <1282022879.1773.7.camel@powerslave> (raw)
In-Reply-To: <alpine.LSU.2.01.1008161714260.9026@obet.zrqbmnf.qr>

On Mon, 2010-08-16 at 17:19 +0200, ext Jan Engelhardt wrote:
> On Monday 2010-08-16 16:01, Luciano Coelho wrote:
> >> You can implement a daemon: which samples the statistics data of NIC
> >> periodically, calculates the average bandwidth in a period, and change
> >> the condition variables accordingly.
> >
> >We don't want to use polling from userspace.  That's the reason why we
> >decided to use iptables instead.  The idea is that we will only notify
> >the userspace when the throughput crosses the threshold line.  And the
> >rules I defined above are working rather well, except for this "detail"
> >that the BELOW signal is not sent when there's no data flowing.
> 
> Without data, the turing machine won't finish, so you can't say for
> sure that you reached below. That is sort of a halting problem, which
> is known to be unsolvable.

Yes, that's the theoretical way to put it.  :) In practice I see that
without data the rules won't be traversed and therefore we can't make
any rate calculations.

But if I add an idletimer (which uses a timer to trigger execution,
regardless of the availability of packets to process) with a timeout
equal to the estimator's measurement averaging interval (ewmalog), I can
be sure that the rate went to 0 bps if the timer expires.  Ie. no
packets at all during the measurement interval means 0 bps, right?

-- 
Cheers,
Luca.


  reply	other threads:[~2010-08-17  5:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-16  8:20 [RFC] setting up throughput threshold indications to userspace Luciano Coelho
2010-07-16 13:01 ` Patrick McHardy
2010-07-16 13:10   ` Luciano Coelho
2010-07-16 19:27     ` Jan Engelhardt
2010-07-19  5:30       ` Luciano Coelho
2010-08-16 13:40         ` Luciano Coelho
2010-08-16 13:51           ` Changli Gao
2010-08-16 14:01             ` Luciano Coelho
2010-08-16 14:13               ` Changli Gao
2010-08-16 14:26                 ` Luciano Coelho
2010-08-16 15:19               ` Jan Engelhardt
2010-08-17  5:27                 ` Luciano Coelho [this message]
2010-08-16 14:26           ` Changli Gao
2010-08-16 14:32             ` Luciano Coelho

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=1282022879.1773.7.camel@powerslave \
    --to=luciano.coelho@nokia.com \
    --cc=jengelh@medozas.de \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=sameo@linux.intel.com \
    --cc=xiaosuo@gmail.com \
    /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.