Changes between Version 29 and Version 30 of Internal/OpenFlow/Notes


Ignore:
Timestamp:
Feb 11, 2010, 9:50:35 PM (14 years ago)
Author:
ssugrim
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/Notes

    v29 v30  
    611611
    612612
     613=== Hacked in notes for Installing the Open flow capabilities on the NetFpga ===
     614''' FIXME: Please put me in the correct place '''
     615
     616'''Prequisite packages'''
     617 * autoconf
     618 * libtool
     619 * pkg-config
     620 * linux-source (2.6.28)
     621
     622Following the instructions of [http://www.openflowswitch.org/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup Labsetup]
     623we cloned the 0.8.9 branch of the their git repository, I'll include the steps because their pages don't stay up very long.
     624
     625{{{
     626 $ git clone git://openflowswitch.org/openflow.git
     627 $ cd openflow
     628 $ git checkout -b openflow_089_rev4 origin/release/0.8.9
     629}}}
     630
     631Assuming all the prerequisites are installed, the next step is to compile the source. We're trying to make two kernel objects, and a bit file for the netfpga.
     632
     633{{{
     634 $ ./boot.sh
     635 $ ./configure --with-l26=/lib/modules/`uname -r`/ --enable-hw-tables=nf2 
     636 $ make
     637}}}
     638
     639boot.sh will fail to run if the listed prerequisites are not installed (there may be more preqs based on what was installed prior, build-tools, kernel headers, etc...).
     640
     641The original configure line read "./configure --with-l26=--with-l26=/lib/modules/`uname -r`/build --enable-hw-tables=nf2", while the extra --with-l26 is an obvious error, there are others. The configure script stuffs the argument of --wtih-l26 into a $path variable, then looks for the subdirectories $path/build and $path/source. Specifying --with-l26 as ../`uname -r`/build causes configure to fail, since there is no source directory in the build directory. Instead what they wanted was the directory 1 level up.
     642
     643In our first attempt we just ran make and went on to the next step, however when we tried to insert the modules one of them failed. The problem was with the ofdatapath_netfpga.ko module. When we tried to insert it (with insmod) it would complain about a missing symbol.
     644Dmesg would show an even every time you tried to insert the module that said
     645
     646{{{
     647WARNING: "nf2k_reg_read"
     648WARNING: "nf2k_reg$ ./boot.sh
     649}}}
     650
     651Consulting a reference from the Stanford [$ https://mailman.stanford.edu/pipermail/openflow-discuss/2009-January/000051.html mailing list] on netfpga, we determined that the Module.symvers file needed to be edited. We needed to copy the entries from the ~/NF2/lib/c/kernel/Modules.symvers into the ~/openflow/datapath/linux-2.6/Modules.symvers. The NF2 directory comes from two tar files:
     652 * netfpga_base_beta_2_0_0_0.tar.gz
     653 * netfpga_openflow_switch.0_8_9-1.tar.gz - This file was chosen to match the version of the Netfpga openflow source we're compling.
     654Making this change produces the bits files and modules that will be needed in the next section.
     655
     656After a sucessfull complie we needed to load the openflow bitfile onto the netfpga
     657{{{
     658 # cpci_reprogram.pl
     659 # nf2_download ~/openflow/datapath/hwtable_nf2/openflow_switch.bit
     660}}}
     661
     662The actual paths may vary but the basic process is the same. This is fairly straight forward assuming the netfpga tools were already built.
     663
     664Once that was done we inserted the modules (required root privileges)
     665{{{
     666# /sbin/insmod ./openflow/datapath/linux-2.6/ofdatapath.ko
     667# /sbin/insmod ./openflow/datapath/linux-2.6/ofdatapath_netfpga.ko
     668}}}
     669
     670At this point we're ready to try testing the netfpga as a open flow switch. I'm going to pause here and rearrange the networks that the specfic netfpgas belong to.
     671
    613672[[BR]]
    614673[[BR]]