Re: [RFC] setting up throughput threshold indications to userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2010-08-16 at 16:13 +0200, ext Changli Gao wrote:
> On Mon, Aug 16, 2010 at 10:01 PM, Luciano Coelho
> <luciano.coelho@xxxxxxxxx> wrote:
> > On Mon, 2010-08-16 at 15:51 +0200, ext Changli Gao 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.
> >
> 
> There is a daemon watching the ABOVE signal in any way. How about
> staring a timer, which is used to check if there is no packet
> transfered in a period, in this daemon when receiving the ABOVE
> signal, and stopping this timer when receiving the BELOW signal? It is
> like the implementation of IDLETIMER in user space.

Yeah, we do have a daemon listening to it.  This idea is actually good
and might work.  As you say, it's very similar to IDLETIMER, but in
userspace.  I'll ask our userspace guy which one he prefers to use (ie.
either making the timer himself, or listening to IDLETIMER's sysfs
indication).

Of course, it is also possible to implement a netfilter interface for
the idletimer target as well (as Samuel has already suggested), so that
dependencies in userspace would be simplified. ;)


-- 
Cheers,
Luca.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux