[PATCH v3 1/3] ethdev: add description for KEEP CRC offload
Jie Hai
haijie1 at huawei.com
Fri Jul 19 11:04:13 CEST 2024
From: Dengdui Huang <huangdengdui at huawei.com>
The data exceeds the pkt_len in mbuf is inavailable for user.
When KEEP CRC offload is enabled, CRC field length should be
included in the pkt_len in mbuf. However, almost of drivers
supported KEEP CRC feature didn't add the CRC data length to
pkt_len. So it is very necessary to add comments for this.
Fixes: 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Cc: stable at dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Huisong Li <lihuisong at huawei.com>
Acked-by: Jie Hai <haijie1 at huawei.com>
---
lib/ethdev/rte_ethdev.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 548fada1c7ad..1f7237c48af6 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -1550,6 +1550,12 @@ struct rte_eth_conf {
*/
#define RTE_ETH_RX_OFFLOAD_TIMESTAMP RTE_BIT64(14)
#define RTE_ETH_RX_OFFLOAD_SECURITY RTE_BIT64(15)
+/**
+ * Keep CRC data in packet.
+ *
+ * Note: If this offload is enabled, the pkt_len in mbuf must include
+ * the CRC data length.
+ */
#define RTE_ETH_RX_OFFLOAD_KEEP_CRC RTE_BIT64(16)
#define RTE_ETH_RX_OFFLOAD_SCTP_CKSUM RTE_BIT64(17)
#define RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM RTE_BIT64(18)
--
2.33.0
More information about the dev
mailing list