On Mon, 2010-08-16 at 16:26 +0200, ext Changli Gao wrote: > On Mon, Aug 16, 2010 at 9:40 PM, Luciano Coelho > <luciano.coelho@xxxxxxxxx> wrote: > > Does anyone have an idea on how I could solve this problem? > > > > I have been considering using the IDLETIMER target and activate it when > > the throughput goes to HIGH. Then if this timer expires, it would > > inform the userspace that now there's no data going through. But this > > sounds very artificial to me and will add one more dependency on the > > userspace, since the IDLETIMER is using sysfs to inform userspace, > > instead of netlink. > > > > Read the code of IDLETIMER again, and I notice that IDLETIMER will > wake up all the sleepers on the corresponding sysfs files. So no > polling is needed, what you need do is watching another files for > read. You can use select/poll/epoll. It should be no very difficult. Yes, I know. I have reworked the IDLETIMER for upstream inclusion, so I should know this after all. ;) It was just the idea of having the daemon have one more interface with the kernel that seemed a bit ugly... -- 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