DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] usertools: Fix clearing any old data
@ 2019-05-31 11:11 Timothy Redaelli
  2019-05-31 13:37 ` [dpdk-dev] [dpdk-stable] " 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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] usertools: Fix clearing any old data
  2019-05-31 11:11 [dpdk-dev] [PATCH] usertools: Fix clearing any old data Timothy Redaelli
@ 2019-05-31 13:37 ` Luca Boccassi
  2019-06-04  7:20   ` David Marchand
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Boccassi @ 2019-05-31 13:37 UTC (permalink / raw)
  To: Timothy Redaelli, dev; +Cc: stable

On Fri, 2019-05-31 at 13:11 +0200, Timothy Redaelli wrote:
> 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):
> 

Acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] usertools: Fix clearing any old data
  2019-05-31 13:37 ` [dpdk-dev] [dpdk-stable] " Luca Boccassi
@ 2019-06-04  7:20   ` David Marchand
  2019-07-04 21:08     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: David Marchand @ 2019-06-04  7:20 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: dev, dpdk stable, Luca Boccassi

On Fri, May 31, 2019 at 3:37 PM Luca Boccassi <bluca@debian.org> wrote:

> On Fri, 2019-05-31 at 13:11 +0200, Timothy Redaelli wrote:
> > 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


Fixes: ea9f00f7289a ("usertools: refactor NIC and crypto binding details")


> >
> >
> > 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):
> >
>
> Acked-by: Luca Boccassi <bluca@debian.org>
>


Reviewed-by: David Marchand <david.marchand@redhat.com>

-- 
David Marchand

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] usertools: Fix clearing any old data
  2019-06-04  7:20   ` David Marchand
@ 2019-07-04 21:08     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2019-07-04 21:08 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: dev, David Marchand, dpdk stable, Luca Boccassi

04/06/2019 09:20, David Marchand:
> On Fri, May 31, 2019 at 3:37 PM Luca Boccassi <bluca@debian.org> wrote:
> > On Fri, 2019-05-31 at 13:11 +0200, Timothy Redaelli wrote:
> > > 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
> 
> Fixes: ea9f00f7289a ("usertools: refactor NIC and crypto binding details")
> 
> > > Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
>
> > Acked-by: Luca Boccassi <bluca@debian.org>
> 
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks



^ 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-dev] [PATCH] usertools: Fix clearing any old data Timothy Redaelli
2019-05-31 13:37 ` [dpdk-dev] [dpdk-stable] " Luca Boccassi
2019-06-04  7:20   ` David Marchand
2019-07-04 21:08     ` 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).