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 E8B6AA0548; Mon, 26 Apr 2021 11:53:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD5F1411C5; Mon, 26 Apr 2021 11:53:25 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 55017411AD for ; Mon, 26 Apr 2021 11:53:19 +0200 (CEST) IronPort-SDR: H1cRusOxlT72Q9qMBHxpGncChahi/YBGTU5fhgv1ja/57WPA0gmhAFSNAwTtOOJUGF1Ox/CdrJ SPxWCkwd69cg== X-IronPort-AV: E=McAfee;i="6200,9189,9965"; a="183442904" X-IronPort-AV: E=Sophos;i="5.82,252,1613462400"; d="scan'208";a="183442904" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2021 02:53:17 -0700 IronPort-SDR: x336wUojXYuirtpCueKbZhTXPih07AcDDkZYM2VCsitHdf+EJQYy9Y0Vz2pKjAKC5Ie2amE1JX 31OKBVci9NlA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,252,1613462400"; d="scan'208";a="429336925" Received: from silpixa00399126.ir.intel.com ([10.237.223.81]) by orsmga008.jf.intel.com with ESMTP; 26 Apr 2021 02:53:16 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: kevin.laatz@intel.com, jiayu.hu@intel.com, Bruce Richardson Date: Mon, 26 Apr 2021 10:52:53 +0100 Message-Id: <20210426095259.225354-7-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210426095259.225354-1-bruce.richardson@intel.com> References: <20210318182042.43658-2-bruce.richardson@intel.com> <20210426095259.225354-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 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