OpenFlowNetFPGA1 0 0

From OpenFlow Wiki

Revision as of 21:22, 24 August 2010 by Tyabe (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

OpenFlow-NetFPGA March, 2010

Contents

What

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)

1) Hardware

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

2) Software

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)

Making Executable

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:

./configure

now you perform:

./configure --enable-hw-lib=nf2

After doing make, you can get ofdatapath which includes NetFPGA related functions.

Inside software

Directory structure

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

Additional code

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)

  1. NetFPGA simulation -- done
  2. NetFPGA regression test -- done
  3. OpenFlow regression test (latest set of test cases) -- done
  4. OpenFlow new regression-test-in-process -- (prep) done
  5. Get code review -- done
  6. Deploy in our group's OF1.0 topology for a week -- on going
  7. Installation wiki for NetFPGA release -- done
  8. CentOS installation verification -- done
  9. Installation wiki for OpenFlow release -- (prep) done
  10. Merge in the main OpenFlow branch -- done
  11. NetFPGA release package creation -- done