Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
doc Replace 'snabbswitch' with 'snabb' Mar 31, 2016
neutron2snabb snabbnfv: do not include gbps unit in QoS config options. Oct 26, 2016
neutron_sync_agent Add lib.execv; propagate env vars to children Jul 5, 2017
test_env program/snabbnfv/selftest.sh: move some functions to test_env for reuse Sep 4, 2017
test_fixtures snabbnfv: support deprecated rx_police_gbps and tx_police_gbps. Nov 2, 2016
traffic Fix adaptation of "snabb snabbnfv traffic" to be driver-agnostic Nov 14, 2017
README snabbnfv: Improve --help usage printouts Mar 23, 2015
README.inc Refactor NFV and Neutron functionality into programs/nfv/ Feb 22, 2015
README.md Merge branch 'ipsec' into snabbnfv-traffic-yang Oct 27, 2016
nfvconfig.lua snabbnfv: support deprecated rx_police_gbps and tx_police_gbps. Nov 2, 2016
packetblaster_bench.sh snabbnfv: Added symlink to dpdk_bench.sh for Hydra compatibility. Jul 28, 2016
selftest.sh program/snabbnfv/selftest.sh: move some functions to test_env for reuse Sep 4, 2017
snabb-nfvconfig-v1.yang snabb-nfvconfig-v1.yang: add crypto node. Oct 27, 2016
snabbnfv.lua Clearly mark all Apache 2.0 licensed code as such Feb 19, 2016


NFV config (program.snabbnfv.nfvconfig)

The program.snabbnfv.nfvconfig module implements a Network Functions Virtualization component based on Snabb. It introduces a simple configuration file format to describe NFV configurations which it then compiles to app networks. This NFV component is compatible with OpenStack Neutron.

|{d}   |
| NFV  |         /---------\
| conf |         | App     |
+------+    /--->| network |
   |        |    \-=-------/
   :        :
   v        |
 |{io}        |
 | nfvconfig  |
 |            |

— Function nfvconfig.load file, pci_address, socket_path

Loads the NFV configuration from file and compiles an app network using pci_address and socket_path for the underlying NIC driver and VhostUser apps. Returns the resulting engine configuration.

NFV Configuration Format

The configuration file format understood by program.snabbnfv.nfvconfig is based on Lua expressions. Initially, it contains a list of NFV ports:

return { <port-1>, ..., <port-n> }

Each port is defined by a range of properties which correspond to the configuration parameters of the underlying apps (NIC driver, VhostUser, PcapFilter, RateLimiter, nd_light and SimpleKeyedTunnel):

port := { port_id        = <id>,          -- A unique string
          mac_address    = <mac-address>, -- MAC address as a string
          vlan           = <vlan-id>,     -- ..
          ingress_filter = <filter>,       -- A pcap-filter(7) expression
          egress_filter  = <filter>,       -- ..
          tunnel         = <tunnel-conf>,
          crypto         = <crypto-conf>,
          rx_police      = <n>,           -- Allowed input rate in Gbps
          tx_police      = <n> }          -- Allowed output rate in Gbps

The tunnel section deviates a little from SimpleKeyedTunnel's terminology:

tunnel := { type          = "L2TPv3",     -- The only type (for now)
            local_cookie  = <cookie>,     -- As for SimpleKeyedTunnel
            remote_cookie = <cookie>,     -- ..
            next_hop      = <ip-address>, -- Gateway IP
            local_ip      = <ip-address>, -- ~ `local_address'
            remote_ip     = <ip-address>, -- ~ `remote_address'
            session       = <32bit-int> } -- ~ `session_id'

The crypto section allows configuration of traffic encryption based on apps.ipsec.esp:

crypto := { type          = "esp-aes-128-gcm", -- The only type (for now)
            spi           = <spi>,             -- As for AES128gcm
            transmit_key  = <key>,
            transmit_salt = <salt>,
            receive_key   = <key>,
            receive_salt  = <salt>,
            auditing      = <boolean> }

snabbnfv traffic

The snabbnfv traffic program loads and runs a NFV configuration using program.snabbnfv.nfvconfig. It can be invoked like so:

./snabb snabbnfv traffic <file> <pci-address> <socket-path>

snabbnfv traffic runs the loaded configuration indefinitely and automatically reloads the configuration file if it changes (at most once every second).

snabbnfv neutron2snabb

The snabbnfv neutron2snabb program converts Neutron database CSV dumps to the format used by program.snabbnfv.nfvconfig. For more info see Snabb NFV Architecture. It can be invoked like so:

./snabb snabbnfv neutron2snabb <csv-directory> <output-directory> [<hostname>]

snabbnfv neutron2snabb reads the Neutron configuration csv-directory and translates them to one lib.nfv.conig configuration file per physical network. If hostname is given, it overrides the hostname provided by hostname(1).