Closed bdevierno1 closed 2 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
@sreyanalla will test again
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. : Sets the hash entry number.
-p 1
prints every packets. Default is every 1000000 packets. -e : Enables exact match mode. -hFor 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.
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:
nf->data
function_table->setup
function and frees dynamic memory before exiting