
JHally at epnet
Jan 12, 2006, 2:16 PM
Post #6 of 9
(2767 views)
Permalink
|
Great! I made it work a little differently though. Will send my notes when I can clean them up Thanks! -----Original Message----- From: ntop-misc-bounces [at] listgateway [mailto:ntop-misc-bounces [at] listgateway] On Behalf Of Johnson, Neil M Sent: Thursday, January 12, 2006 1:17 PM To: ntop-misc [at] listgateway Subject: RE: [Ntop-misc] PF_RING Here's what I documented. PF_RING on FC4 ? - Install FC4 - Install FC4 updates - Download running FC4 kernel SOURCE rpm from your favorite Fedora mirror (unname -r will give you version) - install with rpm -Uvh kernel-<version>.src.rpm - Prep kernel (add redhat patches): cd /usr/src/redhat/SPECS rpmbuild -bp --target $(arch) kernel-2.6.spec - Move kernel to /usr/src cd /usr/src/redhat/BUILD/kernel-<version> mv linux-<version> /usr/src cd /usr/src ln -s ./linux-<version> linux cd /usr/src/linux - Download PF_RING (CVS Checkout) edit mkpatch.sh so version equals generic kernel version from above run mkpatch.sh move patch file to /usr/src run zcat <patchfile> | patch --dry-run -p0 to test run zcat <patchfile> | patch -p0 cd linux make menuconfig Enbable PF_RING under Networking options. make bzImage && make modules_install make install (to install kernel in /boot) edit /etc/modprobe.conf add "ring" to list to autoload module. reboot and pray ! - Build new libpcap Get version 0.8.1 of libpcap (google and look for one on source forge). Expand in dir <...>/PF_RING/userland/ copy files listed in <..>/PF_RING/userland/libpcap.0.8.1-ring/README to libpcap-0.8.1 copy ring.h file from PF_RING/kernel...../ to /usr/include/linux run ./configure and make to build libpcap.0.8.1 go into pcount and compile and run to check. copy libpcap.a to /usr/lib and pcap.h /usr/include. Compile nProbe. Data on the way ? ######################################################## -- Neil Johnson Network Engineering Group Information Technology Services University of Iowa (319) 384-0938 (Desk) (319) 330-2235 (Cell) (319) 341-6838 (Pager) GPG Public Key available upon request. -----Original Message----- From: ntop-misc-bounces [at] listgateway [mailto:ntop-misc-bounces [at] listgateway] On Behalf Of Brad Doctor Sent: Thursday, January 12, 2006 11:40 AM To: ntop-misc [at] listgateway Subject: Re: [Ntop-misc] PF_RING The process does create a patch file, which is really the ultimate goal of running mkpatch.sh. In your case that file is here (from your email): /usr/local/src/PF_RING/PF_RING/workspace/linux-2.6.15-1-686-smp-ring3.pa tch.gz So what you could then do is take this patch and apply it to your kernel source. Or if you are packaging a kernel via RPM you can specify this as a Patch and apply it automatically. Definitely not required to build from this location though. Hope this works for you! If not, let us know and we will get you through it. -brad > Yes, but after running the mkpatch script I'm left with > linux-2.6.15-1-686-smp-ring3 in the ./workspace directory. I went ahead and > ran make menuconfig and the pf_ring selection is there, and it seems to > compile ok. > > I'm assuming that this is indeed a patched kernel source as it seems to > compile and run ok (minus the panic in my other email). I'm curious if this > is the case and it's just not updated in the docs. > > Is that the case? > > >From the output below in steps 3,4,5,6 I'm lead to believe that the kernel > source is indeed patched and goes ahead and creates the patch file for later > use maybe? > > Mkpatch.sh output: > > Untarring Linux sources (read-write tree) in > /usr/local/src/PF_RING/PF_RING/workspace/linux-2.6.15-1-686-smp-ring3 > Patching Linux sources ... > 1. Install additional file include/linux/ring.h with definitions > for packet ring. > done > 2. Install the ring sources under the kernel tree. > Installing kernel ring sources in > linux-2.6.15-1-686-smp-ring3/net/ring ... done > 3. Patch net/core/dev.c ... > Patch #1 (define ring_handler) > Patch #2 (modify function netif_rx and netif_receive_skb) > Patch #3 (modify dev_queue_xmit, found in PATCH-3-to-dev.c) > ... done > 4. Patching file net/Makefile ... done > 5. Copy net/ring/Kconfig to linux-2.6.15-1-686-smp-ring3/net/ring/Kconfig > done > 6. Patching file net/Kconfig ... done > rmdir: `linux-2.6.15-1-686-smp-ring3/linux-2.6.15': Directory not empty > diff --unified --recursive --new-file linux-2.6.15 > linux-2.6.15-1-686-smp-ring3 > linux-2.6.15-1-686-smp-ring3.patch > Making Linux patch file. This could take some time, please wait ... done > Your patch file is now in > /usr/local/src/PF_RING/PF_RING/workspace/linux-2.6.15-1-686-smp-ring3.pa tch. > gz > > > > > > -----Original Message----- > From: ntop-misc-bounces [at] listgateway > [mailto:ntop-misc-bounces [at] listgateway] On Behalf Of Brad Doctor > Sent: Thursday, January 12, 2006 11:27 AM > To: ntop-misc [at] listgateway > Subject: Re: [Ntop-misc] PF_RING > > PF_RING is a kernel patch and you are required to patch the kernel and build > a new one. > > -brad > > > Hello All, > > > > > > I recently downloaded PR_RING and went through the install. One thing I > > noticed is that after modifying the mkpatch.sh script, it looks as though > it > > goes out, grabs the kernel version, downloads and patches the src for you, > > dumping it off in kernel-version-ring3. It looks like you can just go in > > and compile this src and not have to patch anything, correct? From the > docs > > it looks as though you have to go ahead and patch the kernel src. Which > is > > correct? > > > > > > Thanks. > > _______________________________________________ > > Ntop-misc mailing list > > Ntop-misc [at] listgateway > > http://listgateway.unipi.it/mailman/listinfo/ntop-misc > > > > -- > Brad Doctor, CISSP > _______________________________________________ > Ntop-misc mailing list > Ntop-misc [at] listgateway > http://listgateway.unipi.it/mailman/listinfo/ntop-misc > _______________________________________________ > Ntop-misc mailing list > Ntop-misc [at] listgateway > http://listgateway.unipi.it/mailman/listinfo/ntop-misc > -- Brad Doctor, CISSP _______________________________________________ Ntop-misc mailing list Ntop-misc [at] listgateway http://listgateway.unipi.it/mailman/listinfo/ntop-misc _______________________________________________ Ntop-misc mailing list Ntop-misc [at] listgateway http://listgateway.unipi.it/mailman/listinfo/ntop-misc _______________________________________________ Ntop-misc mailing list Ntop-misc [at] listgateway http://listgateway.unipi.it/mailman/listinfo/ntop-misc
|