Changes between Version 8 and Version 9 of GENIEducation/SampleAssignments/TcpAssignment/ExerciseLayout/KernelModv2


Ignore:
Timestamp:
12/10/13 15:51:51 (6 years ago)
Author:
sedwards@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/SampleAssignments/TcpAssignment/ExerciseLayout/KernelModv2

    v8 v9  
    1313 exclude=mkinitrd* kernel*
    1414 }}}
    15  in the file ''/etc/yum.conf'', to allow yum to install kernel headers.
     15 in the file `/etc/yum.conf`, to allow yum to install kernel headers.
    1616}}}
    1717 1. Install the required packages with this command:
     
    2020 }}}
    2121 2. Fix up the kernel version in the installed headers to match the running kernel; this can be tricky, but these steps should handle it.
    22   (a) Find your kernel sources. They are in ''/usr/src/kernels'', in a directory that depends on the installed version. As of the time this handout was created, that directory is ''2.6.43.8-1.fc15.i686''. We will call this directory ''$KERNELSRC''.
    23   (b) Identify your running kernel version by running ''uname -r''. It will be something like ''2.6.40-4.emulab2.fc15.i686.PAE''. The first three dotted components (''2.6.40'', in this case) are the major, minor, and micro versions, respectively, and the remainder of the version string (''-4.emulab2.fc15.i686.PAE'') is the extraversion. Note the extraversion of your kernel.
    24   (c) In''$KERNELSRC/Makefile'',find the line beginning with ''EXTRAVERSION''. Replace its value with the extraversion of your kernel.  FIXME: Also update ''PATCHLEVEL = 0''.
     22  (a) Find your kernel sources. They are in `/usr/src/kernels`, in a directory that depends on the installed version. As of the time this handout was created, that directory is `2.6.43.8-1.fc15.i686`. We will call this directory `$KERNELSRC`.
     23  (b) Identify your running kernel version by running `uname -r`. It will be something like `2.6.40-4.emulab2.fc15.i686.PAE`. The first three dotted components (`2.6.40`, in this case) are the major, minor, and micro versions, respectively, and the remainder of the version string (`-4.emulab2.fc15.i686.PAE`) is the extraversion. Note the extraversion of your kernel.
     24  (c) In`$KERNELSRC/Makefile`,find the line beginning with `EXTRAVERSION`. Replace its value with the extraversion of your kernel.  FIXME: Also update `PATCHLEVEL = 0`.
    2525  (d) Update the kernel header tree to this new version by running the command:
    2626{{{
     
    3131 A Makefile for compiling the module and the source for a stub TCP congestion control module are included in [http://www.gpolab.bbn.com/experiment-support/TCPExampleExperiment/Makefile Makefile]. [[BR]]
    3232 The module is named tcp exp (for experimental TCP), and the congestion control algorithm is named exp. Comments in the provided source file explain the relationship between the various functions, and more information can be found in [http://lwn.net/Articles/128681/ Pluggable congestion avoidance modules]. [[BR]]
    33  The compiled module (which is built with make and called ''tcp_exp.ko'') can be inserted into the kernel using ''insmod''. It can be removed using the command ''rmmod tcp_exp'' and reloaded with ''insmod'' if changes are required. [[BR]]
    34  Once the module is complete and loaded into the kernel, the algorithm implemented by the module can be selected in the same manner that reno and cubic were selected in previous exercises, by placing the keyword exp in ''/proc/sys/net/ipv4/tcp_congestion_control''.
     33 The compiled module (which is built with make and called `tcp_exp.ko`) can be inserted into the kernel using `insmod`. It can be removed using the command `rmmod tcp_exp` and reloaded with `insmod` if changes are required. [[BR]]
     34 Once the module is complete and loaded into the kernel, the algorithm implemented by the module can be selected in the same manner that reno and cubic were selected in previous exercises, by placing the keyword exp in `/proc/sys/net/ipv4/tcp_congestion_control`.
    3535 
    3636 '''3.5.1 Algorithm Requirements''' [[BR]]
     
    4242 These hints and suggestions may help you get started. [[BR]]
    4343 * Use `wget` to download `Makefile` and `tcp_exp.c` onto your node.
    44  * The existing congestion avoidance modules are a good start. See ''net/ipv4/tcpcong.c'' in the Linux source for the Linux Reno implementation.[[BR]]
    45  * The file ''net/ipv4/tcp_input.c'' is a good place to learn how the congestion avoidance modules are used and invoked.[[BR]]
     44 * The existing congestion avoidance modules are a good start. See `net/ipv4/tcpcong.c` in the Linux source for the Linux Reno implementation.[[BR]]
     45 * The file `net/ipv4/tcp_input.c` is a good place to learn how the congestion avoidance modules are used and invoked.[[BR]]
    4646 * [http://tools.ietf.org/html/rfc5681 RFC 5681] specifies the Reno congestion control actions in detail, and may be helpful in understanding the kernel code.[[BR]]
    47  * The Linux Cross Reference at ''http://lxr.linux.no/linux'' may be useful for navigating and understanding how the code fits together.[[BR]]
     47 * The Linux Cross Reference at `http://lxr.linux.no/linux` may be useful for navigating and understanding how the code fits together.[[BR]]
    4848 * If one of the hosts becomes unresponsive due to a bug in your congestion control module, you can restart the sliver to reboot it.[[BR]]
    4949 * [http://tldp.org/LDP/lkmpg/2.6/html. The Linux Kernel Module Programming Guide] provides a good introduction to kernel module programming in general.[[BR]]