[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TCP/IP noise simulator cont.
- To: Gilad Ben-Yossef <gilad(at-nospam)benyossef.com>
- Subject: Re: TCP/IP noise simulator cont.
- From: Shlomo Matichin <shlomom(at-nospam)cs.huji.ac.il>
- Date: Thu, 2 Aug 2001 10:41:13 +0300 (IDT)
- cc: Shlomi Fish <shlomif(at-nospam)techst02.technion.ac.il>, <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <3B690094.6050905@benyossef.com>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
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