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

Re: TCP/IP noise simulator cont.



hi Gilad,

|  Shlomi Fish wrote:
|
|  > This letter addresses two issues regarding my TCP/IP noise simulator
|  > project:
|  >
|  > 1. I set up a mailing-list to discuss it. To subscribe send an empty
|  > message to ip-noise-subscribe@iglu.org.il .
|  >
|  > 2. I wish to know how I can "grab traffic using firewalling rules from
|  > kernel mode out into user mode" and there decide what to do with the
|  > packet (namely, let it go on, drop it or delay it). OmerM showed me an
|  > example of how to do a very simple thing like that using a kernel module,
|  > but I also like to know how to do it in a user-mod
|
|  as someone already pointed out the best answer is QUEUE target of
|  Iptables (or use netlink socket).
|
|  BUT, are you sure that's what you want to do? sending packets back and
|  forth from kernel space to luser space is very inefficient becuase of
|  the context switches that must occur for this to happen. This is very
|  unscalable.

The netfilter development team claim that this is not so. I personnaly
think they are full of it, but they say the loss is about 5% in packet
rate.

As for context switches, know that the packets are moved into user space
by means of file I/O. this means that: a. buffering of several packets
might save redundent context switches b. if you don't change the packet, a
simple ioctl marks the kernel to accept the packet.

also, since all packets are processed in interrupt context (soft irq),
there's a switch per packet anyways.

regards,
Shlomo.

-- 
-------------------------------------------
Shlomo Matichin       shlomom@cs.huji.ac.il
The Mosix Group               www.mosix.org


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il