[dpdk-dev] [PATCH] usertools: decode PCI device name as UTF-8
Christos Ricudis
ricudis at niometrics.com
Mon Apr 13 16:58:34 CEST 2020
Fixes the case where a PCI device string identifier contains non-ASCII UTF-8.
A particular example is Mellanox Connext-X 5 EN MT27800:
28:00.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5]
Subsystem: Mellanox Technologies ConnectX®-5 EN network interface card, 100GbE single-port QSFP28, PCIe3.0 x16, tall bracket; MCX515A-CCAT
Signed-off-by: Christos Ricudis <ricudis at niometrics.com>
---
usertools/dpdk-devbind.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index b1d1498..8ec1703 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -257,7 +257,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
--
1.8.3.1
More information about the dev
mailing list