From 93b93beb123d96e5acbbb24491c491bec47da60d Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Fri, 31 May 2019 13:11:26 +0200 Subject: [PATCH] usertools: fix refresh binding infos Currently clear_data (dpdk-devbind.py) doesn't work as expected since "global devices" is missing and so "devices" is considered a local variable. This commit changes "clear_data" function in order to really clear devices by adding "global devices". Fixes: ea9f00f7289a ("usertools: refactor NIC and crypto binding details") Cc: stable@dpdk.org Signed-off-by: Timothy Redaelli Acked-by: Luca Boccassi Reviewed-by: David Marchand --- usertools/dpdk-devbind.py | 1 + 1 file changed, 1 insertion(+) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 5c1cd35487..4791e5f48d 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -216,6 +216,7 @@ def get_pci_device_details(dev_id, probe_lspci): def clear_data(): '''This function clears any old data''' + global devices devices = {} def get_device_details(devices_type): -- 2.20.1