sdnfv / openNetVM

A high performance container-based NFV platform from GW and UCR.
http://sdnfv.github.io/onvm/
Other
261 stars 134 forks source link

L3switch(l3fwd) #243

Closed bdevierno1 closed 2 years ago

bdevierno1 commented 4 years ago

Layer 3 forwarding application.

Summary:

Based on DPDK's layer 3 forwarding example. There are two modes longest prefix match table as well as hash table lookup. There are a few differences between this version and DPDK's. Use of openNetVM's flow API was broadly used. This allows data to be stored with each rule or flow when added to the table. This is in contrast to DPDK's version where it uses the key value to get an index. The index value is then used to perform a lookup in an array.

Usage: -p : number of packets between each print, e.g. -p 1 prints every packets. Default is every 1000000 packets. -e : Enables exact match mode. -h : Sets the hash entry number.

For example: ./go.sh 1 -e -h 7

Will enable exact match mode with hash entry number set to 7. Hash entry number will default to 4 if not manually set or not running in exact match mode.

This PR includes
Resolves issues
Breaking API changes
Internal API changes
Usability improvements
Bug fixes
New functionality
New NF/onvm_mgr args 👍
Changes to starting NFs
Dependency updates
Web stats updates

Merging notes:

TODO before merging :

Test Plan:

Use Pktgen. Configure the src and destination address to match your desired flow. Check if traffic is correctly sent out of the correct port.

Review:

NF Checklist:

bdevierno1 commented 3 years ago

Updated hash pointers to be global variables instead after @sreyanalla review. Originally used nf->data but this will be freed by the manager upon NF shutdown therefore it would not be possible to deallocate hash table memory. Thanks @sreyanalla

twood02 commented 3 years ago

@sreyanalla will test again