[dpdk-dev] usertools/devbind: fix kernel module reporting
Checks
Commit Message
lspci reports kernel modules in "Module" string, but devbind
expects it to be "Module_str". Fix it up similar to how we fix
up "Driver" to be "Driver_str".
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
devbind status before changes:
Other Network devices
=====================
0000:08:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection 10fb' unused=igb_uio
devbind status after changes:
Other Network devices
=====================
0000:08:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection 10fb' unused=ixgbe,igb_uio
Note that "ixgbe" driver is now shown as "unused" for unbound device.
Also, no idea if this was ever working to begin with, so no fixline tag.
usertools/dpdk-devbind.py | 2 ++
1 file changed, 2 insertions(+)
Comments
24/01/2018 11:26, Anatoly Burakov:
> lspci reports kernel modules in "Module" string, but devbind
> expects it to be "Module_str". Fix it up similar to how we fix
> up "Driver" to be "Driver_str".
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Fixes: c3ce205d5729 ("usertools: optimize lspci invocation")
Applied, thanks
@@ -249,6 +249,8 @@ def get_device_details(devices_type):
# of dictionary key names
if "Driver" in dev.keys():
dev["Driver_str"] = dev.pop("Driver")
+ if "Module" in dev.keys():
+ dev["Module_str"] = dev.pop("Module")
# use dict to make copy of dev
devices[dev["Slot"]] = dict(dev)
# Clear previous device's data