X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=tools%2Fdpdk_nic_bind.py;h=b69ca2a0dbdbf2fb98ead9ba679089ca33184bcc;hb=17450351fff8cc63624c0ab4d46a8f5eec37c802;hp=28eace33d7e01d0fe4e3946228b8acbb28254f95;hpb=b610787fb93c09a20b04fd917f2fa3299cd6ce67;p=dpdk.git diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py index 28eace33d7..b69ca2a0db 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)