sdnfv / openNetVM

A high performance container-based NFV platform from GW and UCR.
http://sdnfv.github.io/onvm/
Other
263 stars 135 forks source link

Manager go.sh port mask incorrectly counting ports available #228

Closed EthanBaron14 closed 4 years ago

EthanBaron14 commented 4 years ago

Bug Report

Current Behavior When running go.sh for the manager, the check on line 57 compares the raw hexadecimal port mask passed in to the number of NICs available to run the manager on.

Expected behavior/code When running go.sh for the manager, the check on line 57 should convert the hexadecimal port mask passed in to binary then compare the number of '1' digits to the number of NICs available to run the manager on.

Steps to reproduce Run go.sh with similar syntax to the following:

./go.sh 0,1,2 3 0xF8 -s stdout

While ensuring that the third positional argument represents more than one port, e.g. 3.

Environment

Possible Solution

Will convert the hexadecimal port mask to binary then count the number of '1' digits to determine the number of ports that we compare to.

EthanBaron14 commented 4 years ago

This is a high priority issue as it dramatically impact the performance of the manager in release 20.05. Accordingly, I'll try to get this done within the next few hours so it can be tested and merged into 20.05 before EoW.

BuzzRage commented 4 years ago

Hi, I think I had the same problem. This line ( onvm/go.sh line 56 ) probably don't have the expected behavior:

ports_detected=$("$RTE_SDK"/usertools/dpdk-devbind.py --status-dev net | sed '/Network devices using kernel driver/q' | grep -c "drv")

when you remove the sed command, everything works fine.

EthanBaron14 commented 4 years ago

This is fixed in PR #229.