OpenFlowNetFPGA1 0 0
From OpenFlow Wiki
OpenFlow-NetFPGA March, 2010
OpenFlow-NetFPGA is an OpenFlow reference switch with hardware acceleration by NetFPGA. This implementation is a set of NetFPGA hardware and its accompanying software (ofdatapath with NetFPGA handling functions).
NetFPGA hardware handles data forwarding with header field modifications. It has one exact match table with 32768 entries and one wildcard match table with 24 entries.
The accompanying software has a role of 'ofdatapah'. Regular reference switch has one hash table and one linear table, but this software also has 'nf2' table, a copy of NetFPGA hardware tables(exact match table + wildcard match table). It first tries to write to nf2 table, and if the requested actions are not supported by NetFPGA or if it exceeds the maximum entries, it then writes the entry to either the hash table or the linear table, depending on whether it is wildcarded or not.
It communicates with the same 'ofprotocol' as in the reference switch.
Overlooking the design (Difference from the previous version)
The basic structure is the same as the previous version. In order to comply with OpenFlow1.0 spec, following have been done:
- Increase one matching field (for IP ToS)
- Support ARP matching
- Support all the modify actions including IP ToS modification with checksum recalculation
There is a drastic change from the previous version. Before 1.0, we had a separate kernel module to handle NetFPGA called 'hardware_table', and the module was hooked to a kernel space version of ofdatapth. In 1.0, NetFPGA handler is incorporated in a user space version of ofdatapath and therefore it resides in user space. It communicates with generic NetFPGA driver residing in kernel space to:
- Read from/write to NetFPGA registers/tables
- Utilize netdevice structure when it forwards packets between CPU and NetFPGA(packet_in/packet_out)
The process is almost the same as the one to compile the reference switch. The only difference is to add an option when you perform 'configure'. Instead of doing:
now you perform:
After doing make, you can get ofdatapath which includes NetFPGA related functions.
New directory structure related to the NetFPGA design is as follows:
<openflow> ` |-- include | `-- openflow |-- lib |-- udatapath `-- hw-lib `-- nf2
Modifications and additions to the code
Modifications to the reference switch codes
Note: All the modifications should not be affecting the reference switch.
1) Changed existing automake-related setting files
- Added options for 'configure' so as to specify the hardware platform. If the option is not specified, the environment will be configured for compiling the (software) reference switch.
<openflow> ` |-- acinclude.m4 |-- Makefile.am `-- udatapath `-- automake.mk
2) Changed codes in udatapath
- Added functions to handle a hardware table and hardware ports for supporting platforms
Note: Modifications are activated with compiler options, so they are valid only when hardware platform has been specified while configure.
<openflow> `-- udatapath ` |-- chain.c |-- datapath.c |-- of_ext_msg.c |-- udatapath.c `-- some header files
All the files inside:
<openflow> `-- hw-lib `-- nf2
Main roles of the nf2 library are:
- nf2 table, representing NetFPGA hardware table. The function is equivalent to user space tables. This is the interface to datapath.
- Interpreter between NetFPGA bitmaps and software structs
- Interface to kernel space NetFPGA driver
Limitation and assumption
- Slicing feature is not supported.
- Priority among the wildcard entries is not supported.
- All the four NetFPGA ports need to be assigned as OpenFlow ports.
Status (for internal use)
- NetFPGA simulation -- done
- NetFPGA regression test -- done
- OpenFlow regression test (latest set of test cases) -- done
- OpenFlow new regression-test-in-process -- (prep) done
- Get code review -- done
- Deploy in our group's OF1.0 topology for a week -- on going
- Installation wiki for NetFPGA release -- done
- CentOS installation verification -- done
- Installation wiki for OpenFlow release -- (prep) done
- Merge in the main OpenFlow branch -- done
- NetFPGA release package creation -- done