All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Kevin Laatz <kevin.laatz@intel.com>,
	Sunil Pai G <sunil.pai.g@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH] dma/idxd: fix missing default for workqueue options
Date: Fri, 17 Jun 2022 12:17:50 +0100	[thread overview]
Message-ID: <20220617111750.356481-1-bruce.richardson@intel.com> (raw)

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


             reply	other threads:[~2022-06-17 17:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17 11:17 Bruce Richardson [this message]
2022-06-20  4:09 ` [PATCH] dma/idxd: fix missing default for workqueue options Pai G, Sunil
2022-06-21 15:35   ` Thomas Monjalon
2022-06-20  9:21 ` Walsh, Conor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220617111750.356481-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=kevin.laatz@intel.com \
    --cc=sunil.pai.g@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.