NetFPGA ======= https://github.com/NetFPGA/netfpga/wiki/InstallSoftware#minimal-install-without-yum fix references to lsmod, ifconfig etc. from /sbin/ to /usr/bin/ in /usr/local/sbin/cpci_reprogram.pl and other perl scripts referenced therein. (Or set up appropriate links) insert /usr/local/sbin/cpci_reprogram.pl --all into /etc/rc.local To build bitstreams from source, Xilinx ISE is needed, and core "IP"s need to be licensed from Xilinx, depending on what proprietary modules are used in the hardware designs, such as PCI and Ethernet l2/l3 cores. These licenses can be obtained on a trial or a paid basis. Xilinx: ISE Foundation, Version: 10.1 (included on disc) - Install Service Pack 3 - Install IP Update 3 - Obtain a license for the V2Pro TEMAC core from Xilinx (DO-DI-TEMAC, Ver 3.3) - Obtain a license for the PCI32 core. DO-DI-PCI32 Using netfpga git repo: Add $(LDFLAGS) on the end of the .o make rules for those projects that error, for instance: show_stats.c:96: more undefined references to `printw’. (Software makefiles). Modify the major and minor version numbers in each /lib/project.xml file to Major 2 Minor 3 for NetFPGA v2.1 rev3. reg_defines_*.h are files generated by nf_register_gen.pl on a per project basis and depends on the version numbers in project.xml to be set properly. Fix a broken reference for the register file in projects/add_registers_nic/sw/counterdump.c Make a symbolic link to netfpga directory in /usr/local: sudo ln -s ~/netfpga /usr/local/netfpga cd to a project's synth directory and run make to build it (takes a long time if cores are built first time.) This does the entire physical synthesis and puts the bitfile in ~/netfpga/bitfiles. To download a bitfile onto the hardware: sudo nf_download ~/netfpga/bitfiles/selftest.bit To see the current hardware downloaded: nf_info Some projects will have a software interface or tools under /sw that need to be individually make'd. to run selftest, connect ports 0-1 and 2-3 together and connect a SATA loop cable and run the following *AS ROOT* (if not, DMA will fail): sudo ~netfpga/projects/selftest/sw/selftest -c -c is continuous, -n wont test SATA loop (if you dont have it connected) Note: the hardware ports are very sensitive and may have loss until the cables are reinserted or wiggled. OpenFlow Switch =============== Following: http://www.openflow.org/wk/index.php/CentOS_NetFPGA_Install Obtain netfpga openflow_switch project (into ~/netfpga/projects/): https://docs.google.com/file/d/0B4EuVzA5UdPRX1hrX0l4NDMtWUE/edit Obtain and build userspace software following this guide Steps 1-2 (~/openflow dir): http://www.openflow.org/wp/deploy-labsetup/#3_2_Setup_OpenFlow_Switch_on_Net - use stanford openflow.git on branch origin/devel/tyabe/1.0.0-netfpga - guide says to download the openflow_switch bitfile - replace with our own. To bring up (as root/sudo): nf_download ~/netfpga/bitfiles/openflow_switch.bit ofdatapath punix:/var/run/test -i nf2c0,nf2c1,nf2c2,nf2c3 & ofprotocol unix:/var/run/test tcp:127.0.0.1 & (using localhost controller here) Can then use dpctl like so: dpctl dump-flows unix:/var/run/test UPDATE: Working fine on main pc. Don't need a prebuilt openflow_switch.bit, no openflow *.ko's necessary: not part of openflow 1.0 datapaths - only older versions used the kernel-mode datapath. Openflow needs to be configured hwtable_nf2 etc. Still dont know why it doesnt work on netbook: TODO: wireshark, regression tests etc. Maybe obtain a 4-port NIC to do this. Complete mystery why my netbook is unable to connect through the netfpga openflow switch. Exact same settings and daemons as the Dell, except the Dell connects fine. Maybe some hello message failing or something. Stopped caring about the netbook problem. NetFPGA bandwidth measurements ============================== (All 1GbE NICs, tested with iperf over 120s in a 2-host 1-switch configuration where appropriate) Theoretical link speed: 1Gb/s NetFPGA reference_switch (h1-s-h2): 937 937/937 +-0.5Mb/s NetFPGA openflow_switch (localhost pox controller): 933/930 937/928 928/927 925/929 : avg=930 +-6Mb/s NetFPGA openflow_switch (in-band pox controller): 937/937 924/930 928/928 : avg=931 noteworthy: these appear to be descreasing slightly with the number of tests performed without resetting the switch - could be some leakage or remnants of old test flows clogging up. noteworthy: ping times with openflow_switch have regular (30 second intervals) spikes from ~0.1ms->40ms implying strange flow timeouts and controller referrals: rtt min/avg/max/mdev = 0.052/1.000/51.756/5.387 ms Investigating this, the flow timeouts are obtained during the test like so: root@netfpga:/home/george# dpctl dump-flows unix:/var/run/test stats_reply (xid=0xc36ab690): flags=none type=1(flow) cookie=0, duration_sec=23s, duration_nsec=793000000s, table_id=0, priority=65535, n_packets=227285, n_bytes=15000818, idle_timeout=10,hard_timeout=30,tcp,in_port=2,dl_vlan=0xffff,dl_vlan_pcp=0x00,dl_src=00:23:ae:95:04:88,dl_dst=00:23:ae:5e:7d:c4,nw_src=192.168.1.199,nw_dst=192.168.1.198,nw_tos=0x00,tp_src=5001,tp_dst=51673,actions=output:1 cookie=0, duration_sec=23s, duration_nsec=795000000s, table_id=0, priority=65535, n_packets=1895311, n_bytes=2868974974, idle_timeout=10,hard_timeout=30,tcp,in_port=1,dl_vlan=0xffff,dl_vlan_pcp=0x00,dl_src=00:23:ae:5e:7d:c4,dl_dst=00:23:ae:95:04:88,nw_src=192.168.1.198,nw_dst=192.168.1.199,nw_tos=0x00,tp_src=51673,tp_dst=5001,actions=output:2 As evident, the default flow hard-timeout of 30s is used, and explains the spikes. These spikes are quite high for a controller referral, but aren't too surprising given the python software controller, and tcp controller interface. Also, during b/w tests, ofdatapath warns: ...|datapath|WARN|Dropped 345 messages in last 1 seconds due to excessive rate Which isn't unexpected in a bandwidth test. dpctl benchmark unix:/var/run/test for NetFPGA openflow_switch: root@netfpga:/home/george/netfpga# dpctl benchmark unix:/var/run/test 1000 100000 Sending 100000 packets * 1008 bytes (with header) = 100800000 bytes total Finished in 1371.1 ms (72932 packets/s) (73515576 bytes/s) ... ... over ten times: avg=73,497,879.2 bytes/s = 73.5MB/s = 588Mb/s Try with differently built ofdatapath and ofprotocol setups: * without enable_hw_tables. Expected: software tables used -> slower performance. Actual result: complete lookup failures, degenerating into a hub with every packet being referred to controller and flooded -> 294/227 290/226 (asymetric speeds, very slow b/w) * --enable-ndebug "Disable debugging features for max performance" (see if this actually makes a difference in b/w and controller referral (probably only make a difference in the datapath benchmark - use dpctl) NetFPGA OpenFlow Switch Regression tests ======================================== Following: http://www.openflow.org/wk/index.php/CentOS_NetFPGA_Install#Install_Regression_Suite and: /regress/INSTALL Install perl modules (find latest version of the 404'ing links on cpan.) Some more perl modules will come up missing so get them from the netfpga libs: sudo ln -s ~/netfpga/lib/Perl5/* ~/openflow/regress/lib/Perl5 source /regress/scripts/env_vars in /etc/bash.bashrc for root user to see environment variables like NF_ROOT. change openflow/regress/bin/nf2.map to your actual NIC's interface names (on rhs) kill avahi-daemon echo 'options ipv6 disable=1' > /etc/modprobe.d/disable-ipv6.conf /etc/default/ufw IPV6=yes change to no as root: /regress/bin/of_nf2_setup.pl --map=nf2.map /regress/bin/of_nf2_test.pl --map=nf2.map