patch 'net/hns3: fix CRC data segment' has been queued to stable release 24.11.3
Kevin Traynor
ktraynor at redhat.com
Fri Jul 18 21:29:56 CEST 2025
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 <huangdengdui at huawei.com>
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 <huangdengdui at huawei.com>
---
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 at dpdk.org
@@ -20 +21 @@
-index bb7ffee12c..49b6f16ccd 100644
+index 09e39cb673..00a105129d 100644
More information about the stable
mailing list