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 E48DB43E57 for ; Sat, 13 Apr 2024 14:53:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF8FE40294; Sat, 13 Apr 2024 14:53:44 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2078.outbound.protection.outlook.com [40.107.244.78]) by mails.dpdk.org (Postfix) with ESMTP id E71CE400D6 for ; Sat, 13 Apr 2024 14:53:43 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HWQc/UJWXMzvnR49WFiTspju5b05Pdu3UIoUvgjOc2RffKtd3KbTq8OM/zsmmDlmS9JbVIq4J9+LRKsJ1TCmEzrbAhlHoaEUt5J23ASfOx9eFdR67ESL0zRHTvlTV9WyVy72cjAnY+b8h9fRwTHlLM1HDibKzAn375mq2aJdcDyAuB2/0CdaIVgmga/u/WuKH9+YL8V/jKGM+Rfry2/G6LWiOwoCFsAs2f0gvzImMBCG7TLyybQKlm2uMryMvE/JHwCCzgSYuhtltbY4ds+mHpSHbC3/dtDp9ldXfbiXscrFdvZrvDuNRmiD2SEfqB3oVWVuYoQTMZoHMg0SNKp9qA== 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=Z5eTy3Id1fo0RjEqwfSWAp6JXcy1NuGtGzIi2EhtJRQ=; b=CEHrU63Gn1EwEP4J7hbap2AM8BvdbVL2SMeu9YTbQ8sOEEKIWkBrfKs9IyKk3ywoy2Gx9ZrKQrEFyxyt1FisykuTOAp/TA6LQvCRV2JmkX4KhJQDChFqlGUdJ85t145xyHGEJsz5amuRAxN3FtHJYKHM2Yz2DS9J6MGAcZl2ODb79uclEmn/k7yak1UX02/7R+COU4sFMQAkMY482g89HFyDgh99S4Dyfl0w7yPxg56bWK73U0TXj/QzxV0R0g+gP6GxzdjuPHmVUkMgwZycNWcG8AwTcz90UisxLp1zWsNMNpEAKft5vcH1daLzYoaMMB+Bz9U+JWKEGwpWIvpVNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=Z5eTy3Id1fo0RjEqwfSWAp6JXcy1NuGtGzIi2EhtJRQ=; b=WGNKbr1r7da8qOWLRPACTnVuFcAq/jWtxnEYYBX8J2PkvoTDb79ntRASRhC0eBEHuzZrkw2xiolPo/HbpHWt+7HRErFwM0TdkVMk+LTOz9VMfqI9G4eKLVIGnxbp7CKHXX8H6976psx0mr2WHYKgiz445GAQq0ws6+QAZYSZTtwARlnuMV8TxB5kKfE346mLQa4u8yWBV/lyhwqKFUPnN/c3s29ejgXP/l6FeGPyIC1namLuOd50VP9ydKfJnAzRa9SXvSMRxV8qVgHIENiKRMtjrRuaem6swEzUGxHtfmG90FN5ToZJnjUb+NsTYCz5yLSoZViyP4/bj1F55+bc9w== Received: from DM6PR11CA0023.namprd11.prod.outlook.com (2603:10b6:5:190::36) by DM4PR12MB6397.namprd12.prod.outlook.com (2603:10b6:8:b4::10) 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:39 +0000 Received: from DS3PEPF0000C37A.namprd04.prod.outlook.com (2603:10b6:5:190:cafe::27) by DM6PR11CA0023.outlook.office365.com (2603:10b6:5:190::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.31 via Frontend Transport; Sat, 13 Apr 2024 12:53:39 +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 DS3PEPF0000C37A.mail.protection.outlook.com (10.167.23.4) 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:39 +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.41; Sat, 13 Apr 2024 05:53:32 -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:31 -0700 From: Xueming Li To: Rahul Bhansali CC: dpdk stable Subject: patch 'net/cnxk: add cookies check for multi-segment offload' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:48:37 +0800 Message-ID: <20240413125005.725659-37-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: DS3PEPF0000C37A:EE_|DM4PR12MB6397:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e160710-62c6-479d-9d79-08dc5bb8bdcc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f+vGZLOEnskVIiJb7tM7OKcJEXFZg6yxKse1NZ70BSQbtzuMgS7PtCjNHEJM76VC0EkkzGntmhAyYy2McQ+inuRBIwNgKbSFGOaHy/vLcm46/cBRsSEj/R34OpniMyFy6XJCCKvuMsVKVgL+kr5/gd7gQyHlo1M2Dcp25s4vUUtqM3U0FBVHHbTRAw/IT6kaQFfe+2X44hvkywXDBT9FSpQQH+ckVoBzYRHy8vQJMYNrJp+FSQ3MdTCiSa6ziGjqpkNLcIbJxBt4yuNuPqxbcbPOC7piYUMdKHwXntDDnL63mXAgwgGYK0Wqi2WV2a5KdtPif6LF6sGnF8/OPjDIrpgXXGklo51cBabv83KCC5pNnc5+XfxdUI03U/e3mil1UoDBoGSLKOKfeTknNoOKnIeejozZQLZh78zYPI9u7wdwD5Ao6MIyClq2mZyMQtsm7wVY6Lv5M5nDejb9QPJtTITEMWqF7AWKaEc/mqZHh2615DDJ+Ed9j2K8mTHaD/3hZvpHx6qntjSaXwz0pgPENL9QKgM/yN+aJwPl79+0uGH0YIwIqPePYaH/rzPooFFjt7/Mmuud4t80SOamxzNXpOlSA/LOFpbpvi0f7lNWNQzzs16rSa+6hFG4+Dx5ll+VIo+gn2HwzXelNvbXFKaUXiPx6zFDevAxjswkoXPJ6lkRVmgmFgpmxnzw0Ryh77E4Zcz1wLiWSx37fU7OOlDjLjCFa8h+QGwYlx+gFwPJxEViAwEHEYETRAnJEivQpXve 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:(13230031)(376005)(36860700004)(1800799015)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:53:39.4618 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e160710-62c6-479d-9d79-08dc5bb8bdcc 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: DS3PEPF0000C37A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6397 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=e5450b2bba3066b7b34e29a4edae3450b9b7d46c Thanks. Xueming Li --- >From e5450b2bba3066b7b34e29a4edae3450b9b7d46c Mon Sep 17 00:00:00 2001 From: Rahul Bhansali Date: Mon, 26 Feb 2024 19:05:33 +0530 Subject: [PATCH] net/cnxk: add cookies check for multi-segment offload Cc: Xueming Li [ upstream commit 26a6bda9dfd153192c4cfb73b3367398caa3afaa ] Fix missing check cookies with multi-seg offload case Fixes: 3626d5195d49 ("net/cnxk: add multi-segment Tx for CN10K") Signed-off-by: Rahul Bhansali --- drivers/net/cnxk/cn10k_tx.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h index 025eff2913..84d71d0818 100644 --- a/drivers/net/cnxk/cn10k_tx.h +++ b/drivers/net/cnxk/cn10k_tx.h @@ -1867,6 +1867,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd, len -= dlen; sg_u = sg_u | ((uint64_t)dlen); + /* Mark mempool object as "put" since it is freed by NIX */ + RTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0); + nb_segs = m->nb_segs - 1; m_next = m->next; m->next = NULL; @@ -1892,6 +1895,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd, slist++; } m->next = NULL; + /* Mark mempool object as "put" since it is freed by NIX */ + RTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0); + m = m_next; } while (nb_segs); @@ -1915,8 +1921,11 @@ cn10k_nix_prepare_mseg_vec(struct rte_mbuf *m, uint64_t *cmd, uint64x2_t *cmd0, union nix_send_hdr_w0_u sh; union nix_send_sg_s sg; - if (m->nb_segs == 1) + if (m->nb_segs == 1) { + /* Mark mempool object as "put" since it is freed by NIX */ + RTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0); return; + } sh.u = vgetq_lane_u64(cmd0[0], 0); sg.u = vgetq_lane_u64(cmd1[0], 0); @@ -1976,6 +1985,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct cn10k_eth_txq *txq, *data128 |= ((__uint128_t)7) << *shift; *shift += 3; + /* Mark mempool object as "put" since it is freed by NIX */ + RTE_MEMPOOL_CHECK_COOKIES(mbufs[0]->pool, (void **)&mbufs[0], 1, 0); + RTE_MEMPOOL_CHECK_COOKIES(mbufs[1]->pool, (void **)&mbufs[1], 1, 0); + RTE_MEMPOOL_CHECK_COOKIES(mbufs[2]->pool, (void **)&mbufs[2], 1, 0); + RTE_MEMPOOL_CHECK_COOKIES(mbufs[3]->pool, (void **)&mbufs[3], 1, 0); return 1; } } @@ -1994,6 +2008,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct cn10k_eth_txq *txq, vst1q_u64(lmt_addr + 10, cmd2[j + 1]); vst1q_u64(lmt_addr + 12, cmd1[j + 1]); vst1q_u64(lmt_addr + 14, cmd3[j + 1]); + + /* Mark mempool object as "put" since it is freed by NIX */ + RTE_MEMPOOL_CHECK_COOKIES(mbufs[j]->pool, (void **)&mbufs[j], 1, 0); + RTE_MEMPOOL_CHECK_COOKIES(mbufs[j + 1]->pool, + (void **)&mbufs[j + 1], 1, 0); } else if (flags & NIX_TX_NEED_EXT_HDR) { /* EXT header take 3 each, space for 2 segs.*/ cn10k_nix_prepare_mseg_vec(mbufs[j], -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:06.234572916 +0800 +++ 0037-net-cnxk-add-cookies-check-for-multi-segment-offload.patch 2024-04-13 20:43:04.957753984 +0800 @@ -1 +1 @@ -From 26a6bda9dfd153192c4cfb73b3367398caa3afaa Mon Sep 17 00:00:00 2001 +From e5450b2bba3066b7b34e29a4edae3450b9b7d46c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 26a6bda9dfd153192c4cfb73b3367398caa3afaa ] @@ -9 +11,0 @@ -Cc: stable@dpdk.org @@ -17 +19 @@ -index 9647f4259e..91b7f15c02 100644 +index 025eff2913..84d71d0818 100644 @@ -20 +22 @@ -@@ -1816,6 +1816,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd, +@@ -1867,6 +1867,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd, @@ -30 +32 @@ -@@ -1841,6 +1844,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd, +@@ -1892,6 +1895,9 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd, @@ -40 +42 @@ -@@ -1864,8 +1870,11 @@ cn10k_nix_prepare_mseg_vec(struct rte_mbuf *m, uint64_t *cmd, uint64x2_t *cmd0, +@@ -1915,8 +1921,11 @@ cn10k_nix_prepare_mseg_vec(struct rte_mbuf *m, uint64_t *cmd, uint64x2_t *cmd0, @@ -53 +55 @@ -@@ -1925,6 +1934,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct cn10k_eth_txq *txq, +@@ -1976,6 +1985,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct cn10k_eth_txq *txq, @@ -65 +67 @@ -@@ -1943,6 +1957,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct cn10k_eth_txq *txq, +@@ -1994,6 +2008,11 @@ cn10k_nix_prep_lmt_mseg_vector(struct cn10k_eth_txq *txq,