diff options
author | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2016-07-06 09:22:35 +0200 |
---|---|---|
committer | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2016-07-06 16:15:13 +0200 |
commit | 809f08006d56e7ba4ce190b0a63d44acf62d8044 (patch) | |
tree | d93fbe3244ee0cff16a6af830c7efb15c26e5ef4 /tools | |
parent | b8ce7c38b99df118002fb460e680fabf16944f6c (diff) |
Imported Upstream version 16.07-rc1
Change-Id: If3f757dc95532706b04053286c6b54492169f1a3
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/dpdk_nic_bind.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py index 28eace33..b69ca2a0 100755 --- a/tools/dpdk_nic_bind.py +++ b/tools/dpdk_nic_bind.py @@ -38,8 +38,8 @@ import getopt import subprocess from os.path import exists, abspath, dirname, basename -# The PCI device class for ETHERNET devices -ETHERNET_CLASS = "0200" +# The PCI base class for NETWORK devices +NETWORK_BASE_CLASS = "02" # global dict ethernet devices present. Dictionary indexed by PCI address. # Each device within this is itself a dictionary of device properties @@ -248,7 +248,7 @@ def get_nic_details(): dev_lines = check_output(["lspci", "-Dvmmn"]).splitlines() for dev_line in dev_lines: if (len(dev_line) == 0): - if dev["Class"] == ETHERNET_CLASS: + if dev["Class"][0:2] == NETWORK_BASE_CLASS: # convert device and vendor ids to numbers, then add to global dev["Vendor"] = int(dev["Vendor"], 16) dev["Device"] = int(dev["Device"], 16) |