-
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
NF pool #240
base: develop
Are you sure you want to change the base?
NF pool #240
Conversation
…elop Merging branch
… files. Structs of prototype NF's
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.
In response to PR creation
CI Message
Run successful see results:
Test took: 3 minutes, 52 seconds
✔️ Pktgen performance check passed
✔️ Speed Test performance check passed
[Results from nimbnode23]
-
Median TX pps for Pktgen: 7739607
Performance rating - 100.51% (compared to 7700000 average) -
Median TX pps for Speed Tester: 42483508
Performance rating - 101.15% (compared to 42000000 average)
have been slammed with work. I'll try to get this improved this coming weekend. |
I know you are all slammed but if you have time give this a look. |
token_len = strlen(token); | ||
cwd = cwd + token_len; | ||
|
||
cwd_len = strlen(cwd); |
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.
I got a compile error on this specific line.
In file included from /usr/include/string.h:495,
from /local/onvm/openNetVM/onvm/onvm_nflib/onvm_includes.h:62,
from /local/onvm/openNetVM/onvm/onvm_nflib/onvm_nflib.c:56:
In function ‘strncat’,
inlined from ‘onvm_nflib_get_go_script_path’ at /local/onvm/openNetVM/onvm/onvm_nflib/onvm_nflib.c:1721:9:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: error: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a
string as its length [-Werror=stringop-truncation]
136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/local/onvm/openNetVM/onvm/onvm_nflib/onvm_nflib.c: In function ‘onvm_nflib_get_go_script_path’:
/local/onvm/openNetVM/onvm/onvm_nflib/onvm_nflib.c:1715:19: note: length computed here
1715 | cwd_len = strlen(cwd);
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
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.
Could you tell me what gcc version this is from? Maybe it's b/c I ran this on an older version of ubuntu.
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.
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
I think you're right, I'm testing on Ubuntu 20. Maybe I can try this on Ubuntu 18.
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.
if we are going to merge this it will need to run on ubuntu20's super strict gcc. @sreyanalla fixed a lot of these errors when porting ONVM so you can check the commit log from that PR if you want to see how to get around it.
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.
@WilliamMaa I just tried compiling and running an example, and it worked fine on Ubuntu 20 with gcc 9.3.0. Is there anything special you did to compile? I didn't get any weird compiler warnings or errors.
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.
@kevindweb I'll try again, I don't think I did anything special.
This PR implements a NF pool API.
Summary:
This PR allows developers to create add and remove NF's from a pool. The pool is a hashmap that maps an NF to a pool context structure, which holds a ring of initialized network functions. Developers can add/remove from the pool by using the enqueue/dequeue function calls. Adding to the pool means instantiating a new NF and storing its NF struct pointer within a ring. Dequeueing will remove from the ring and intialize the network function. When an NF is added to the pool, it is put to sleep on a semaphore. The semaphore is then posted to when a dequeue occurs. This is very similar to the shared core functionality that we already have.
Usage:
I will be uploading a sample NF that shows usage of the pool API. It can be used from any network function, probably one that needs to do loadbalancing or just needs duplicate NF's that must be activated in a time sensitive manner.
Merging notes:
TODO before merging :
Test Plan:
The big thing we need to figure out is how to parse NF args. Right now the enqueue function takes a struct argument that contains args for the NF being instantiated. Im thinking of doing some sort of JSON implementation of this. Discuss below on what you think is best
Review:
Anyone. This is a good chunk of new functionality.