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

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

 



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.

-- 
Regards,
Changli Gao(xiaosuo@xxxxxxxxx)
--
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