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 5C0EF43E57 for ; Sat, 13 Apr 2024 14:53:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56CF840A72; Sat, 13 Apr 2024 14:53:51 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2046.outbound.protection.outlook.com [40.107.92.46]) by mails.dpdk.org (Postfix) with ESMTP id 484BB400D6 for ; Sat, 13 Apr 2024 14:53:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uav5cX6MFfmRMx8TcsKu0TDbC9E48Z+WukzQT7eWoNTknJqHtmOFUWwhzYxy2mwGlhzRw6GmxgFNAWMXM1r2lcsjSNSST6ABPnKH3FyH4sHO3Vk3pgHVE/yKdvFBM2bgGREZPIJEcB3jxzq97yYiIwo4VAf7hV0nSEk+L8Go6GLk2RHKU37Z3mH+YoC7nWdgiY/vPfXwbzyLZfT22JK8yM0PcaTdDNdQRD1SUfrUyup+gEhegVPaZ++OEbFbpDc2jI1Ai+lsB7sWGl9EJFpi2dBDCklPDNtI6ZYcEfMdzj/o+Zp5NacP2TwY2lf0aEIUzPZ/xXcVik3cfuX4iJuNDw== 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=5n7H6LEnI5VkcNAdAKBR61F33KSPHNOcYE/zZZLNoPg=; b=KhNmYs7ajxcag/WOFEnsP2Qv0MTjtMDTlDmktZ2gTXSdiWgzWiG08jVcImHWx1jGzRc/aDSmuFitugVT/+lR+zf7YlED2wCZxbzIFGmx5KA/YIStvhk3DVoG7xowRhP2vh+RtpH/fEwPLuFnDxeYc+i0We4uj/tunteNXxz394FpNA2E+q3auvbm3bkZ0lG/oRuR3yhqRhaC/qWeC00LJjx7iho2VP9a6lNK8SSuVJDArsMPF4Rw09hnrOPQoABkkWqTB8VcuybhR2ltKF/evcQLafcX3HKLnXTdmbevyRUQci1kZQbCGlTaV7Uzewmo+4PmkiCsbGcKCxIzu6WHGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=marvell.com 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 (0) 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=5n7H6LEnI5VkcNAdAKBR61F33KSPHNOcYE/zZZLNoPg=; b=j2ze0cUTKgaEADzesp9GLT+mIAhkqup3irpkeckLcY/rFWgsD9rGuugFsktfvo+9Bub4fkw4/9GcUrMSt9q+ceiRjmy6A2Ti2fMUIPe9grOijl9Oxp9VYET7w3dFSk4+8c+gBbWKH0SCSKIbDsS0gnc/kOO+sE4yD4Y9qejWsFKOel6W+qCZQqf3V4nQB9ZiLWNBwv/VknzXsSHcs8/trAf9qnsyZSkDSE7xoK1CZTY9sIc674Ypxp/2mTGUGCGo4zxRIaCedXo++fPn89BDprbHK7GlrdAr/mljk03gn+G+35J1xmhEJYY+tiM1nXPBgJ+JNvScNOampCPJ1EZxzQ== Received: from BY5PR17CA0050.namprd17.prod.outlook.com (2603:10b6:a03:167::27) by SN7PR12MB6713.namprd12.prod.outlook.com (2603:10b6:806:273::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.54; Sat, 13 Apr 2024 12:53:46 +0000 Received: from SJ1PEPF00001CDE.namprd05.prod.outlook.com (2603:10b6:a03:167:cafe::9b) by BY5PR17CA0050.outlook.office365.com (2603:10b6:a03:167::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.30 via Frontend Transport; Sat, 13 Apr 2024 12:53:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SJ1PEPF00001CDE.mail.protection.outlook.com (10.167.242.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:53:45 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sat, 13 Apr 2024 05:53:35 -0700 Received: from nvidia.com (10.126.230.35) 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.1258.12; Sat, 13 Apr 2024 05:53:33 -0700 From: Xueming Li To: Rahul Bhansali CC: dpdk stable Subject: patch 'net/cnxk: fix mbuf fields in multi-segment Tx' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:48:39 +0800 Message-ID: <20240413125005.725659-39-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CDE:EE_|SN7PR12MB6713:EE_ X-MS-Office365-Filtering-Correlation-Id: 89815843-c861-4ee1-6b95-08dc5bb8c199 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: plKJCVbR6KyhWbHu1CtKkGG3ljEh5Su21XMktWnkh4jVrdelrTdDZbEypUSrJI/G3FcQvfSGMioH7lHpXDSmgxyHTnS32kVhLzxQIc7OrTsya/uKy76ywHI83cZ/VMSnpQU8jtLivDzEWlOCQe1F5i/pupihcww5BguudtgR/0bAhRUUweloEq/FK3M/leXzgeLg/UU+94rNlFSYGNqqMAUgOwPo8IgX5JVSR6B9oEezBj92wVT4kDjnWGkurmB9TBPvf+ZL+giS3pmGqqtyshgyGHbUUv7TblaBt9rdhZ3EDNbVxfwUEaPW6pR7gdc0+n9sPLQTdgSxW+NJnrRfFcVCRgNc/BgMi6TFbgaJ69Z7iENnTCDKtwZ/UuBypO3UT/nL/spSB1Gk8+GQBKcnmzo9UuQF4+MD1wy44rU5//Etxj3s9oWuKPjbR0WdXAWIJ2oUKiMj4n/aZwNbTp1hzYs8cSpPSxWqE3RML8Pf1LCv2GxhF5oOS9dTY+NzWw+k5f6cAcwdEpOrXIdcjqKBfe3jxbB4rUblXg1vrX0ukRhEJB1KdJbE6eZexmqei01HXqo54YkBc+QpiHm917mewKSs1sGXPmNNK11FmBzN/f0RnC5I7ubHRsiJ7AMSY9GTg5tYmxSwLbBmfJKCBfzgN9+drMUE0wEajI5IOgo1yo/m/45bi8AGpOGPEEXNnjh0SO1kvrAWInKIeoVzxhWjDUWLzXCSIt5V20rdw37qSJe+K+VFvCvWuPhheACea2Eo X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(1800799015)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:53:45.9622 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 89815843-c861-4ee1-6b95-08dc5bb8c199 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00001CDE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6713 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 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/15/24. 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=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6f05d2d4615a20eac1313912aedf3dfcf4f8f98c Thanks. Xueming Li --- >From 6f05d2d4615a20eac1313912aedf3dfcf4f8f98c Mon Sep 17 00:00:00 2001 From: Rahul Bhansali Date: Mon, 26 Feb 2024 19:05:36 +0530 Subject: [PATCH] net/cnxk: fix mbuf fields in multi-segment Tx Cc: Xueming Li [ upstream commit 8ed5ca4dda858c991b27ad6ce5a5525e26a960c0 ] Currently in debug mode when a buffer is allocated in SW, nb_segs will have invalid values as it didn't come from driver Rx path. Hence reset mbuf next and nb_segs fields in multi-seg Tx path. Fixes: 3626d5195d49 ("net/cnxk: add multi-segment Tx for CN10K") Signed-off-by: Rahul Bhansali --- drivers/net/cnxk/cn10k_tx.h | 2 ++ drivers/net/cnxk/cn9k_tx.h | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h index 84d71d0818..cc480d24e8 100644 --- a/drivers/net/cnxk/cn10k_tx.h +++ b/drivers/net/cnxk/cn10k_tx.h @@ -1328,6 +1328,7 @@ cn10k_nix_prepare_mseg(struct cn10k_eth_txq *txq, nb_segs = m->nb_segs - 1; m_next = m->next; m->next = NULL; + m->nb_segs = 1; slist = &cmd[3 + off + 1]; cookie = RTE_MBUF_DIRECT(m) ? m : rte_mbuf_from_indirect(m); @@ -1873,6 +1874,7 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd, nb_segs = m->nb_segs - 1; m_next = m->next; m->next = NULL; + m->nb_segs = 1; m = m_next; /* Fill mbuf segments */ do { diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h index 3596651cc2..94acbe64fa 100644 --- a/drivers/net/cnxk/cn9k_tx.h +++ b/drivers/net/cnxk/cn9k_tx.h @@ -647,6 +647,10 @@ cn9k_nix_prepare_mseg(struct cn9k_eth_txq *txq, rte_io_wmb(); #else RTE_SET_USED(cookie); +#endif +#ifdef RTE_ENABLE_ASSERT + m->next = NULL; + m->nb_segs = 1; #endif m = m_next; if (!m) @@ -683,6 +687,9 @@ cn9k_nix_prepare_mseg(struct cn9k_eth_txq *txq, sg_u = sg->u; slist++; } +#ifdef RTE_ENABLE_ASSERT + m->next = NULL; +#endif m = m_next; } while (nb_segs); @@ -696,6 +703,9 @@ done: segdw += (off >> 1) + 1 + !!(flags & NIX_TX_OFFLOAD_TSTAMP_F); send_hdr->w0.sizem1 = segdw - 1; +#ifdef RTE_ENABLE_ASSERT + rte_io_wmb(); +#endif return segdw; } @@ -912,6 +922,10 @@ cn9k_nix_prepare_mseg_vec_list(struct cn9k_eth_txq *txq, RTE_SET_USED(cookie); #endif +#ifdef RTE_ENABLE_ASSERT + m->next = NULL; + m->nb_segs = 1; +#endif m = m_next; /* Fill mbuf segments */ do { @@ -942,6 +956,9 @@ cn9k_nix_prepare_mseg_vec_list(struct cn9k_eth_txq *txq, sg_u = sg->u; slist++; } +#ifdef RTE_ENABLE_ASSERT + m->next = NULL; +#endif m = m_next; } while (nb_segs); @@ -957,6 +974,9 @@ cn9k_nix_prepare_mseg_vec_list(struct cn9k_eth_txq *txq, !!(flags & NIX_TX_OFFLOAD_TSTAMP_F); send_hdr->w0.sizem1 = segdw - 1; +#ifdef RTE_ENABLE_ASSERT + rte_io_wmb(); +#endif return segdw; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:06.282742553 +0800 +++ 0039-net-cnxk-fix-mbuf-fields-in-multi-segment-Tx.patch 2024-04-13 20:43:04.957753984 +0800 @@ -1 +1 @@ -From 8ed5ca4dda858c991b27ad6ce5a5525e26a960c0 Mon Sep 17 00:00:00 2001 +From 6f05d2d4615a20eac1313912aedf3dfcf4f8f98c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 8ed5ca4dda858c991b27ad6ce5a5525e26a960c0 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 91b7f15c02..266c899a05 100644 +index 84d71d0818..cc480d24e8 100644 @@ -23 +25 @@ -@@ -1277,6 +1277,7 @@ cn10k_nix_prepare_mseg(struct cn10k_eth_txq *txq, +@@ -1328,6 +1328,7 @@ cn10k_nix_prepare_mseg(struct cn10k_eth_txq *txq, @@ -31 +33 @@ -@@ -1822,6 +1823,7 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd, +@@ -1873,6 +1874,7 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,