* [PATCH] dma/idxd: fix missing default for workqueue options
@ 2022-06-17 11:17 Bruce Richardson
2022-06-20 4:09 ` Pai G, Sunil
2022-06-20 9:21 ` Walsh, Conor
0 siblings, 2 replies; 4+ messages in thread
From: Bruce Richardson @ 2022-06-17 11:17 UTC (permalink / raw)
To: dev; +Cc: Kevin Laatz, Sunil Pai G, Bruce Richardson
When no --wq-option flag is passed to dpdk_idxd_cfg.py script, the
default value used by argparse is None. This leads to later errors which
are expecting an array value:
TypeError: 'NoneType' object is not iterable
This is fixed by specifying that the empty array should be the default
if no flags are passed.
Fixes: 94b0f04dc0e3 ("dma/idxd: add generic option for queue config")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/dma/idxd/dpdk_idxd_cfg.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py
index 77c473b240..41b4d13b9c 100755
--- a/drivers/dma/idxd/dpdk_idxd_cfg.py
+++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
@@ -122,7 +122,7 @@ def main(args):
arg_p.add_argument('--name-prefix', metavar='prefix', dest='prefix',
default="dpdk",
help="Prefix for workqueue name to mark for DPDK use [default: 'dpdk']")
- arg_p.add_argument('--wq-option', action='append',
+ arg_p.add_argument('--wq-option', action='append', default=[],
help="Provide additional config option for queues (format 'x=y')")
arg_p.add_argument('--reset', action='store_true',
help="Reset DSA device and its queues")
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] dma/idxd: fix missing default for workqueue options
2022-06-17 11:17 [PATCH] dma/idxd: fix missing default for workqueue options Bruce Richardson
@ 2022-06-20 4:09 ` Pai G, Sunil
2022-06-21 15:35 ` Thomas Monjalon
2022-06-20 9:21 ` Walsh, Conor
1 sibling, 1 reply; 4+ messages in thread
From: Pai G, Sunil @ 2022-06-20 4:09 UTC (permalink / raw)
To: Richardson, Bruce, dev; +Cc: Laatz, Kevin
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Friday, June 17, 2022 4:48 PM
> To: dev@dpdk.org
> Cc: Laatz, Kevin <kevin.laatz@intel.com>; Pai G, Sunil
> <sunil.pai.g@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>
> Subject: [PATCH] dma/idxd: fix missing default for workqueue options
>
> When no --wq-option flag is passed to dpdk_idxd_cfg.py script, the default
> value used by argparse is None. This leads to later errors which are
> expecting an array value:
>
> TypeError: 'NoneType' object is not iterable
>
> This is fixed by specifying that the empty array should be the default if
> no flags are passed.
>
> Fixes: 94b0f04dc0e3 ("dma/idxd: add generic option for queue config")
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
LGTM
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dma/idxd: fix missing default for workqueue options
2022-06-20 4:09 ` Pai G, Sunil
@ 2022-06-21 15:35 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2022-06-21 15:35 UTC (permalink / raw)
To: Richardson, Bruce; +Cc: dev, Laatz, Kevin, Pai G, Sunil
20/06/2022 06:09, Pai G, Sunil:
> > From: Richardson, Bruce <bruce.richardson@intel.com>
> > Sent: Friday, June 17, 2022 4:48 PM
> > To: dev@dpdk.org
> > Cc: Laatz, Kevin <kevin.laatz@intel.com>; Pai G, Sunil
> > <sunil.pai.g@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>
> > Subject: [PATCH] dma/idxd: fix missing default for workqueue options
> >
> > When no --wq-option flag is passed to dpdk_idxd_cfg.py script, the default
> > value used by argparse is None. This leads to later errors which are
> > expecting an array value:
> >
> > TypeError: 'NoneType' object is not iterable
> >
> > This is fixed by specifying that the empty array should be the default if
> > no flags are passed.
> >
> > Fixes: 94b0f04dc0e3 ("dma/idxd: add generic option for queue config")
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
>
> LGTM
> Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] dma/idxd: fix missing default for workqueue options
2022-06-17 11:17 [PATCH] dma/idxd: fix missing default for workqueue options Bruce Richardson
2022-06-20 4:09 ` Pai G, Sunil
@ 2022-06-20 9:21 ` Walsh, Conor
1 sibling, 0 replies; 4+ messages in thread
From: Walsh, Conor @ 2022-06-20 9:21 UTC (permalink / raw)
To: Richardson, Bruce, dev; +Cc: Laatz, Kevin, Pai G, Sunil, Richardson, Bruce
> When no --wq-option flag is passed to dpdk_idxd_cfg.py script, the
> default value used by argparse is None. This leads to later errors which
> are expecting an array value:
>
> TypeError: 'NoneType' object is not iterable
>
> This is fixed by specifying that the empty array should be the default
> if no flags are passed.
>
> Fixes: 94b0f04dc0e3 ("dma/idxd: add generic option for queue config")
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Acked-by: Conor Walsh <conor.walsh@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-21 15:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 11:17 [PATCH] dma/idxd: fix missing default for workqueue options Bruce Richardson
2022-06-20 4:09 ` Pai G, Sunil
2022-06-21 15:35 ` Thomas Monjalon
2022-06-20 9:21 ` Walsh, Conor
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).