>From aa9bbfd7816dbea4abe4fdc0bec8b8c5f088148c Mon Sep 17 00:00:00 2001
From: Omri Mor <omrim...@illinois.edu>
Date: Mon, 2 Oct 2017 18:54:43 -0500
Subject: [PATCH] usertools/dpdk-devbind.py: fix broken Python 3 support

When using Python 3, dpdk-devbind.py fails to detect modules other than
igb_uio.

Signed-off-by: Omri Mor <omrim...@illinois.edu>
---
 usertools/dpdk-devbind.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index da6e40cbe..a539995cd 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -204,8 +204,7 @@ def check_modules():
 
         # special case for vfio_pci (module is named vfio-pci,
         # but its .ko is named vfio_pci)
-        sysfs_mods = map(lambda a:
-                         a if a != 'vfio_pci' else 'vfio-pci', sysfs_mods)
+        sysfs_mods = [a if a != 'vfio_pci' else 'vfio-pci' for a in sysfs_mods]
 
         for mod in mods:
             if mod["Name"] in sysfs_mods:
-- 
2.14.2


Reply via email to