]> git.droids-corp.org - dpdk.git/commitdiff
dma/idxd: fix default for workqueue options
authorBruce Richardson <bruce.richardson@intel.com>
Fri, 17 Jun 2022 11:17:50 +0000 (12:17 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 21 Jun 2022 15:33:30 +0000 (17:33 +0200)
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: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Conor Walsh <conor.walsh@intel.com>
drivers/dma/idxd/dpdk_idxd_cfg.py

index 77c473b2406bbb8f438e923de02c666c38fd1612..41b4d13b9c67848140b019293afc985de566b4b3 100755 (executable)
@@ -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")