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 3F751A0546; Fri, 30 Apr 2021 17:07:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F45341154; Fri, 30 Apr 2021 17:07:07 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id F0D684112E for ; Fri, 30 Apr 2021 17:06:59 +0200 (CEST) IronPort-SDR: i+YU2Fn9VrGKE8pvOP+/0HOAS24uCZ1/rAfJSY3hoSJDTW4jc+F0PohBry4FFJ7gS84HBAcvQ2 8WObE8VyT9mg== X-IronPort-AV: E=McAfee;i="6200,9189,9970"; a="261240834" X-IronPort-AV: E=Sophos;i="5.82,263,1613462400"; d="scan'208";a="261240834" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2021 08:06:58 -0700 IronPort-SDR: t6av24XXb0mXAfKDpQuAtPU+rw+Z2EsO86EG++FtQAaNFHnIueiMzh4zNRqt9JWC1n1Ox0gAUd 2hqiaRqVO/sA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,263,1613462400"; d="scan'208";a="456011353" Received: from silpixa00399126.ir.intel.com ([10.237.223.78]) by FMSMGA003.fm.intel.com with ESMTP; 30 Apr 2021 08:06:57 -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 16:06:31 +0100 Message-Id: <20210430150637.362610-7-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210430150637.362610-1-bruce.richardson@intel.com> References: <20210318182042.43658-1-bruce.richardson@intel.com> <20210430150637.362610-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 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