From: Dengdui Huang <huangdeng...@huawei.com>

The data execeed the pkt_len in mbuf is inavailable for user.
When KEEP CRC offload is enabled, CRC field length should be
included 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 a coments for this.

Fixes: 70815c9ecadd ("ethdev: add new offload flag to keep CRC")
Cc: sta...@dpdk.org

Signed-off-by: Dengdui Huang <huangdeng...@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 548fada1c7..3d44673161 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 should contain
+ * 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

Reply via email to