-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NF-side TX: Moving TX thread logic to nflib (#215)
This change adds the ability for NFs to directly pass packets to other NFs, bypassing the TX threads which used to do this. **This is now the new default means of transmitting packets between NFs.** By moving TX thread logic to the NF side onvm can run with fewer cores, improving efficiency. TX threads still send packets out the NIC, but NFs primarily do packet passing. In our tests this improves throughput in the speed tester NF from 20 Mpps to 41 Mpps by eliminating the enqueue/dequeue to the TX thread. To make this change, functions related to moving packets and mapping service IDs to instance IDs are moved to nflib and placed in a common file. Because both manager and NF use these functions and because they need some of the same info, a new struct was created called `queue_mgr`. Most common packet functions accept a `queue_mgr` and check the `mgr_type_t` field to distinguish manager threads from NFs, which is useful for handling packets headed out the NIC. If a user would like to run onvm with TX threads handling packet passing, they must set NF_HANDLE_TX to 0 in onvm_common.h Commit Log: * Merge onvm NF (client) stats - Remove stats from onvm_mgr client struct - Move all stats to onvm_nflib client_stats - Change all occurrences of old stats usage to new structure * Move NF(client) details to nflib side - Group together NF details and stats - NF details are stored in memzone - Advanced NFs can now get all the NF(client) details by calling onvm_get_client(int id) * Added in-progress changes to remove TX threads. * Implement Nick's changes for testing purposes * Empty message * Reset pkt_buf count to zero upon successful bulk equeue * Implemented stats functionality * Implement changes with client details * Put in a new function the logic for NFs to give packets to TX threads. Also fixed a bug where the NFs wouldn't check for a valid receiving NF. * Changed dequeue function to return number of pckts * Attempted fix for real packets * Small fixes, improvments * Fix wrong method call * Bug fixes, small changes - Works with real traffic now * Small fixes, improvments - Renamed client_details to clients - Moved extern clients to mgr side - Updated speed tester to reference new structure * Exposing nf_enq functions to nflib side * Added flush_all_nfs to shared * Start writing the code for common packet functions. Ideally we could use onvm_pkt_common_process_tx_batch for both NFs and TX threads. * Place pkt functions in common file to be shared between manager and nfs. Also change the structure of pkt functions to deal with `onvm_tx_info rather than `thread_info` or `nf_tx_info`. * Fix compilation issues. To do: fix linker issues. * Fixed linker error. NFs do not work. * Fixed spots where variables were local instead of pointing to global data. Still need to flush the NFs regularly. * Fixed bug where to_tx_buf wouldn't reset if pkts were dropped. * Change name from onvm_tx_info to queue_mgr. Moved nf_tx_mgr out of shared memory. * More name changes. Comment cleanup, spacing fixes. * spacing, typo fix * Fixed spacing issues. * Use tabs instead of spaces * Remove unnecessary commented code. * Fix names for queue manager's enum and make buffering in nflib_run more clear. * Refactor code for `queue_mgr` name changes. * Update license year * Change Hewlett Packard reference in license to include 2016
- Loading branch information
Showing
75 changed files
with
842 additions
and
622 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.