From: Xueming Li <xuemingl@nvidia.com>
To: Dengdui Huang <huangdengdui@huawei.com>
Cc: Xueming Li <xuemingl@nvidia.com>,
Huisong Li <lihuisong@huawei.com>, "Jie Hai" <haijie1@huawei.com>,
dpdk stable <stable@dpdk.org>
Subject: patch 'net/hns3: fix Rx packet without CRC data' has been queued to stable release 23.11.5
Date: Wed, 30 Jul 2025 15:10:12 +0800 [thread overview]
Message-ID: <20250730071045.136672-2-xuemingl@nvidia.com> (raw)
In-Reply-To: <20250730071045.136672-1-xuemingl@nvidia.com>
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 08/10/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=edac72158acfa4dd2213aedcb238b4eea8a627d4
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From edac72158acfa4dd2213aedcb238b4eea8a627d4 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 15 Jul 2025 11:16:49 +0800
Subject: [PATCH] net/hns3: fix Rx packet without CRC data
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 99c065da47c432e9529f761b457cde1fd8c89f20 ]
When KEEP_CRC offload is enabled, the CRC data is still stripped
in following cases:
1. For HIP08 network engine, the packet type is TCP and the length
is less than or equal to 60B.
2. For HIP09 network engine, the packet type is IP and the length
is less than or equal to 60B.
So driver has to recaculate packet CRC for this rare scenarios.
In addition, to avoid impacting performance, KEEP_CRC is not
supported when NEON or SVE algorithm is used.
Fixes: 8973d7c4ca12 ("net/hns3: support keeping CRC")
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 2 +
drivers/net/hns3/hns3_ethdev.h | 23 +++++
drivers/net/hns3/hns3_rxtx.c | 119 +++++++++++++++++++++-----
drivers/net/hns3/hns3_rxtx.h | 3 +
drivers/net/hns3/hns3_rxtx_vec.c | 4 +-
drivers/net/hns3/hns3_rxtx_vec_neon.h | 19 ----
drivers/net/hns3/hns3_rxtx_vec_sve.c | 3 +-
7 files changed, 128 insertions(+), 45 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 99566375ea..f14fb61cbb 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2743,6 +2743,7 @@ hns3_get_capability(struct hns3_hw *hw)
hw->udp_cksum_mode = HNS3_SPECIAL_PORT_SW_CKSUM_MODE;
pf->support_multi_tc_pause = false;
hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_64;
+ hw->strip_crc_ptype = HNS3_STRIP_CRC_PTYPE_TCP;
return 0;
}
@@ -2764,6 +2765,7 @@ hns3_get_capability(struct hns3_hw *hw)
hw->udp_cksum_mode = HNS3_SPECIAL_PORT_HW_CKSUM_MODE;
pf->support_multi_tc_pause = true;
hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_128;
+ hw->strip_crc_ptype = HNS3_STRIP_CRC_PTYPE_IP;
return 0;
}
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 00d226d71c..0ce4974da6 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -54,6 +54,10 @@
#define HNS3_SPECIAL_PORT_SW_CKSUM_MODE 0
#define HNS3_SPECIAL_PORT_HW_CKSUM_MODE 1
+#define HNS3_STRIP_CRC_PTYPE_NONE 0
+#define HNS3_STRIP_CRC_PTYPE_TCP 1
+#define HNS3_STRIP_CRC_PTYPE_IP 2
+
#define HNS3_UC_MACADDR_NUM 128
#define HNS3_VF_UC_MACADDR_NUM 48
#define HNS3_MC_MACADDR_NUM 128
@@ -655,6 +659,25 @@ struct hns3_hw {
*/
uint8_t udp_cksum_mode;
+ /*
+ * When KEEP_CRC offload is enabled, the CRC data of some type packets
+ * whose length is less than or equal to HNS3_KEEP_CRC_OK_MIN_PKT_LEN
+ * is still be stripped on some network engine. So here has to use this
+ * field to distinguish the difference between different network engines.
+ * value range:
+ * - HNS3_STRIP_CRC_PTYPE_TCP
+ * This value for HIP08 network engine.
+ * Indicates that only the IP-TCP packet type is stripped.
+ *
+ * - HNS3_STRIP_CRC_PTYPE_IP
+ * This value for HIP09 network engine.
+ * Indicates that all IP packet types are stripped.
+ *
+ * - HNS3_STRIP_CRC_PTYPE_NONE
+ * Indicates that all packet types are not stripped.
+ */
+ uint8_t strip_crc_ptype;
+
struct hns3_port_base_vlan_config port_base_vlan_cfg;
pthread_mutex_t flows_lock; /* rte_flow ops lock */
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 1fb34e286d..9c0d4b4cd4 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -11,6 +11,7 @@
#include <rte_io.h>
#include <rte_net.h>
#include <rte_malloc.h>
+#include <rte_net_crc.h>
#if defined(RTE_ARCH_ARM64)
#include <rte_cpuflags.h>
#include <rte_vect.h>
@@ -1779,8 +1780,9 @@ hns3_rx_buf_len_calc(struct rte_mempool *mp, uint16_t *rx_buf_len)
}
static int
-hns3_rxq_conf_runtime_check(struct hns3_hw *hw, uint16_t buf_size,
- uint16_t nb_desc)
+hns3_rxq_conf_runtime_check(struct hns3_hw *hw,
+ const struct rte_eth_rxconf *conf,
+ uint16_t buf_size, uint16_t nb_desc)
{
struct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id];
eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
@@ -1813,6 +1815,14 @@ hns3_rxq_conf_runtime_check(struct hns3_hw *hw, uint16_t buf_size,
return -EINVAL;
}
}
+
+ if ((conf->offloads & RTE_ETH_RX_OFFLOAD_KEEP_CRC) &&
+ pkt_burst != hns3_recv_pkts_simple &&
+ pkt_burst != hns3_recv_scattered_pkts) {
+ hns3_err(hw, "KEEP_CRC offload is not supported with the current Rx function.");
+ return -EINVAL;
+ }
+
return 0;
}
@@ -1849,7 +1859,7 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf,
}
if (hw->data->dev_started) {
- ret = hns3_rxq_conf_runtime_check(hw, *buf_size, nb_desc);
+ ret = hns3_rxq_conf_runtime_check(hw, conf, *buf_size, nb_desc);
if (ret) {
hns3_err(hw, "Rx queue runtime setup fail.");
return ret;
@@ -1970,6 +1980,8 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
else
rxq->crc_len = 0;
+ rxq->keep_crc_fail_ptype = hw->strip_crc_ptype;
+
rxq->bulk_mbuf_num = 0;
rte_spinlock_lock(&hw->lock);
@@ -2443,6 +2455,55 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
pf->rx_timestamp = timestamp;
}
+static inline bool
+hns3_need_recalculate_crc(struct hns3_rx_queue *rxq, struct rte_mbuf *m)
+{
+ uint32_t ptype = m->packet_type;
+
+ if (rxq->keep_crc_fail_ptype == HNS3_STRIP_CRC_PTYPE_NONE)
+ return false;
+
+ if (m->pkt_len > HNS3_KEEP_CRC_OK_MIN_PKT_LEN)
+ return false;
+
+ if (!(RTE_ETH_IS_IPV4_HDR(ptype) || RTE_ETH_IS_IPV6_HDR(ptype)))
+ return false;
+
+ if (rxq->keep_crc_fail_ptype == HNS3_STRIP_CRC_PTYPE_TCP)
+ return (ptype & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_TCP;
+
+ return true;
+}
+
+/*
+ * The hns3 driver requires that mbuf size must be at least 512B.
+ * When CRC is stripped by hardware, the pkt_len must be less than
+ * or equal to 60B. Therefore, the space of the mbuf is enough
+ * to insert the CRC.
+ */
+static_assert(HNS3_KEEP_CRC_OK_MIN_PKT_LEN < HNS3_MIN_BD_BUF_SIZE,
+ "buffer size too small to insert CRC");
+
+static inline void
+hns3_recalculate_crc(struct rte_mbuf *m)
+{
+ char *append_data;
+ uint32_t crc;
+
+ crc = rte_net_crc_calc(rte_pktmbuf_mtod(m, void *),
+ m->data_len, RTE_NET_CRC32_ETH);
+
+ /*
+ * After CRC is stripped by hardware, pkt_len and data_len do not
+ * contain the CRC length. Therefore, after CRC data is appended
+ * by PMD again.
+ */
+ append_data = rte_pktmbuf_append(m, RTE_ETHER_CRC_LEN);
+
+ /* CRC data is binary data and does not care about the byte order. */
+ memcpy(append_data, &crc, RTE_ETHER_CRC_LEN);
+}
+
uint16_t
hns3_recv_pkts_simple(void *rx_queue,
struct rte_mbuf **rx_pkts,
@@ -2513,8 +2574,7 @@ hns3_recv_pkts_simple(void *rx_queue,
rxdp->rx.bd_base_info = 0;
rxm->data_off = RTE_PKTMBUF_HEADROOM;
- rxm->pkt_len = (uint16_t)(rte_le_to_cpu_16(rxd.rx.pkt_len)) -
- rxq->crc_len;
+ rxm->pkt_len = (uint16_t)(rte_le_to_cpu_16(rxd.rx.pkt_len));
rxm->data_len = rxm->pkt_len;
rxm->port = rxq->port_id;
rxm->hash.rss = rte_le_to_cpu_32(rxd.rx.rss_hash);
@@ -2539,6 +2599,12 @@ hns3_recv_pkts_simple(void *rx_queue,
if (rxm->packet_type == RTE_PTYPE_L2_ETHER_TIMESYNC)
rxm->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP;
+ if (unlikely(rxq->crc_len > 0) &&
+ hns3_need_recalculate_crc(rxq, rxm))
+ hns3_recalculate_crc(rxm);
+ rxm->pkt_len -= rxq->crc_len;
+ rxm->data_len -= rxq->crc_len;
+
hns3_rxd_to_vlan_tci(rxq, rxm, l234_info, &rxd);
/* Increment bytes counter */
@@ -2705,10 +2771,10 @@ hns3_recv_scattered_pkts(void *rx_queue,
rxm->data_off = RTE_PKTMBUF_HEADROOM;
rxm->data_len = rte_le_to_cpu_16(rxd.rx.size);
+ rxm->next = NULL;
if (!(bd_base_info & BIT(HNS3_RXD_FE_B))) {
last_seg = rxm;
- rxm->next = NULL;
continue;
}
@@ -2723,22 +2789,6 @@ hns3_recv_scattered_pkts(void *rx_queue,
*/
first_seg->pkt_len = rte_le_to_cpu_16(rxd.rx.pkt_len);
- /*
- * This is the last buffer of the received packet. If the CRC
- * is not stripped by the hardware:
- * - Subtract the CRC length from the total packet length.
- * - If the last buffer only contains the whole CRC or a part
- * of it, free the mbuf associated to the last buffer. If part
- * of the CRC is also contained in the previous mbuf, subtract
- * the length of that CRC part from the data length of the
- * previous mbuf.
- */
- rxm->next = NULL;
- if (unlikely(rxq->crc_len > 0)) {
- first_seg->pkt_len -= rxq->crc_len;
- recalculate_data_len(last_seg, rxm, rxq);
- }
-
first_seg->port = rxq->port_id;
first_seg->hash.rss = rte_le_to_cpu_32(rxd.rx.rss_hash);
first_seg->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
@@ -2767,6 +2817,31 @@ hns3_recv_scattered_pkts(void *rx_queue,
if (first_seg->packet_type == RTE_PTYPE_L2_ETHER_TIMESYNC)
rxm->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP;
+ /*
+ * This is the last buffer of the received packet. If the CRC
+ * is not stripped by the hardware:
+ * - Subtract the CRC length from the total packet length.
+ * - If the last buffer only contains the whole CRC or a part
+ * of it, free the mbuf associated to the last buffer. If part
+ * of the CRC is also contained in the previous mbuf, subtract
+ * the length of that CRC part from the data length of the
+ * previous mbuf.
+ *
+ * In addition, the CRC is still stripped for a kind of packets
+ * in hns3 NIC:
+ * 1. All IP-TCP packet whose the length is less than and equal
+ * to 60 Byte (no CRC) on HIP08 network engine.
+ * 2. All IP packet whose the length is less than and equal to
+ * 60 Byte (no CRC) on HIP09 network engine.
+ * In this case, the PMD calculates the CRC and appends it to
+ * mbuf.
+ */
+ if (unlikely(rxq->crc_len > 0)) {
+ if (hns3_need_recalculate_crc(rxq, first_seg))
+ hns3_recalculate_crc(first_seg);
+ first_seg->pkt_len -= rxq->crc_len;
+ recalculate_data_len(last_seg, rxm, rxq);
+ }
hns3_rxd_to_vlan_tci(rxq, first_seg, l234_info, &rxd);
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index b6a6513307..f182ff6a9d 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -178,6 +178,8 @@
(HNS3_TXD_VLD_CMD | HNS3_TXD_FE_CMD | HNS3_TXD_DEFAULT_BDTYPE)
#define HNS3_TXD_SEND_SIZE_SHIFT 16
+#define HNS3_KEEP_CRC_OK_MIN_PKT_LEN 60
+
enum hns3_pkt_l2t_type {
HNS3_L2_TYPE_UNICAST,
HNS3_L2_TYPE_MULTICAST,
@@ -341,6 +343,7 @@ struct hns3_rx_queue {
*/
uint8_t pvid_sw_discard_en:1;
uint8_t ptype_en:1; /* indicate if the ptype field enabled */
+ uint8_t keep_crc_fail_ptype:2;
uint64_t mbuf_initializer; /* value to init mbufs used with vector rx */
/* offset_table: used for vector, to solve execute re-order problem */
diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index b24bd47e58..daadd7e19f 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -187,8 +187,8 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
RTE_ETH_RX_OFFLOAD_QINQ_STRIP |
- RTE_ETH_RX_OFFLOAD_TIMESTAMP;
-
+ RTE_ETH_RX_OFFLOAD_TIMESTAMP |
+ RTE_ETH_RX_OFFLOAD_KEEP_CRC;
if (dev->data->scattered_rx)
return -ENOTSUP;
diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h
index 0dc6b9f0a2..60ec501a2a 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_neon.h
+++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h
@@ -148,14 +148,6 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
8, 9, 10, 11, /* rx.rss_hash to rte_mbuf.hash.rss */
};
- uint16x8_t crc_adjust = {
- 0, 0, /* ignore pkt_type field */
- rxq->crc_len, /* sub crc on pkt_len */
- 0, /* ignore high-16bits of pkt_len */
- rxq->crc_len, /* sub crc on data_len */
- 0, 0, 0, /* ignore non-length fields */
- };
-
/* compile-time verifies the shuffle mask */
RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=
offsetof(struct rte_mbuf, rx_descriptor_fields1) + 4);
@@ -171,7 +163,6 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
uint8x16_t pkt_mb1, pkt_mb2, pkt_mb3, pkt_mb4;
uint64x2_t mbp1, mbp2;
uint16x4_t bd_vld = {0};
- uint16x8_t tmp;
uint64_t stat;
/* calc how many bd valid */
@@ -225,16 +216,6 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
pkt_mb3 = vqtbl2q_u8(pkt_mbuf3, shuf_desc_fields_msk);
pkt_mb4 = vqtbl2q_u8(pkt_mbuf4, shuf_desc_fields_msk);
- /* 4 packets remove crc */
- tmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb1), crc_adjust);
- pkt_mb1 = vreinterpretq_u8_u16(tmp);
- tmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb2), crc_adjust);
- pkt_mb2 = vreinterpretq_u8_u16(tmp);
- tmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb3), crc_adjust);
- pkt_mb3 = vreinterpretq_u8_u16(tmp);
- tmp = vsubq_u16(vreinterpretq_u16_u8(pkt_mb4), crc_adjust);
- pkt_mb4 = vreinterpretq_u8_u16(tmp);
-
/* save packet info to rx_pkts mbuf */
vst1q_u8((void *)&sw_ring[pos + 0].mbuf->rx_descriptor_fields1,
pkt_mb1);
diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c
index 8aa4448558..67c87f570e 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_sve.c
+++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c
@@ -36,8 +36,7 @@ hns3_desc_parse_field_sve(struct hns3_rx_queue *rxq,
/* init rte_mbuf.rearm_data last 64-bit */
rx_pkts[i]->ol_flags = RTE_MBUF_F_RX_RSS_HASH;
rx_pkts[i]->hash.rss = rxdp[i].rx.rss_hash;
- rx_pkts[i]->pkt_len = rte_le_to_cpu_16(rxdp[i].rx.pkt_len) -
- rxq->crc_len;
+ rx_pkts[i]->pkt_len = rte_le_to_cpu_16(rxdp[i].rx.pkt_len);
rx_pkts[i]->data_len = rx_pkts[i]->pkt_len;
l234_info = rxdp[i].rx.l234_info;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-07-30 15:02:12.902584064 +0800
+++ 0001-net-hns3-fix-Rx-packet-without-CRC-data.patch 2025-07-30 15:02:12.763725462 +0800
@@ -1 +1 @@
-From 99c065da47c432e9529f761b457cde1fd8c89f20 Mon Sep 17 00:00:00 2001
+From edac72158acfa4dd2213aedcb238b4eea8a627d4 Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Fri, 16 May 2025 15:15:19 +0800
+Date: Tue, 15 Jul 2025 11:16:49 +0800
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 99c065da47c432e9529f761b457cde1fd8c89f20 ]
@@ -27,3 +30,3 @@
- drivers/net/hns3/hns3_rxtx.c | 129 +++++++++++++++++++++-----
- drivers/net/hns3/hns3_rxtx.h | 6 ++
- drivers/net/hns3/hns3_rxtx_vec.c | 3 +-
+ drivers/net/hns3/hns3_rxtx.c | 119 +++++++++++++++++++++-----
+ drivers/net/hns3/hns3_rxtx.h | 3 +
+ drivers/net/hns3/hns3_rxtx_vec.c | 4 +-
@@ -32 +35 @@
- 7 files changed, 141 insertions(+), 44 deletions(-)
+ 7 files changed, 128 insertions(+), 45 deletions(-)
@@ -35 +38 @@
-index 9f99525e70..50c6ed0744 100644
+index 99566375ea..f14fb61cbb 100644
@@ -55 +58 @@
-index 085a83773f..d164b9e38c 100644
+index 00d226d71c..0ce4974da6 100644
@@ -58 +61 @@
-@@ -51,6 +51,10 @@
+@@ -54,6 +54,10 @@
@@ -69 +72 @@
-@@ -652,6 +656,25 @@ struct hns3_hw {
+@@ -655,6 +659,25 @@ struct hns3_hw {
@@ -96 +99 @@
-index 49b6f16ccd..bde46733b0 100644
+index 1fb34e286d..9c0d4b4cd4 100644
@@ -107,12 +110 @@
-@@ -94,6 +95,10 @@ hns3_rx_queue_release(void *queue)
- rte_free(rxq->sw_ring);
- rxq->sw_ring = NULL;
- }
-+ if (rxq->crc_ctx) {
-+ rte_net_crc_free(rxq->crc_ctx);
-+ rxq->crc_ctx = NULL;
-+ }
- rte_free(rxq);
- }
- }
-@@ -1768,8 +1773,9 @@ hns3_rx_buf_len_calc(struct rte_mempool *mp, uint16_t *rx_buf_len)
+@@ -1779,8 +1780,9 @@ hns3_rx_buf_len_calc(struct rte_mempool *mp, uint16_t *rx_buf_len)
@@ -130 +122 @@
-@@ -1802,6 +1808,14 @@ hns3_rxq_conf_runtime_check(struct hns3_hw *hw, uint16_t buf_size,
+@@ -1813,6 +1815,14 @@ hns3_rxq_conf_runtime_check(struct hns3_hw *hw, uint16_t buf_size,
@@ -145 +137 @@
-@@ -1838,7 +1852,7 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf,
+@@ -1849,7 +1859,7 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf,
@@ -154 +146 @@
-@@ -1959,6 +1973,15 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
+@@ -1970,6 +1980,8 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
@@ -160,7 +151,0 @@
-+ rxq->crc_ctx = rte_net_crc_set_alg(RTE_NET_CRC_SCALAR, RTE_NET_CRC32_ETH);
-+ if (rxq->crc_ctx == NULL) {
-+ hns3_err(hw, "Failed to allocate the CRC context.");
-+ hns3_rx_queue_release(rxq);
-+ return -ENOMEM;
-+ }
-+
@@ -170 +155 @@
-@@ -2433,6 +2456,54 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
+@@ -2443,6 +2455,55 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
@@ -204 +189 @@
-+hns3_recalculate_crc(struct hns3_rx_queue *rxq, struct rte_mbuf *m)
++hns3_recalculate_crc(struct rte_mbuf *m)
@@ -209 +194,2 @@
-+ crc = rte_net_crc_calc(rxq->crc_ctx, rte_pktmbuf_mtod(m, void *), m->data_len);
++ crc = rte_net_crc_calc(rte_pktmbuf_mtod(m, void *),
++ m->data_len, RTE_NET_CRC32_ETH);
@@ -225 +211 @@
-@@ -2503,8 +2574,7 @@ hns3_recv_pkts_simple(void *rx_queue,
+@@ -2513,8 +2574,7 @@ hns3_recv_pkts_simple(void *rx_queue,
@@ -235 +221 @@
-@@ -2529,6 +2599,12 @@ hns3_recv_pkts_simple(void *rx_queue,
+@@ -2539,6 +2599,12 @@ hns3_recv_pkts_simple(void *rx_queue,
@@ -241 +227 @@
-+ hns3_recalculate_crc(rxq, rxm);
++ hns3_recalculate_crc(rxm);
@@ -248 +234 @@
-@@ -2695,10 +2771,10 @@ hns3_recv_scattered_pkts(void *rx_queue,
+@@ -2705,10 +2771,10 @@ hns3_recv_scattered_pkts(void *rx_queue,
@@ -260 +246 @@
-@@ -2713,22 +2789,6 @@ hns3_recv_scattered_pkts(void *rx_queue,
+@@ -2723,22 +2789,6 @@ hns3_recv_scattered_pkts(void *rx_queue,
@@ -283 +269 @@
-@@ -2757,6 +2817,31 @@ hns3_recv_scattered_pkts(void *rx_queue,
+@@ -2767,6 +2817,31 @@ hns3_recv_scattered_pkts(void *rx_queue,
@@ -308 +294 @@
-+ hns3_recalculate_crc(rxq, first_seg);
++ hns3_recalculate_crc(first_seg);
@@ -316 +302 @@
-index 0bce89ebaa..b602b2326b 100644
+index b6a6513307..f182ff6a9d 100644
@@ -336,10 +321,0 @@
-@@ -362,6 +365,9 @@ struct hns3_rx_queue {
-
- struct rte_mbuf fake_mbuf; /* fake mbuf used with vector rx */
-
-+ /* The CRC context, which is used by software to calculate CRC data. */
-+ struct rte_net_crc *crc_ctx;
-+
- /*
- * The following fields are not accessed in the I/O path, so they are
- * placed at the end.
@@ -347 +323 @@
-index 9708ec614e..bf37ce51b1 100644
+index b24bd47e58..daadd7e19f 100644
@@ -350,4 +326,4 @@
-@@ -185,7 +185,8 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
- struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
- uint64_t offloads_mask = RTE_ETH_RX_OFFLOAD_TCP_LRO |
- RTE_ETH_RX_OFFLOAD_VLAN |
+@@ -187,8 +187,8 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
+ RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
+ RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
+ RTE_ETH_RX_OFFLOAD_QINQ_STRIP |
@@ -354,0 +331 @@
+-
@@ -361 +338 @@
-index f2e155c9f5..8fd81b8612 100644
+index 0dc6b9f0a2..60ec501a2a 100644
next prev parent reply other threads:[~2025-07-30 7:11 UTC|newest]
Thread overview: 150+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 12:00 patch " Xueming Li
2025-06-26 12:00 ` patch 'ethdev: convert string initialization' " Xueming Li
2025-06-26 12:00 ` patch 'net/fm10k/base: fix compilation warnings' " Xueming Li
2025-06-26 12:00 ` patch 'net/ixgbe/base: correct definition of endianness macro' " Xueming Li
2025-06-26 12:00 ` patch 'net/ixgbe/base: fix compilation warnings' " Xueming Li
2025-06-26 12:00 ` patch 'net/i40e/base: fix unused value " Xueming Li
2025-06-26 12:00 ` patch 'net/i40e/base: fix compiler " Xueming Li
2025-06-26 12:00 ` patch 'acl: fix build with GCC 15 on aarch64' " Xueming Li
2025-06-26 12:00 ` patch 'eal/linux: improve ASLR check' " Xueming Li
2025-06-26 12:00 ` patch 'net/e1000: fix xstats name' " Xueming Li
2025-06-26 12:00 ` patch 'net/e1000: fix EEPROM dump' " Xueming Li
2025-06-26 12:00 ` patch 'net/ixgbe: enable ethertype filter for E610' " Xueming Li
2025-06-26 12:00 ` patch 'net/ixgbe: fix port mask default value in filter' " Xueming Li
2025-06-26 12:00 ` patch 'net/e1000: fix igb Tx queue offloads capability' " Xueming Li
2025-06-26 12:00 ` patch 'net/ice: fix flow creation failure' " Xueming Li
2025-06-26 12:00 ` patch 'vhost: fix wrapping on control virtqueue rings' " Xueming Li
2025-06-26 12:00 ` patch 'vhost/crypto: fix cipher data length' " Xueming Li
2025-06-26 12:00 ` patch 'crypto/virtio: fix cipher data source " Xueming Li
2025-06-26 12:00 ` patch 'app/crypto-perf: fix AAD offset alignment' " Xueming Li
2025-06-26 12:00 ` patch 'crypto/qat: fix out-of-place header bytes in AEAD raw API' " Xueming Li
2025-06-26 12:00 ` patch 'crypto/qat: fix out-of-place chain/cipher/auth headers' " Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: fix header modify action on group 0' " Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: validate GTP PSC QFI width' " Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: fix counter service cleanup on init failure' " Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5/hws: fix send queue drain on FW WQE destroy' " Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: remove unsupported flow meter action in HWS' " Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: fix maximal queue size query' " Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: fix mark action with shared Rx queue' " Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: align PF and VF/SF MAC address handling' " Xueming Li
2025-06-26 12:00 ` patch 'net/sfc: fix action order on start failure' " Xueming Li
2025-06-26 12:00 ` patch 'net/nfp: fix crash with null RSS hash key' " Xueming Li
2025-06-26 12:00 ` patch 'net/nfp: fix hash key length logic' " Xueming Li
2025-06-26 12:00 ` patch 'app/testpmd: fix RSS hash key update' " Xueming Li
2025-06-26 12:00 ` patch 'net/af_xdp: fix use after free in zero-copy Tx' " Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix integer overflow in interrupt unmap' " Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix memory leak on failure' " Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix extra wait for link up' " Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix memory leak for indirect flow action' " Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix interrupt rollback' " Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix divide by zero' " Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: fix resources release on reset' " Xueming Li
2025-06-26 12:01 ` patch 'net/nfp: standardize NFD3 Tx descriptor endianness' " Xueming Li
2025-06-26 12:01 ` patch 'net/nfp: standardize NFDk " Xueming Li
2025-06-26 12:01 ` patch 'net/qede: fix use after free' " Xueming Li
2025-06-26 12:01 ` patch 'bus/fslmc: " Xueming Li
2025-06-26 12:01 ` patch 'net/null: fix packet copy' " Xueming Li
2025-06-26 12:01 ` patch 'bus/vmbus: align ring buffer data to page boundary' " Xueming Li
2025-06-26 12:01 ` patch 'bus/vmbus: use Hyper-V page size' " Xueming Li
2025-06-26 12:01 ` patch 'net/netvsc: " Xueming Li
2025-06-26 12:01 ` patch 'net/netvsc: add stats counters from VF' " Xueming Li
2025-06-26 12:01 ` patch 'app/testpmd: relax number of TCs in DCB command' " Xueming Li
2025-06-26 12:01 ` patch 'net/mana: check vendor ID when probing RDMA device' " Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: fix CRC data segment' " Xueming Li
2025-06-26 12:01 ` patch 'net/tap: fix qdisc add failure handling' " Xueming Li
2025-06-26 12:01 ` patch 'net/mlx5: fix VLAN stripping on hairpin queue' " Xueming Li
2025-06-26 12:01 ` patch 'mem: fix lockup on address space shortage' " Xueming Li
2025-06-26 12:01 ` patch 'test/malloc: improve resiliency' " Xueming Li
2025-06-26 12:01 ` patch 'trace: fix overflow in per-lcore trace buffer' " Xueming Li
2025-06-26 12:01 ` patch 'common/cnxk: fix E-tag pattern parsing' " Xueming Li
2025-06-26 12:01 ` patch 'common/cnxk: fix CQ tail drop' " Xueming Li
2025-06-26 12:01 ` patch 'net/cnxk: fix descriptor count update on reconfig' " Xueming Li
2025-06-26 12:01 ` patch 'ethdev: fix error struct in flow configure' " Xueming Li
2025-06-26 12:01 ` patch 'net/ice/base: fix integer overflow' " Xueming Li
2025-06-26 12:01 ` patch 'net/ice/base: fix typo in device ID description' " Xueming Li
2025-06-26 12:01 ` patch 'common/dpaax: fix PDCP key command race condition' " Xueming Li
2025-06-26 12:01 ` patch 'common/dpaax: fix PDCP AES only 12-bit SN' " Xueming Li
2025-06-26 12:01 ` patch 'crypto/dpaa2_sec: fix uninitialized variable' " Xueming Li
2025-06-26 12:01 ` patch 'crypto/virtio: add request check on request side' " Xueming Li
2025-06-26 12:01 ` patch 'crypto/virtio: fix driver cleanup' " Xueming Li
2025-06-26 12:01 ` patch 'crypto/virtio: fix driver ID' " Xueming Li
2025-06-26 12:01 ` patch 'ethdev: keep promiscuous/allmulti value before disabling' " Xueming Li
2025-06-26 12:01 ` patch 'eal: fix return value of lcore role' " Xueming Li
2025-06-26 12:01 ` patch 'eal: warn if no lcore is available' " Xueming Li
2025-06-26 12:01 ` patch 'test/lcore: fix race in per-lcore test' " Xueming Li
2025-06-26 12:01 ` patch 'bus: cleanup device lists' " Xueming Li
2025-06-26 12:01 ` patch 'eal/linux: unregister alarm callback before free' " Xueming Li
2025-06-26 12:01 ` patch 'eal/freebsd: " Xueming Li
2025-06-26 12:01 ` patch 'bus/pci/bsd: fix device existence check' " Xueming Li
2025-06-26 12:01 ` patch 'power/intel_uncore: fix crash closing uninitialized driver' " Xueming Li
2025-06-26 12:01 ` patch 'crypto/qat: fix size calculation for memset' " Xueming Li
2025-06-26 12:01 ` patch 'net/mlx5: avoid setting kernel MTU if not needed' " Xueming Li
2025-06-26 12:01 ` patch 'doc: add kernel options required for mlx5' " Xueming Li
2025-06-26 12:01 ` patch 'net/mlx5: fix hypervisor detection in VLAN workaround' " Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: check requirement for hardware GRO' " Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: allow Tx vector when fast free not enabled' " Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: allow Rx vector mode with VLAN filter' " Xueming Li
2025-07-30 7:10 ` patch " Xueming Li
2025-07-30 7:10 ` Xueming Li [this message]
2025-07-30 7:10 ` patch 'common/mlx5: fix extraction of auxiliary device name' " Xueming Li
2025-07-30 7:10 ` patch 'net/ice: fix handling empty DCF RSS hash' " Xueming Li
2025-07-30 7:10 ` patch 'common/cnxk: fix null pointer checks' " Xueming Li
2025-07-30 7:10 ` patch 'vhost: fix net control virtqueue used length' " Xueming Li
2025-07-30 7:10 ` patch 'eal/unix: fix log message for madvise failure' " Xueming Li
2025-07-30 7:10 ` patch 'buildtools/test: scan muti-line registrations' " Xueming Li
2025-07-30 7:10 ` patch 'examples/ipsec-secgw: fix crash with IPv6' " Xueming Li
2025-07-30 7:10 ` patch 'examples/ipsec-secgw: fix crash in event vector mode' " Xueming Li
2025-07-30 7:10 ` patch 'test/crypto: fix auth and cipher case IV length' " Xueming Li
2025-07-30 7:10 ` patch 'test/crypto: set to null after freeing operation' " Xueming Li
2025-07-30 7:10 ` patch 'crypto/openssl: include private exponent in RSA session' " Xueming Li
2025-07-30 7:10 ` patch 'event/dlb2: fix validaton of LDB port COS ID arguments' " Xueming Li
2025-07-30 7:10 ` patch 'event/dlb2: fix num single link ports for DLB2.5' " Xueming Li
2025-07-30 7:10 ` patch 'event/dlb2: fix QID depth xstat' " Xueming Li
2025-07-30 7:10 ` patch 'event/dlb2: fix public symbol namespace' " Xueming Li
2025-07-30 7:10 ` patch 'app/eventdev: fix number of releases sent during cleanup' " Xueming Li
2025-07-30 7:10 ` patch 'net/txgbe: fix ntuple filter parsing' " Xueming Li
2025-07-30 7:10 ` patch 'net/txgbe: fix raw pattern match for FDIR rule' " Xueming Li
2025-07-30 7:10 ` patch 'net/txgbe: fix MAC control frame forwarding' " Xueming Li
2025-07-30 7:10 ` patch 'net/ngbe: " Xueming Li
2025-07-30 7:10 ` patch 'net/txgbe: fix device statistics' " Xueming Li
2025-07-30 7:10 ` patch 'net/ngbe: " Xueming Li
2025-07-30 7:10 ` patch 'net/txgbe: restrict VLAN strip configuration on VF' " Xueming Li
2025-07-30 7:10 ` patch 'net/hns3: fix queue TC " Xueming Li
2025-07-30 7:10 ` patch 'net/bonding: avoid RSS RETA update in flow isolation mode' " Xueming Li
2025-07-30 7:10 ` patch 'net/octeon_ep: increase mailbox timeout' " Xueming Li
2025-07-30 7:10 ` patch 'bus/auxiliary: fix crash in cleanup' " Xueming Li
2025-07-30 7:10 ` patch 'examples/multi_process: fix ports cleanup on exit' " Xueming Li
2025-07-30 7:10 ` patch 'examples/flow_filtering: fix make clean' " Xueming Li
2025-07-30 7:10 ` patch 'dts: fix deterministic doc' " Xueming Li
2025-07-30 7:10 ` patch 'examples/multi_process: revert ports cleanup on exit' " Xueming Li
2025-07-30 7:10 ` patch 'doc: remove reference to deprecated --use-device option' " Xueming Li
2025-07-30 7:10 ` patch 'eal: add description of service corelist in usage' " Xueming Li
2025-07-30 14:56 ` patch " Xueming Li
2025-07-30 14:56 ` patch 'net/txgbe: fix packet type for FDIR filter' " Xueming Li
2025-07-30 14:56 ` patch 'net/txgbe: fix to create FDIR filter for SCTP packet' " Xueming Li
2025-07-30 14:56 ` patch 'net/txgbe: fix reserved extra FDIR headroom' " Xueming Li
2025-07-30 14:56 ` patch 'net/txgbe: add LRO flag in mbuf when enabled' " Xueming Li
2025-07-30 14:56 ` patch 'net/mlx5: fix crash in HWS counter pool destroy' " Xueming Li
2025-07-30 14:56 ` patch 'net/mlx5: fix crash on age query with indirect conntrack' " Xueming Li
2025-07-30 14:56 ` patch 'net/mlx5: fix WQE size calculation for Tx queue' " Xueming Li
2025-07-30 14:56 ` patch 'net/ixgbe: fix indentation' " Xueming Li
2025-07-30 14:56 ` patch 'net/ice: fix querying RSS hash for DCF' " Xueming Li
2025-07-30 14:56 ` patch 'net/iavf: fix VLAN strip setting after enabling filter' " Xueming Li
2025-07-30 15:23 ` Amiya Ranjan Mohakud
2025-07-31 6:04 ` Xueming Li
2025-07-30 14:56 ` patch 'vhost: search virtqueues driver data in read-only area' " Xueming Li
2025-07-30 14:56 ` patch 'net/virtio: fix check of threshold for Tx freeing' " Xueming Li
2025-07-30 14:56 ` patch 'common/cnxk: fix qsize in CPT iq enable' " Xueming Li
2025-07-30 14:56 ` patch 'test/crypto: fix RSA decrypt validation' " Xueming Li
2025-07-30 14:56 ` patch 'event/dlb2: fix dequeue with CQ depth <= 16' " Xueming Li
2025-07-30 14:56 ` patch 'event/dlb2: fix default credits based on HW version' " Xueming Li
2025-07-30 14:56 ` patch 'latencystats: fix receive sample race' " Xueming Li
2025-07-30 14:56 ` patch 'net/ice: fix inconsistency in Rx queue VLAN tag placement' " Xueming Li
2025-07-30 15:03 ` Richardson, Bruce
2025-07-31 6:07 ` Xueming Li
2025-07-30 14:56 ` patch 'net/i40e: fix RSS on plain IPv4' " Xueming Li
2025-07-30 14:56 ` patch 'net/virtio: revert Tx free threshold fix' " Xueming Li
2025-07-30 14:56 ` patch 'net/mlx5: fix masked indirect age action validation' " Xueming Li
2025-07-30 14:56 ` patch 'net/mlx5: fix out-of-order completions in ordinary Rx burst' " Xueming Li
2025-07-30 14:56 ` patch 'examples/ntb: check more heap allocations' " Xueming Li
2025-07-30 14:56 ` patch 'examples/ipsec-secgw: fix number of queue pairs' " Xueming Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250730071045.136672-2-xuemingl@nvidia.com \
--to=xuemingl@nvidia.com \
--cc=haijie1@huawei.com \
--cc=huangdengdui@huawei.com \
--cc=lihuisong@huawei.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).