mbuf: extend meaning of QinQ stripped bit
[dpdk.git] / usertools / dpdk-devbind.py
index 40b4bee..86b6b53 100755 (executable)
@@ -10,6 +10,10 @@ import getopt
 import subprocess
 from os.path import exists, abspath, dirname, basename
 
+if sys.version_info.major < 3:
+    print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
+    print("Please use Python 3 instead", file=sys.stderr)
+
 # The PCI base class for all devices
 network_class = {'Class': '02', 'Vendor': None, 'Device': None,
                     'SVendor': None, 'SDevice': None}
@@ -213,7 +217,7 @@ def get_pci_device_details(dev_id, probe_lspci):
         for line in extra_info:
             if len(line) == 0:
                 continue
-            name, value = line.decode().split("\t", 1)
+            name, value = line.decode("utf8").split("\t", 1)
             name = name.strip(":") + "_str"
             device[name] = value
     # check for a unix interface name
@@ -259,7 +263,7 @@ def get_device_details(devices_type):
             # Clear previous device's data
             dev = {}
         else:
-            name, value = dev_line.decode().split("\t", 1)
+            name, value = dev_line.decode("utf8").split("\t", 1)
             value_list = value.rsplit(' ', 1)
             if len(value_list) > 1:
                 # String stored in <name>_str