usertools/dpdk-devbind: fix missing device classes

Message ID 20201124094656.46507-1-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series usertools/dpdk-devbind: fix missing device classes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed

Commit Message

Bruce Richardson Nov. 24, 2020, 9:46 a.m. UTC
  The "misc" and "regex" device classes were missing from the list used to
check arguments, preventing them from being used with "--status-dev"
flag to list only devices of those types.

When adding them to the list, the list is also sorted alphabetically for
consistency.

Fixes: 81255f27c65c ("usertools: replace optparse with argparse")
Cc: stephen@networkplumber.org

Bugzilla ID: 582

Reported-by: Wei Ling <weix.ling@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 usertools/dpdk-devbind.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Stephen Hemminger Nov. 24, 2020, 5:53 p.m. UTC | #1
On Tue, 24 Nov 2020 09:46:56 +0000
Bruce Richardson <bruce.richardson@intel.com> wrote:

> The "misc" and "regex" device classes were missing from the list used to
> check arguments, preventing them from being used with "--status-dev"
> flag to list only devices of those types.
> 
> When adding them to the list, the list is also sorted alphabetically for
> consistency.
> 
> Fixes: 81255f27c65c ("usertools: replace optparse with argparse")
> Cc: stephen@networkplumber.org
> 
> Bugzilla ID: 582
> 
> Reported-by: Wei Ling <weix.ling@intel.com>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Almost the same patch I was sending right now...

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  
Yu Jiang Nov. 25, 2020, 2:23 a.m. UTC | #2
Tested-by: Jiang, YuX <yux.jiang@intel.com>

    Best Regards
    Jiang yu

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen
> Hemminger
> Sent: Wednesday, November 25, 2020 1:53 AM
> To: Richardson, Bruce <bruce.richardson@intel.com>
> Cc: dev@dpdk.org; Ling, WeiX <weix.ling@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] usertools/dpdk-devbind: fix missing device
> classes
> 
> On Tue, 24 Nov 2020 09:46:56 +0000
> Bruce Richardson <bruce.richardson@intel.com> wrote:
> 
> > The "misc" and "regex" device classes were missing from the list used
> > to check arguments, preventing them from being used with "--status-dev"
> > flag to list only devices of those types.
> >
> > When adding them to the list, the list is also sorted alphabetically
> > for consistency.
> >
> > Fixes: 81255f27c65c ("usertools: replace optparse with argparse")
> > Cc: stephen@networkplumber.org
> >
> > Bugzilla ID: 582
> >
> > Reported-by: Wei Ling <weix.ling@intel.com>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Almost the same patch I was sending right now...
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  
Thomas Monjalon Nov. 25, 2020, 1:04 p.m. UTC | #3
25/11/2020 03:23, Jiang, YuX:
> Tested-by: Jiang, YuX <yux.jiang@intel.com>

Thanks for the test.
Next time, please reply below with this exact line (name):

Tested-by: Yu Jiang <yux.jiang@intel.com>


> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen
> > Hemminger
> > Sent: Wednesday, November 25, 2020 1:53 AM
> > To: Richardson, Bruce <bruce.richardson@intel.com>
> > Cc: dev@dpdk.org; Ling, WeiX <weix.ling@intel.com>
> > Subject: Re: [dpdk-dev] [PATCH] usertools/dpdk-devbind: fix missing device
> > classes
> > 
> > On Tue, 24 Nov 2020 09:46:56 +0000
> > Bruce Richardson <bruce.richardson@intel.com> wrote:
> > 
> > > The "misc" and "regex" device classes were missing from the list used
> > > to check arguments, preventing them from being used with "--status-dev"
> > > flag to list only devices of those types.
> > >
> > > When adding them to the list, the list is also sorted alphabetically
> > > for consistency.
> > >
> > > Fixes: 81255f27c65c ("usertools: replace optparse with argparse")
> > > Cc: stephen@networkplumber.org
> > >
> > > Bugzilla ID: 582
> > >
> > > Reported-by: Wei Ling <weix.ling@intel.com>
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > 
> > Almost the same patch I was sending right now...
> > 
> > Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>
  
Thomas Monjalon Nov. 25, 2020, 1:06 p.m. UTC | #4
24/11/2020 18:53, Stephen Hemminger:
> On Tue, 24 Nov 2020 09:46:56 +0000
> Bruce Richardson <bruce.richardson@intel.com> wrote:
> 
> > The "misc" and "regex" device classes were missing from the list used to
> > check arguments, preventing them from being used with "--status-dev"
> > flag to list only devices of those types.
> > 
> > When adding them to the list, the list is also sorted alphabetically for
> > consistency.
> > 
> > Fixes: 81255f27c65c ("usertools: replace optparse with argparse")
> > Cc: stephen@networkplumber.org
> > 
> > Bugzilla ID: 582
> > 
> > Reported-by: Wei Ling <weix.ling@intel.com>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Almost the same patch I was sending right now...
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>

Applied, thanks
  

Patch

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index 054ad2e1c..c2ede3d4d 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -634,7 +634,8 @@  def parse_args():
     parser.add_argument(
         '--status-dev',
         help="Print the status of given device group.",
-        choices=['net', 'baseband', 'crypto', 'event', 'mempool', 'compress'])
+        choices=['baseband', 'compress', 'crypto', 'event',
+                'mempool', 'misc', 'net', 'regex'])
     bind_group = parser.add_mutually_exclusive_group()
     bind_group.add_argument(
         '-b',