From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 23E2FA0546; Fri, 30 Apr 2021 13:18:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 566C34115A; Fri, 30 Apr 2021 13:17:56 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 291754013F for ; Fri, 30 Apr 2021 13:17:53 +0200 (CEST) IronPort-SDR: vLbS91zDpBfwY4SNcOjqDfyhLPxn82NEXtXmfcH0O/yCVp3/v8p1nQOcWl7UAF/4ioXHNA/lmS cHegK+V2dPgA== X-IronPort-AV: E=McAfee;i="6200,9189,9969"; a="177410654" X-IronPort-AV: E=Sophos;i="5.82,262,1613462400"; d="scan'208";a="177410654" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2021 04:17:52 -0700 IronPort-SDR: MBh/1cNToFqWUwMq/8uCE8z8Y89ThKrQy7Y7renD2dPz4wzvu1ZQ5askzvHWx5yXhA08M6HkBc x90rBPsSFCtA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,262,1613462400"; d="scan'208";a="387325107" Received: from silpixa00399126.ir.intel.com ([10.237.223.78]) by orsmga003.jf.intel.com with ESMTP; 30 Apr 2021 04:17:51 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: kevin.laatz@intel.com, sunil.pai.g@intel.com, jiayu.hu@intel.com, Bruce Richardson Date: Fri, 30 Apr 2021 12:17:21 +0100 Message-Id: <20210430111727.12203-7-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210430111727.12203-1-bruce.richardson@intel.com> References: <20210318182042.43658-1-bruce.richardson@intel.com> <20210430111727.12203-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 06/12] raw/ioat: make workqueue name configurable in script 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 Sender: "dev" Add a "--name-prefix" parameter to the quick configuration script for DSA. This allows the queues configured on a DSA instance to be made available to only one DPDK process in a setup with multiple DPDK process instances. Signed-off-by: Bruce Richardson --- drivers/raw/ioat/dpdk_idxd_cfg.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/raw/ioat/dpdk_idxd_cfg.py b/drivers/raw/ioat/dpdk_idxd_cfg.py index 56e44063e4..ff06d9e240 100755 --- a/drivers/raw/ioat/dpdk_idxd_cfg.py +++ b/drivers/raw/ioat/dpdk_idxd_cfg.py @@ -29,7 +29,7 @@ def write_values(self, values): f.write(str(contents)) -def configure_dsa(dsa_id, queues): +def configure_dsa(dsa_id, queues, prefix): "Configure the DSA instance with appropriate number of queues" dsa_dir = SysfsDir(f"/sys/bus/dsa/devices/dsa{dsa_id}") drv_dir = SysfsDir("/sys/bus/dsa/drivers/dsa") @@ -54,7 +54,7 @@ def configure_dsa(dsa_id, queues): wq_dir.write_values({"group_id": q % nb_groups, "type": "user", "mode": "dedicated", - "name": f"dpdk_wq{dsa_id}.{q}", + "name": f"{prefix}_wq{dsa_id}.{q}", "priority": 1, "size": int(max_tokens / nb_queues)}) @@ -71,8 +71,11 @@ def main(args): arg_p.add_argument('dsa_id', type=int, help="DSA instance number") arg_p.add_argument('-q', metavar='queues', type=int, default=255, help="Number of queues to set up") + arg_p.add_argument('--name-prefix', metavar='prefix', dest='prefix', + default="dpdk", + help="Prefix for workqueue name to mark for DPDK use [default: 'dpdk']") parsed_args = arg_p.parse_args(args[1:]) - configure_dsa(parsed_args.dsa_id, parsed_args.q) + configure_dsa(parsed_args.dsa_id, parsed_args.q, parsed_args.prefix) if __name__ == "__main__": -- 2.30.2