-
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
Add check for validating ports #205
Conversation
This PR releases OpenNetVM v19.05
This PR adds the following bug fix to the master branch: [Bug Fix] Fix Typo in Console Stats Header (sdnfv#142)
[Bug Fix] Fix Stats Header in Release Notes (sdnfv#145)
This PR releases OpenNetVM v19.07
This PR adds the a few bugfixes and features, this is not a full release.
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:
✔️ PR submitted to develop branch
✔️ Linter passed
The script stops the user only when they specify a port value which is greater than the number of NICs bound. Additionally, gives a warning when the port value of 0 is used. Does this look good? Let me know if any changes are required. |
I seem to have incorrectly based my branch off of master instead of develop. I'll create another PR if that's an issue. |
Thanks for making this so quickly. |
Ah forgot about that. I could modify it to check through all network devices instead of just those in the variable but that doesn't seem elegant. Do you have anything in mind? |
Here is a command I think would work ./dpdk-devbind.py --status-dev net | sed '/Network devices using kernel driver/q' This will only output the interfaces bound to dpdk, and stops outputting when we get to the kernel drivers. We can just grep to find a specific device, or count how many devices are bound. |
That's neat. Modifying the same to just count the number of times 'drv' appears would give us our required output.
This should now give the number of network devices using dpdk compatible driver and can be directly compared with the portmask given. Does that sound good? |
Sorry for the delay. I've updated the checking condition. I hope the messages displayed are fine. |
Thanks for updating. |
Thanks for pointing that out. I'll remove Should I update |
I would leave other parts of the script. It's not horrible, we just want to do it for the future updates, and to reduce the amount of testing you should just update your code if you can. |
Looks good, I will have to update CI before we test this, because CI runs go.sh without the correct number of ports I think. |
Okay. Thanks for immediate responses! |
Let's try this @onvm |
CI MessageYour results will arrive shortly |
Does this look good? |
I've also updated the function name to make it more readable. I'd used |
onvm/onvm_nflib/onvm_common.h
Outdated
rte_eth_macaddr_get(port_id, mac_addr); | ||
return 0; | ||
} else { | ||
onvm_get_fake_macaddr(mac_addr); |
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 think that we can remove this part of the function. My idea is that onvm_get_macaddr is just checking for a valid port and fetching the macaddr for that port on success, return -1 otherwise. I don't think we should call onvm_get_fake_macaddr here. We should modify the NF's to decide whether or not they need a fake mac addr on their own.
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.
Oh okay got it. So, speed_tester and scaling should use onvm_get_fake_macaddr
? But they do take in a dst MAC in which case it would be good to try to get a real address for the source but can settle for a fake address. Or do we go along the lines that if a fake address is sufficient, then we needn't bother to fetch the real address?
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 think the qn is whether returning the fake MAC address is an extra burden to be vary of. Otherwise, the return value denotes the status and the user can decide what to do with the address they received. Let me know what you guys think. I hope I'm not missing something.
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.
Dennis' comment and mine too, after that I think it looks good otherwise.
Hate to be that guy again but can you remove the speed_tester port extern line? I'll test and approve once you do. |
Co-Authored-By: Kevin Deems <kevin8deems@gmail.com>
Nothing to say for missing that a third time 😅 |
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.
looking good, just a few small fixes and should be good to merge
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.
Looks good to me, thanks Rohit.
Thanks for the careful reviews! |
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.
Just tested with multiple speed_tester, load_generator, and scaling on shared core mode as well as without. The port check on go.sh works well, tested on two different machines with and without NICs bound. Thanks for getting these changes updated so quickly, great work!
@onvm sanity check? |
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 sanity check?
CI Message
Run successful see results:
Test took: 5 minutes, 42 seconds
✔️ PR submitted to develop branch
✔️ Pktgen performance check passed
✔️ Speed Test performance check passed
✔️ Linter passed
[Results from nimbnode23]
-
Median TX pps for Pktgen: 7729371
Performance rating - 100.38% (compared to 7700000 average) -
Median TX pps for Speed Tester: 42215643
Performance rating - 100.51% (compared to 42000000 average)
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.
Also tested the new changes, looks good!
@@ -52,6 +52,13 @@ then | |||
usage | |||
fi | |||
|
|||
ports_detected=$("$RTE_SDK"/usertools/dpdk-devbind.py --status-dev net | sed '/Network devices using kernel driver/q' | grep -c "drv") | |||
if [[ $ports_detected -lt $ports ]] |
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.
@rohit-mp @kevindweb I think this might be a bug since $ports
represents the port mask while $ports_detected
is the number of network devices using DPDK-compatible driver. Please correct me if I am wrong.
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.
Yes, you are right. Sorry for the mistake on my part. This bug is being tracked in issue #228 at the moment.
Added a simple check in
onvm/go.sh
to validate the given port mask.Closes #139
Summary:
Usage:
Merging notes:
TODO before merging :
Test Plan:
Review:
@kevindweb
(optional) Subscribers: << @-mention people who probably care about these changes >>