patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] usertools: Fix clearing any old data
@ 2019-05-31 11:11 Timothy Redaelli
  2019-05-31 13:37 ` Luca Boccassi
  0 siblings, 1 reply; 4+ messages in thread
From: Timothy Redaelli @ 2019-05-31 11:11 UTC (permalink / raw)
  To: dev; +Cc: stable

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".

CC: stable@dpdk.org

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 usertools/dpdk-devbind.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index 9e79f0d28..e6b551d33 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -210,6 +210,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.21.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-04 21:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 11:11 [dpdk-stable] [PATCH] usertools: Fix clearing any old data Timothy Redaelli
2019-05-31 13:37 ` Luca Boccassi
2019-06-04  7:20   ` David Marchand
2019-07-04 21:08     ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).