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 DC6F646A63 for ; Thu, 26 Jun 2025 14:06:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1C35402A8; Thu, 26 Jun 2025 14:06:57 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2059.outbound.protection.outlook.com [40.107.93.59]) by mails.dpdk.org (Postfix) with ESMTP id DCC90402A1 for ; Thu, 26 Jun 2025 14:06:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YJ5CCCcClMDUC6906UGL2IfJ5cJKMWqHkVB5rJKJS8Ffaanx2UQnw9wWNG4CsqrYj9JYk6wzVJ6lTKN2v16YJSeXaHv75cJfR+ipUvwdBlAUFaVz8F3qVnzKALogvdRgL+7UVoKOYHfXulZ0WIs8UWcPElKFt/Oc2hNnJF4QWT4AUV9QkbDQKa0+60EV0eaPNje7h1swdmtPsC7q3P9p3U834s093lMZfLrjX8+RMHTHqCrq/QEYSsjjHJ//g/QL77sL0bzwX/xIFUTaUgbImiOJircxpAQguL3okg28CDtOjBGP3v49bO9WYQhBGo39xjoGwYZNxFe+/eNHEASDGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=6FntHmT2D8c1xMyKakVHLur5I0S9dU+RDHkquo3P+tQ=; b=PFm9wEO5AzRJ7r00LWMK76w2wgUM7J5BGp9bqr/sKhBanV8I/TplDPkjIXK5YopMTj4Pm/Jm20pKI4pK3KetserdraZaA/j182H1WT7THFe+aR3nA8c4o0ekhPENlb4+lmgmTqPsEF+WLLSO/+Dm+UnsPbM4EPUhNQAztE4yxqP5vRIc5k8H8/Dkpl/ohJfB/Sg5IsTK9SU175l1lzLd9CHcf6IvbWo27DnAuMYeTPQwiBY02o+GnUlP0tAP0j1roC6j+ygQY9fz29hWtHzLnT+dhgv90QMiA9s4WHMGWEVkUZgHVZHn8qMfh5Rtw/1WBplqnFV4LOSpgXYFBZfxbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=huawei.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=6FntHmT2D8c1xMyKakVHLur5I0S9dU+RDHkquo3P+tQ=; b=maG/nNQ11mkDcLEOeG3iYaC+SXDWBpQ/0llP5TIdWCEuwdRCZt1ddqym9NuYAtNlMQE44zUDsn5JrFxFcObVDG4sjxW1dL9jmIGngF1VkZSJ1EqujqZLZudkpppQ1/wxkIjCfeMdr/FpGbSOiLtfc63zZxyHDucylRp9D9vkxyunSa9HA1Rp2VIcEXLq7OZD74x3ayGESIZs4Wv5sc/EBNZ8vuB6Ru2MeE69yw2N9RNmUFMrBeCJSKQEVqL9At/uYMfMqdJ9CHbdLWTKZNTpmLSdBWvb1QpBG09TRMdJ79LkuQDGmTMGgrr3ZzQWNjRL+5/3alvdYyiaAjOYlVRP1Q== Received: from MN2PR08CA0027.namprd08.prod.outlook.com (2603:10b6:208:239::32) by DM4PR12MB8500.namprd12.prod.outlook.com (2603:10b6:8:190::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8880.21; Thu, 26 Jun 2025 12:06:52 +0000 Received: from MN1PEPF0000F0E4.namprd04.prod.outlook.com (2603:10b6:208:239:cafe::2) by MN2PR08CA0027.outlook.office365.com (2603:10b6:208:239::32) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8880.17 via Frontend Transport; Thu, 26 Jun 2025 12:06:52 +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 MN1PEPF0000F0E4.mail.protection.outlook.com (10.167.242.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8880.14 via Frontend Transport; Thu, 26 Jun 2025 12:06:51 +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.1544.4; Thu, 26 Jun 2025 05:06: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.1544.14; Thu, 26 Jun 2025 05:06:30 -0700 From: Xueming Li To: Dengdui Huang CC: Xueming Li , dpdk stable Subject: patch 'net/hns3: fix CRC data segment' has been queued to stable release 23.11.5 Date: Thu, 26 Jun 2025 20:01:12 +0800 Message-ID: <20250626120145.27369-53-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250626120145.27369-1-xuemingl@nvidia.com> References: <20250626120145.27369-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: MN1PEPF0000F0E4:EE_|DM4PR12MB8500:EE_ X-MS-Office365-Filtering-Correlation-Id: f3de54cd-6959-445c-1f1b-08ddb4a9ef65 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ejhxSepMwaocrVDm4CeKMDlgxUGn+whQc26UO2AjCvw/F9Xudq0aeZQti+Bj?= =?us-ascii?Q?pcbQdVK99RwW9WTxiYptxTTV7Fil/ddAjWq4MCCYggspFC24uSiCnzwVD3qM?= =?us-ascii?Q?jNheAFAPZ6VlJLfbOJGQHQovNQRmLGJWHwSNekROrv75YDMbyKxAiIkGQVro?= =?us-ascii?Q?Js+9hMAaLryUao4xwvLkHuzlbi6kqag4PxS3PTbhPO09oKvgMj1w2h8ytOU8?= =?us-ascii?Q?7pbDAVKunS+vs1GP8mOrTSZyopI+sKIgTEI0/eVAwwuXZ1fAjYE9PKu3qAeu?= =?us-ascii?Q?UDbHgok23hg0IpPqTBLbrhyRISjEtc7DL5jV6xVzh/TEOheww4iJHOjduLlB?= =?us-ascii?Q?f6CuXhQqkC7E1mJWcyPBWAZN/GZaqeAey5wfWN/PWqDc1HWOfGsg9Z6AmOun?= =?us-ascii?Q?05Q4f3YhILIQ4wHIWrbDCQ+zdLiMuHbKdz8wEBd4vmgmeNGUwJlPODfWFZsB?= =?us-ascii?Q?pQlvzb77RPZ2YlgsSBOkstCWlc/TBQ9Z4qSwpv15DFGp7bw+tJ13tKLRCtMm?= =?us-ascii?Q?HeEEIIcVq1uASygSnjuMX0ceIOwfNtv491aWsr+N5znRFYbI/x5qNviaYW42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uIyVdKZNQpmuyCGFl+dMUPPm?= =?us-ascii?Q?pOqZStszqaqLfUAqO+9+7BLnzTXcIuh5VXvo?= 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:(13230040)(36860700013)(1800799024)(376014)(82310400026)(7053199007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2025 12:06:51.3455 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f3de54cd-6959-445c-1f1b-08ddb4a9ef65 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: MN1PEPF0000F0E4.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB8500 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.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/28/25. 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=25938ace6365eb3b15f2178657c77c427ce6993e Thanks. Xueming Li --- >From 25938ace6365eb3b15f2178657c77c427ce6993e Mon Sep 17 00:00:00 2001 From: Dengdui Huang Date: Fri, 16 May 2025 15:15:18 +0800 Subject: [PATCH] net/hns3: fix CRC data segment Cc: Xueming Li [ upstream commit 7a99b6ca9d079e9364ba61d3fe802a4761739c8f ] When the packet is received into a multisegment mbuf and the last segment contains only CRC data, the driver should not release this segment. Otherwise, the application cannot look the CRC data. This patch fixes it. Fixes: 8973d7c4ca12 ("net/hns3: support keeping CRC") Signed-off-by: Dengdui Huang --- drivers/net/hns3/hns3_rxtx.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index ab4789c2f1..58aa6edff4 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -2383,18 +2383,16 @@ hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb, } static inline void -recalculate_data_len(struct rte_mbuf *first_seg, struct rte_mbuf *last_seg, - struct rte_mbuf *rxm, struct hns3_rx_queue *rxq, - uint16_t data_len) +recalculate_data_len(struct rte_mbuf *last_seg, struct rte_mbuf *rxm, + struct hns3_rx_queue *rxq) { + uint16_t data_len = rxm->data_len; uint8_t crc_len = rxq->crc_len; if (data_len <= crc_len) { - rte_pktmbuf_free_seg(rxm); - first_seg->nb_segs--; + rxm->data_len = 0; last_seg->data_len = (uint16_t)(last_seg->data_len - (crc_len - data_len)); - last_seg->next = NULL; } else rxm->data_len = (uint16_t)(data_len - crc_len); } @@ -2725,8 +2723,7 @@ hns3_recv_scattered_pkts(void *rx_queue, rxm->next = NULL; if (unlikely(rxq->crc_len > 0)) { first_seg->pkt_len -= rxq->crc_len; - recalculate_data_len(first_seg, last_seg, rxm, rxq, - rxm->data_len); + recalculate_data_len(last_seg, rxm, rxq); } first_seg->port = rxq->port_id; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-26 19:59:19.828784142 +0800 +++ 0052-net-hns3-fix-CRC-data-segment.patch 2025-06-26 19:59:17.418418043 +0800 @@ -1 +1 @@ -From 7a99b6ca9d079e9364ba61d3fe802a4761739c8f Mon Sep 17 00:00:00 2001 +From 25938ace6365eb3b15f2178657c77c427ce6993e Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 7a99b6ca9d079e9364ba61d3fe802a4761739c8f ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index bb7ffee12c..49b6f16ccd 100644 +index ab4789c2f1..58aa6edff4 100644 @@ -23 +25 @@ -@@ -2386,18 +2386,16 @@ hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb, +@@ -2383,18 +2383,16 @@ hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb, @@ -46 +48 @@ -@@ -2728,8 +2726,7 @@ hns3_recv_scattered_pkts(void *rx_queue, +@@ -2725,8 +2723,7 @@ hns3_recv_scattered_pkts(void *rx_queue,