From patchwork Fri Jun 17 11:17:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 113010 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1202CA00C3; Fri, 17 Jun 2022 19:09:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BEF1242802; Fri, 17 Jun 2022 19:09:23 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id C075941148 for ; Fri, 17 Jun 2022 19:09:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655485761; x=1687021761; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eErhYChLc60k847Jdxs6vTTS11xXyONlsIzlHfoQCQs=; b=aEWvMjNSDhVpnsENGbZVuOfwFJQj9vb9nfmclnMuxbgRons1zY1dEHH2 8S51vqj7Dm7cSstrvREg1/8IgdfPqyF64QDCh0bVMRTb6liCNjcaTQ/YP EYP2Ogg3DNmBxzPQAJcxxVrSxcGpmQ/pvGOD+cm0HI882cGoSQQeCfC5f ClRO4rde0RXON298NjkKL2jMI/786aArUiNa1lZPljwwgMiHwSWDvIkCW xnkBMOPOkLdT86g7JWSpTiy96Xq8V/POwbrapy+1fMRZ3Pg9ZxyilQx7v D+rqIdagoV4z/IpynskZ/6aU/KYUtpswq4n8N2Zkth1ACtU2a24myW4sd g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="277052465" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="277052465" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2022 04:18:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="675456518" Received: from silpixa00401385.ir.intel.com (HELO silpixa00401385.ger.corp.intel.com.) ([10.237.223.181]) by FMSMGA003.fm.intel.com with ESMTP; 17 Jun 2022 04:17:59 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Kevin Laatz , Sunil Pai G , Bruce Richardson Subject: [PATCH] dma/idxd: fix missing default for workqueue options Date: Fri, 17 Jun 2022 12:17:50 +0100 Message-Id: <20220617111750.356481-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Acked-by: Sunil Pai G Acked-by: Conor Walsh --- 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")