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 F136646BAE for ; Fri, 18 Jul 2025 21:35:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ECDD640611; Fri, 18 Jul 2025 21:35:09 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id BB76F40611 for ; Fri, 18 Jul 2025 21:35:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752867308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SgkxmyoVgRPwhNp8/FdZs8Hsb0JABgIvznnjpdAmSPw=; b=fKO2KrmTq+75Uy31j0HPpyb9YGRYdFD7KIn5NVBye/utrBRR9r7edNP1GAlfm+mB6DCYKX ETuFTStKaxm3+mygVjKYjoxgOzEn96ibDV0omYCouJ/RxCsuxKMlaT0TI1AFQuRHBvzh40 vK4kFpmurQD11O44ojjaX65sG0+/KMw= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-397-f3ri8UVcOzWo1jiHdge01Q-1; Fri, 18 Jul 2025 15:35:05 -0400 X-MC-Unique: f3ri8UVcOzWo1jiHdge01Q-1 X-Mimecast-MFC-AGG-ID: f3ri8UVcOzWo1jiHdge01Q_1752867304 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 483BB1800C3C; Fri, 18 Jul 2025 19:35:04 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.40]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0AD05180045B; Fri, 18 Jul 2025 19:35:02 +0000 (UTC) From: Kevin Traynor To: Dengdui Huang Cc: dpdk stable Subject: patch 'net/hns3: fix CRC data segment' has been queued to stable release 24.11.3 Date: Fri, 18 Jul 2025 20:29:56 +0100 Message-ID: <20250718193247.1008129-62-ktraynor@redhat.com> In-Reply-To: <20250718193247.1008129-1-ktraynor@redhat.com> References: <20250718193247.1008129-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Os01QoyeSamISlT_CDM-TdjbtrQoIHK-NfKBFj3aaA0_1752867304 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 24.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 07/23/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://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/3639d36cb4f2118b3f422d9124a4e525e4a028ea Thanks. Kevin --- >From 3639d36cb4f2118b3f422d9124a4e525e4a028ea 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 [ 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 09e39cb673..00a105129d 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -2387,16 +2387,14 @@ 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); @@ -2729,6 +2727,5 @@ hns3_recv_scattered_pkts(void *rx_queue, 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); } -- 2.50.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-07-18 20:29:13.226353663 +0100 +++ 0062-net-hns3-fix-CRC-data-segment.patch 2025-07-18 20:29:10.961907426 +0100 @@ -1 +1 @@ -From 7a99b6ca9d079e9364ba61d3fe802a4761739c8f Mon Sep 17 00:00:00 2001 +From 3639d36cb4f2118b3f422d9124a4e525e4a028ea Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7a99b6ca9d079e9364ba61d3fe802a4761739c8f ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index bb7ffee12c..49b6f16ccd 100644 +index 09e39cb673..00a105129d 100644