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 64CCD4301F for ; Thu, 10 Aug 2023 02:02:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E5C143258; Thu, 10 Aug 2023 02:02:51 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2062.outbound.protection.outlook.com [40.107.93.62]) by mails.dpdk.org (Postfix) with ESMTP id 6A61A406B6 for ; Thu, 10 Aug 2023 02:02:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TkuJk5m9bxGDdqt3o0MEbeWovbCiuSxy97gTFOk9nDqUTd6O+3IgZuF9am8tdRIcUzpHw9mJCuDcdPT1fsJwWrDGHPDgTCHSAPa2OgG0zc2NZQPytpaZpi8DMuLEk2owQSeyDyoOLgnv5BjqsfeT4CqVWAJdcLS0a9A2SZ+39KUBmLghyiYO+2HmYmCjzpSf0k/vZc4XkiaH8U5E0+QJNPBaDeTSkXKoZsXb1Kxzh69kxtQULTpeuqI/xEYTTD2FzBYVKVmdgx6iKdZn8uTfhxdfj/HQf1lzzM/aEeOmSfD/CKJhAiuU19qseKyzkKECqxxMDvtSDoXGqyP5l0j+lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/kT21s7xkEM+tYkPb1AwiZxZ2rooWcqQIwP5nq5qbeg=; b=NurD1l1bJqNUnibEyplyJdcC//ZwKqCHyevmdLvn7PD3gjiItfUMKndRRewGyh4S2hDe5C1q9bLnf34uidn8YjdSh3WjL8liZa/WPj04eLioSIHFcSMNZVFMosir10alpGEYiwa3GYCNxSoKx6kYwxyF/qQJn0dYDuOl6+GevVqLg617bW69HowGChyXVVUAazhavEtCxTcqdFuScUYHss5LQDKCGtaRrR1TJtb7E559nQnM3c1rHX+shccTTfuf3QoC4vkyQ6ENHKAHj0uakSu/BKMMvIu2R/SPcE8nfbUDOw/Sn8/V0nrUNPiJnIkajihm1PQWlUmvHlpo5a8nVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/kT21s7xkEM+tYkPb1AwiZxZ2rooWcqQIwP5nq5qbeg=; b=UopmAemOfB63LeXfzUeT+M/KxHzTzzlDoEFYJSAcJv5xc3eNUybXTJ+jLomQedHK7l2MnDATbaRMFs8Sb09FzndxdJmqmwoDKu/B9+tvBCQPvXRWKI5/3LCgUM9YYDuObPYN/qxmqPw3yxnqsG3fD+9lmLsq0SpFQmIE2wrtU3ApCZISJgnxwlmhmky6eVo1zy2aasjHLNGRwYePJdd+vmIGfhVYha7lfLlP/puxosGcDCwlCD8/ZcoBYdgZEIvjG3Rta2Jn8geBHnxZmYkTdErUD1r7/LDPlRIP2L5dHiZERu25axNMd6qr/2DK9xBcK8YlfdqUmEy4vZldqYtMMg== Received: from CYZPR14CA0048.namprd14.prod.outlook.com (2603:10b6:930:a0::25) by IA0PR12MB8894.namprd12.prod.outlook.com (2603:10b6:208:483::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Thu, 10 Aug 2023 00:02:47 +0000 Received: from CY4PEPF0000EDD0.namprd03.prod.outlook.com (2603:10b6:930:a0:cafe::51) by CYZPR14CA0048.outlook.office365.com (2603:10b6:930:a0::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.28 via Frontend Transport; Thu, 10 Aug 2023 00:02:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000EDD0.mail.protection.outlook.com (10.167.241.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Thu, 10 Aug 2023 00:02:47 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Wed, 9 Aug 2023 17:02:35 -0700 Received: from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Wed, 9 Aug 2023 17:02:33 -0700 From: Xueming Li To: Bing Zhao CC: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: reduce counter pool name length' has been queued to stable release 22.11.3 Date: Thu, 10 Aug 2023 07:59:00 +0800 Message-ID: <20230809235947.1187-28-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230809235947.1187-1-xuemingl@nvidia.com> References: <20230625063544.11183-1-xuemingl@nvidia.com> <20230809235947.1187-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD0:EE_|IA0PR12MB8894:EE_ X-MS-Office365-Filtering-Correlation-Id: 22eac777-c921-4abc-e190-08db9935213a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3sdJP4QK7DoNR8SHVNsH1JBA3hsMDZcPO3xO894lyRY8jHg7HqUijyFf0ABo8EsyF08Vx3R2v6Qw2peaVRMqAcAggebVN7EsX1neDpp9RDY0mX+JKyRwWEUP8A9RHISuoQQV6roD48Ib8wcP+4H4e1vToIR47OPTY3jf6PwsPfz6JP6Mr5Dtr1z9/nuPr+o/KL/YP2K/Yl7YUAde9yC+4P97695gTkUyljSzOeFAa8o2XbqVeSBeVfmMPP7MyxNNYx8f+jK2qCTEQql16JTp6ztfZBTtj0Di1DwVYWwYp8MY8QOtCVBFR7OWqRndVsz+G95Q0ht6Rvy7oKcZm9Vlwk/sjA1/MTmIjz70C1DT+FkG3asuXXhT2EtoODzKtkChG1HXiZhnudFVetJ9lnHcToKRUxmZRM0vGSGa1IwSmBWMvi6ktNd/lEbcqsnOq5EayyTPHtwszFBh573tCkx6soOD0l4sptjv0eVLGAYbs2VxH+7Un44q3qYiw+zK9iOgJ3FhFixUHhsItViDseRXt7Ku6uljbCFwGJXJfLwFG3QjsAlBYIiN8nzi0zic8bLh+Vq2mJfue39gMcDekq2ZZCRXzmdediicJiH87l8uppsjzKkBIyP+9N1fHjEtCcCsCKhv65g4+c56p2nhzRmDHmRNuYfFRYSfBednQo6iM6/cm7rTdmbaG18A6O/gsx4E+coVQf93ebCnR3A+fTtyaNBmWDJX49LgdyVCVpt5/wWsxAMoyWleE3UyRc1wtInhw5vkeOv+t0PJ4TSsIP01DA== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(136003)(396003)(376002)(39860400002)(346002)(1800799006)(82310400008)(186006)(451199021)(46966006)(40470700004)(36840700001)(5660300002)(2906002)(8676002)(41300700001)(70206006)(6636002)(70586007)(4326008)(55016003)(40480700001)(316002)(37006003)(54906003)(6862004)(8936002)(36860700001)(6666004)(7696005)(478600001)(966005)(40460700003)(82740400003)(26005)(16526019)(1076003)(53546011)(6286002)(426003)(83380400001)(36756003)(336012)(47076005)(7636003)(2616005)(356005)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2023 00:02:47.1474 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22eac777-c921-4abc-e190-08db9935213a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD0.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8894 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/11/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=cdd4d9bca6dbb570c6286c46a7ca133259c02af1 Thanks. Xueming Li --- >From cdd4d9bca6dbb570c6286c46a7ca133259c02af1 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Fri, 30 Jun 2023 15:57:30 +0300 Subject: [PATCH] net/mlx5: reduce counter pool name length Cc: Xueming Li [ upstream commit 1c955e4cf72287940c180c31e14ccfd1f90dac0f ] The name size of a rte_ring is RTE_MEMZONE_NAMESIZE with the value 32 by default. When creating a HWS counter pool cache, the final string format was "RG_MLX5_HWS_CNT_POOL_%u_cache/%u" and it could support less than 1000 variants. For example, if the first %u representing port id is 100 and it will take all the available characters then the second %u for queues will be discarded. If there was more than one rule creation queue, the rte_ring could not be created. By reducing the fixed character number and using hexadecimal format, the issue can be overcome with an assumption that not all the integer fields for queue index is used. Fixes: 13ea6bdcc7ee ("net/mlx5: support counters in cross port shared mode") Fixes: 4d368e1da3a4 ("net/mlx5: support flow counter action for HWS") Signed-off-by: Bing Zhao Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_hws_cnt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c index 51704ef754..8ccc6ab1f8 100644 --- a/drivers/net/mlx5/mlx5_hws_cnt.c +++ b/drivers/net/mlx5/mlx5_hws_cnt.c @@ -410,8 +410,7 @@ mlx5_hws_cnt_pool_init(struct mlx5_dev_ctx_shared *sh, goto error; } for (qidx = 0; qidx < ccfg->q_num; qidx++) { - snprintf(mz_name, sizeof(mz_name), "%s_cache/%u", pcfg->name, - qidx); + snprintf(mz_name, sizeof(mz_name), "%s_qc/%x", pcfg->name, qidx); cntp->cache->qcache[qidx] = rte_ring_create(mz_name, ccfg->size, SOCKET_ID_ANY, RING_F_SP_ENQ | RING_F_SC_DEQ | @@ -634,7 +633,7 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev, SOCKET_ID_ANY); if (mp_name == NULL) goto error; - snprintf(mp_name, RTE_MEMZONE_NAMESIZE, "MLX5_HWS_CNT_POOL_%u", + snprintf(mp_name, RTE_MEMZONE_NAMESIZE, "MLX5_HWS_CNT_P_%x", dev->data->port_id); pcfg.name = mp_name; pcfg.request_num = pattr->nb_counters; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-08-09 21:51:20.280864400 +0800 +++ 0081-net-mlx5-reduce-counter-pool-name-length.patch 2023-08-09 21:51:18.244352000 +0800 @@ -1 +1 @@ -From 1c955e4cf72287940c180c31e14ccfd1f90dac0f Mon Sep 17 00:00:00 2001 +From cdd4d9bca6dbb570c6286c46a7ca133259c02af1 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 1c955e4cf72287940c180c31e14ccfd1f90dac0f ] @@ -20 +22,0 @@ -Cc: stable@dpdk.org @@ -25,2 +27,2 @@ - drivers/net/mlx5/mlx5_hws_cnt.c | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) + drivers/net/mlx5/mlx5_hws_cnt.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) @@ -29 +31 @@ -index d98df68f39..18d80f34ba 100644 +index 51704ef754..8ccc6ab1f8 100644 @@ -32 +34 @@ -@@ -419,8 +419,7 @@ mlx5_hws_cnt_pool_init(struct mlx5_dev_ctx_shared *sh, +@@ -410,8 +410,7 @@ mlx5_hws_cnt_pool_init(struct mlx5_dev_ctx_shared *sh, @@ -42,7 +44,2 @@ -@@ -612,12 +611,10 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev, - int ret = 0; - size_t sz; - -- mp_name = mlx5_malloc(MLX5_MEM_ZERO, RTE_MEMZONE_NAMESIZE, 0, -- SOCKET_ID_ANY); -+ mp_name = mlx5_malloc(MLX5_MEM_ZERO, RTE_MEMZONE_NAMESIZE, 0, SOCKET_ID_ANY); +@@ -634,7 +633,7 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev, + SOCKET_ID_ANY); @@ -52,2 +49,2 @@ -- dev->data->port_id); -+ snprintf(mp_name, RTE_MEMZONE_NAMESIZE, "MLX5_HWS_CNT_P_%x", dev->data->port_id); ++ snprintf(mp_name, RTE_MEMZONE_NAMESIZE, "MLX5_HWS_CNT_P_%x", + dev->data->port_id); @@ -56 +52,0 @@ - pcfg.alloc_factor = HWS_CNT_ALLOC_FACTOR_DEFAULT;