From: Timothy Redaelli Date: Fri, 31 May 2019 11:11:26 +0000 (+0200) Subject: usertools: fix refresh binding infos X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=93b93beb123d96e5acbbb24491c491bec47da60d;p=dpdk.git 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 --- 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):