-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactors Advanced Rings API/Examples #124
Conversation
This code introduces **EXPERIMENTAL** support for NFs that can efficiently run on **shared** CPUs. NFs wait on semaphores when idle and are signaled by the manager when new packets arrive. Once the NF is in wake state, no additional notifications will be sent until it goes back to sleep. All code changes are featurized using INTERRUPT_SEM macro. See the ONVM README.md file for more information and warnings. Commit log: * merges rebased to master with sdnfv#147 * reverting num_clients update. * replace tabs with spaces * Readme describing experimental shared CPU support * Add usage and known limitations for shared CPU code
…fv#185) Fixes a race condition in NF instance ID assignment. Before, if two NFs were started at the same time, they would be assigned the same instance ID. This change modifies logic in `onvm_nf_next_instance_id` to avoid assigning the same ID to two starting NFs. Commit log: * Bug Fix: Fixes instance ID assignment race condition - Fixes sdnfv#178 - Changed incrementation of next_instance_id in onvm_mgr/onvm_nf.c such that the ID can't be reused before an NF becomes active.
…ith onvm_nf struct
…nd flow_tracker). Also did some small style changes in some other documentation in onvm_nflib.h
Conflicts: README.md onvm/onvm_mgr/onvm_init.c onvm/onvm_mgr/onvm_init.h onvm/onvm_mgr/onvm_mgr.h onvm/onvm_mgr/onvm_nf.c onvm/onvm_mgr/onvm_stats.c onvm/onvm_nflib/onvm_common.h onvm/onvm_nflib/onvm_nflib.c onvm/onvm_nflib/onvm_nflib.h
…experimental/shared_cpu
- Some stats were unused and broken(?) nuked them - added stats that are possible usefull to stdout (slightly ugly)
…multithread Conflicts: examples/speed_tester/speed_tester.c
- Keeping onvm_nf_info small, moved vars to onvm_nf - Added a callback function for the scaling child thread - Cleaned up code
- Adds ability to scale NFs with advanced rings - Adds a setup function for NFs - More docs and cleanup
- Moving nf_info as passed arg to packet_handler -> allows for spawned NF to access their own nf_info - Launching new NFs now accepts arguments for packet_handler function, setup function, callback function, advanced rings function - Add a data pointer to onvm_nflib_info to maintain state - Working on a scaling example (currently testing code, not in usable state) will showcase different features of spawning NFs
- This is a major change, a lot of nflib initlization is refactored to allow spawned NFs to launch with their own service id - There is a bug when the spawn a lot of new NFs we can no longer retrieve the nf_info from nf_info_mp, this needs to be fixed as it breaks stuff
- Fixed the nf_info bug where the mempool would get messed up as children weren't cleared properly. - Updated the example scaling NF - Removed most of the debugging code
Cleaned up messy bits, replacing macro branches with if statements, encapsulating code in functions, and getting rid of unnecessary code.
- Style fixes - Removing debug code - Making code prettier - Adding better docs - Implementing requested changes
…o_adv_rings Conflicts: examples/scaling_example/scaling.c examples/speed_tester/speed_tester.c onvm/onvm_nflib/onvm_common.h onvm/onvm_nflib/onvm_nflib.c onvm/onvm_nflib/onvm_nflib.h
@onvm linty lint |
CI MessageYour results will arrive shortly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onvm linty lint
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
❌ Linter Failed (please fix style errors)
[Results from nimbnode30]
- Median TX pps for Speed Tester: 38253812
- Performance rating - 109.30% (compared to 35000000 average)
Linter Output
examples/scaling_example/scaling.c:161: Lines should be <= 120 characters long [whitespace/line_length] [5]
examples/scaling_example/scaling.c:309: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
Total errors found: 2
@onvm gogogo |
CI MessageYour results will arrive shortly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onvm gogogo
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
✔️ Linter passed
[Results from nimbnode30]
- Median TX pps for Speed Tester: 38259380
- Performance rating - 109.31% (compared to 35000000 average)
@dennisafa @kevindweb Check this out if you have time, if shows a clean separation between adv and normal rings(at least it should so comment if this needs any changes). @nks5295 This is good for review now. Updated the description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's PR review day, for me. Success! 13555168mpps for Pktgen, amazing 51877024 with 1 speed tester, dropped to 49639520 and 43844704 after a second was added. 19094944+ when running 2 speed_testers from 1 -d 4
and 4 -d 1
. Approved 👍
@onvm comrade проверь код |
CI MessageYour results will arrive shortly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onvm comrade проверь код
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
✔️ Linter passed
[Results from nimbnode30]
- Median TX pps for Speed Tester: 38243918
- Performance rating - 109.27% (compared to 35000000 average)
…o_adv_rings Conflicts: examples/scaling_example/scaling.c examples/speed_tester/speed_tester.c onvm/onvm_nflib/onvm_nflib.c
@onvm go for it |
CI MessageYour results will arrive shortly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onvm go for it
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
✔️ Linter passed
[Results from nimbnode30]
- Median TX pps for Speed Tester: 38140314
- Performance rating - 108.97% (compared to 35000000 average)
@nks5295 ready for your review 📝 |
Currently the advanced ring support in onvm is not clean, this pr attempts to resolve this.
Summary:
This PR resolves such issues as:
onvm_nflib_start_nf
,onvm_nflib_init_nf_init_cfg
,onvm_nflib_inherit_parent_init_cfg
)Usage:
Merging notes:
TODO before merging :
Test Plan:
Still working on it but primarily we will need to test the scaling NF
Review:
(optional) << @-mention people who should review these changes >>
(optional) Subscribers: << @-mention people who probably care about these changes >>