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 5D7EFA0562; Tue, 4 May 2021 15:15:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB0D8410FB; Tue, 4 May 2021 15:15:37 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 3B8CD40147 for ; Tue, 4 May 2021 15:15:34 +0200 (CEST) IronPort-SDR: 2CSI2P7t+XncIGMXIEZngJ88mgvbs06qjlzfLSFPGpt72Xi8bDpeDMkKDWNNIpnn/gicvoYMDv fiTtHsdKlNsQ== X-IronPort-AV: E=McAfee;i="6200,9189,9973"; a="195922141" X-IronPort-AV: E=Sophos;i="5.82,272,1613462400"; d="scan'208";a="195922141" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2021 06:15:33 -0700 IronPort-SDR: Q8kQlwunekATe6eyDYe83cjoCEFKKbFqWEDB7iKLH3c4BNi5qLOwMHIpKZi1T5xX64o2dImu7S kMB/8Cmgc1cA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,272,1613462400"; d="scan'208";a="406105553" Received: from silpixa00399126.ir.intel.com ([10.237.223.78]) by orsmga002.jf.intel.com with ESMTP; 04 May 2021 06:15:32 -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: Tue, 4 May 2021 14:14:52 +0100 Message-Id: <20210504131458.593429-7-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210504131458.593429-1-bruce.richardson@intel.com> References: <20210318182042.43658-1-bruce.richardson@intel.com> <20210504131458.593429-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 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