CS 686 PROJECT #1 Due: 7:30pm Thursday 03/13/08 This project acquaints students with essential hardware programming details for implementing one of the significant technology advances that has accompanied the advent of gigabit-speed ethernet controllers. PROBLEM STATEMENT Modify the source-code for our 'nic.c' character-mode device-driver (from our CS686 course website) so that it will support the transmission and reception of so-called "jumbo" network frames (packets which contain up to 9000 bytes of data, in addition to the usual ethernet "header" and frame-checksum). The terminology that Intel uses for this capability in its Gbe Open Source Software Developers Manual is 'long packet' mode (on page 381, for example, regarding the LPRE-bit in the RCTL register). DISCUSSION We were easily able to confirm that our 'nic.c' device-driver could support the transmission and reception of small-size ethernet packets by using the standard UNIX commands 'echo' and 'cat', like this: RECEIVING STATION SENDING STATION $ cat /dev/nic $ echo Hello > /dev/nic Hello $ _ But you will not be able to verify that your modified 'nic.c' driver can successfully support your sending and receiving of jumbo-size packets by using these familiar UNIX commands because they rely upon memory-buffers whose size is limited to 4KB. When you want to test the ability of your driver's 'write()' and 'read()' functions to handle ethernet frames that contain 9000 bytes of data, you will need to write your own application- programs to take the place of the UNIX 'echo' and 'cat' commands. There also is the issue of creating a 9000-byte data-packet to be transmitted, since you would not be able to enter that many keystrokes as a program's command-line argument. You would want to build your data-packet in such a way that it could be easily checked whether all of its bytes have been correctly transferred from sender to receiver. REFERENCE Intel, "PCIe* GbE Controllers Open Source Software Developer's Manual" online at: WHAT TO SUBMIT Your project-submission has two required parts: (1) a printout of your source-files (i.e., your modified 'nic.c' device-driver module, plus the application-programs that you create for use in 'testing' your modified device-driver); (2) electronic versions of ALL of your project-files (i.e., your compiled 'nic.ko' kernel-object file as well as your 'nic.c' source file, plus compiled executable files that you created for testing your driver as well as their source-files; Use our 'ljpages' utility-program (under 'System Software' on our cs686 website) to produce your printouts (be sure each one shows YOUR NAME as the project's programmer). Turn in those printouts to the instructor's mailbox (Mathematics Office: Harney-222), or bring to the class meeting at 7:30pm on Thursday, March 13, 2008. And for the electronic versions of your project's files, copy each file to your '/submit' directory: Example: $ cp nic.c /home/submit/cs686//. ________________________________________________________________________ Allan B. Cruse University of San Francisco Spring 2008