Closed dennisafa closed 5 years ago
In response to PR creation
Your results will arrive shortly
Does the current code call the hash create functions in a secondary process? Does this mean that our current flow table code just doesn't work?
@twood02 yes currently it's called from secondary process, it works but dpdk says that it's not okay. And I think currently it can have issues with a secondary process running on a different cpu socket or something along those libes
yes. also when created from a secondary process hash_create sporadically fails and throw a rte_hash_create failed: could not create hash table
Lgtm, do we have a NF that uses the flow table so we can test this?
yes, flow_tracker uses it. a pktgen sanity check would be ideal
So just so I'm on the same page, instead of calling rte_hash_create from the subprocess here you are enqueueing a message so that our main thread picks it up and creates it (because dpdk doesn't like subprocesses creating)?
Before you get back to me, I did performance test everything, Pktgen looks solid, did a few shared core speed_tester extreme tests as well and it looked clean.
So just so I'm on the same page, instead of calling rte_hash_create from the subprocess here you are enqueueing a message so that our main thread picks it up and creates it (because dpdk doesn't like subprocesses creating)?
yea. if rte_hash_create is called from a secondary process, manager (primary process) will create it via this message system. RTE_PROC_TYPE
tells us what kind of process it is.
@onvm CI before improve
@onvm CI before improve
Your results will arrive shortly
As pointed out by @koolzz, we should only call rte_hash_create() from the primary process. NF's would call onvm_ft_create() and call rte_hash_create() as a secondary process, which DPDK does not allow
Summary:
When onvm_ft_create is called, whether from an NF or the manager, we now check what process type it is being called from with rte_eal_process_type() If it's a secondary process (called from an NF) then we'll make the manager initialize our hash_table using a mechanism that is similar to @AaronCoplan 's firewall LPM request method.
Usage: Run the manager, then run any NF that calls onvm_ft_create. flow_tracker is one example.
Merging notes:
TODO before merging :
Test Plan:
Run the manager, then run the flow_tracker or the load_balancer NF and test its functionality.
Review:
@koolzz @kevindweb