# Last update: 9/7/98, by yhchu This is a preliminary release of the H-FSC scheduler and packet classifier for the NetBSD 1.2 operating system. To compile your kernel: 1. Copy each individual files (or replace them if exist) from our kernel/ directory to your NetBSD source tree. For example: cp -ri kernel/ /usr/src/sys or, if you don't want to be prompted by the copy command, cp -r kernel/ /usr/src/sys Note that the following files are "sample" configuration files, which are included for your reference only. kernel/conf/files.darwin-sample kernel/arch/i386/conf/DARWIN.05 2. Modify your conf/files to include: file pkt_classifier/classifier_classify.c file pkt_classifier/classifier_structure.c file pkt_classifier/cpu_clock.c file pkt_classifier/p5tsc.c file pkt_classifier/monitor.c file pkt_classifier/TCif_io.c file pkt_classifier/classifier_selectdisc.c file hfsc/src/hfsc_queue.c file hfsc/src/hfsc_calheap.c file hfsc/src/hfsc_heap.c file hfsc/src/hfsc_hierarchy.c file hfsc/src/hfsc_sc.c file hfsc/src/interface.c 3. Create a new config file in arch/i386/conf/ and include at the minimum: options BSD_KERNEL options NETBSD options NETBSD12D options PKT_CLASSIFIER options SELECT_DISC You must also choose one of the CPU processor speed. The H-FSC algorithm relies on the functions in pkt_classifier/cpu_clock.c. Set CPU_SPEED depending on the machine your kernel will run on. For example, if you have a Pentium II 266, set CPU_SPEED to options CPU_SPEED=226 To enable multicast for RSVP daemon processing, you need add options MROUTING # RSVP daemon requires mrouted If you want to monitor system performance such as bandwidth sharing and packet delay, include: options PKT_CLASSIFIER_MONITOR You may also want to add the following to increase the amount of mbuf clusters. options NMBCLUSTERS=8192 There are other *_DEBUG flags in the source code that you may define if you wish. For example: options PKT_CLASSIFIER_DEBUG options HFSC_DEBUG 4. Run as root to config a compile directory config 5. cd the compile directory cd ../../compile/ 6. (TRICKY!) Copy the file in kernel/arch/i386/compile/opt_kmemstats.h to your compile directory. 7. In your compile directory, make the kernel make depend;make NOTE: - Current we support the following network drivers for NetBSD 1.2.1: ep (3Com ELink3) de (Zynx) If you have other interface cards, you will have to instrument the device driver (see dev/ic/elink3.c and search for PKT_CLASSIFIER for details), the corresponding output code in net/ (see if_ethersubr.c for an example), modify classifierInit() to include information about your NIC card type and change NUM_INTERFACES to the number of types of interface you have. - There is a Tcl/Tk based GUI that can be used to communicate with the packet classifier. The source code is in app/monitor. The detail is in app/monitor/README. - Any questions, comments or suggestions can be directed to hfsc-comments@cs.cmu.edu