[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Porting and Extending a TCP/IP noise simulator from kernel 2.2.x to2.4.x
- To: <linux-il(at-nospam)linux.org.il>
- Subject: Porting and Extending a TCP/IP noise simulator from kernel 2.2.x to2.4.x
- From: Shlomi Fish <shlomif(at-nospam)techst02.technion.ac.il>
- Date: Thu, 19 Jul 2001 04:35:27 +0300 (EEST)
- Delivered-To: linux.org.il-linux-il@linux.org.il
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
Hi!
I decided to take a Technion project for during the summer semester which
involves the Linux kernel. Let me describe it and then ask some questions:
During a previous semester two other students wrote a patch to the 2.2.x
kernel (which was the dominant kernel back then) to simulate TCP/IP
network noise. By that I mean lost packets, delays, etc.
Now, the patch was not maintained since then, and now we have kernel 2.4.x
and 2.5.x is in planning. Not only that, but my job will be to extend the
simulator so that it will be possible to define specific noise behaviour.
I.e: if a packet arrives from host X it should be lost with a probability
of 0.2, but host Y originating packets should not be lost (which is not
possible with the older patch). Also, we don't have a written SPEC yet (my
partner still has some tests due) but we were also thinking of
implementing an interpreter for Markovian chains there.
I have several questions:
1. Is the Networking and TCP/IP stack of kernel 2.4.x very different
internally from that of kernel 2.2.x? From what I understood it was
modified to support multi-threaded processes, but I'm more interested to
know if the code remained pretty much the same.
That way, we can still re-use some of the existing code of the previous
patch.
2. What I thought was to implement some of the noise logic as a patch to
the kernel, while implementing the arbitrator of it as a separate module.
During the previous project, the whole thing was implemented as a patch
and they had to reboot constantly.
My question is: can the logic that decides whether to drop, ruin, or how
much time to delay a packet, can be implemented as a separate module that
will communicate with the main kernel somehow?
For instance, there is an IP firewalling module - how does it communicate
with the kernel?
>From what I understood from Moshe Bar's lecture, sometimes even kernel
modules must be distributed under the GPL. While the source code of the
entire project will be available on the web for sure (that's the
Technion's policy for such projects), I'd like to distribute the
arbitrator under a more liberal license such as PD or MIT X11. Can I do
that?
3. I'd like to use kernel debuggers like SGI's kdb and Personal ICE
(http://pice.sourceforge.net/) to aid in analysing errors. I know they are
not distributed with the kernel of Linus, but I suppose they can be
applied quite easily.
Assuming the main kernel (which has both or one of the debuggers compiled
into it) has an OOPS fault, will they allow me to diagnose it?
Furthermore, can I have a breakpoint set by specifying a LILO or loadlin
kernel arguments so I can trace it from there?
BTW, I realize Linus Torvalds hates kernel debuggers, but I'm actually
fond of debuggers in general. The last project depended on printk()'s
which is a much more inconvenient way of debugging.
4. Naturally, to test the module, I'll need to simulate network activity. I
can do that with actual packets that arrive from different machine (or
from two different Ethernet cards on the same computer - %-)) but I could
also build an internal virtual network, and do some manipulations there.
Or could I? I think depending on packets that arrive from the hardware at
the early stages of the project is a bad idea<tm>, because kernel
programming is bad enough without messing with the hardware. Naturally, we
will make sure it works with various hardware, but can we postpone it to
later stages? Should we do that?
5. Simulating network noise may be of interst to Comp. Net. researchers
and Net-Admins world-wide. For instance: can MOSIX or Beowulf work with
this patch installed on one or more of the clusers' computers? I'd like to
find out.
So, what do you recommend regarding the issue of whether or not it should
be integrated into the main kernel? I think the patch to the kernel should
be #ifdef'd because delaying, ruining, or dropping packets deliberately is
something most people don't want to enable.
Now, Linus objected to the MOSIX code be integrated into the kernel that
way, so I don't know if he'll accept such patch. I guess I'll have to ask
him. Of course, the patch can be maintained vis-a-vis with the kernel
source (like MOSIX), but it would be a better idea if it is in the Linus'
source tree.
6.
Do you recommend joining or monitoring the linux-kernel mailing list. I
know the amount of daily messages there is very big, much more than all
the other mailing-list I am a member of. I could request a bigger quota to
accomodate for it, but I'll probably press the "D" button maniacly.
There are various web resources that summarize the activity there. I read
the Linux Weekly News' kernel section, but it's a relatively short
summary. It recommends other resources such as "Kernel Traffic", but do
they beat reading the actual mailing list? Also, are there are other
mailing lists of significance for kernel developers?
-------------
Sorry for the long post, but there are a lot of things I needed to know.
TIA,
Shlomi Fish
----------------------------------------------------------------------
Shlomi Fish shlomif@t2.technion.ac.il
Home Page: http://t2.technion.ac.il/~shlomif/
Home E-mail: shlomif@techie.com
A more experienced programmer does not make less bugs. He just realizes
what went wrong more quickly.
=================================================================
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