DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jie Hai <haijie1@huawei.com>
To: <dev@dpdk.org>, <stephen@networkplumber.org>,
	<ferruh.yigit@amd.com>, <mb@smartsharesystems.com>,
	<andrew.rybchenko@oktetlabs.ru>,
	Thomas Monjalon <thomas@monjalon.net>,
	Allain Legacy <allain.legacy@windriver.com>
Cc: <huangdengdui@huawei.com>, <fengchengwen@huawei.com>,
	<lihuisong@huawei.com>
Subject: [PATCH v3 1/3] ethdev: add description for KEEP CRC offload
Date: Fri, 19 Jul 2024 17:04:13 +0800	[thread overview]
Message-ID: <20240719090415.1513301-2-haijie1@huawei.com> (raw)
In-Reply-To: <20240719090415.1513301-1-haijie1@huawei.com>

From: Dengdui Huang <huangdengdui@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@dpdk.org

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Jie Hai <haijie1@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


  reply	other threads:[~2024-07-19  9:11 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06  1:10 [PATCH] net/hns3: fix Rx packet truncation when KEEP CRC enabled Jie Hai
2024-02-07 14:15 ` Ferruh Yigit
2024-02-20  3:58   ` Jie Hai
2024-02-23 13:53     ` Ferruh Yigit
2024-02-26  3:16       ` Jie Hai
2024-02-26 16:43         ` Ferruh Yigit
2024-02-28  2:27           ` huangdengdui
2024-02-28 13:07             ` Ferruh Yigit
2024-02-29  3:58               ` huangdengdui
2024-02-29  9:25                 ` Ferruh Yigit
2024-03-01  6:55                   ` huangdengdui
2024-03-01 11:10                     ` Ferruh Yigit
2024-03-08 11:36                       ` Jie Hai
2024-03-22  6:28                         ` Jie Hai
2024-06-03  1:38                       ` Jie Hai
2024-06-03  2:33                         ` Stephen Hemminger
2024-06-03  5:24                           ` Morten Brørup
2024-06-03  7:07                           ` Andrew Rybchenko
2024-07-18 11:48 ` [PATCH v2 0/3] bugfix about KEEP CRC offload Jie Hai
2024-07-18 11:48   ` [PATCH v2 1/3] ethdev: add description for " Jie Hai
2024-07-18 11:57     ` Morten Brørup
2024-07-18 11:48   ` [PATCH v2 2/3] net/hns3: fix packet length do not contain CRC data length Jie Hai
2024-07-18 11:48   ` [PATCH v2 3/3] net/hns3: fix Rx packet without CRC data Jie Hai
2024-07-18 12:35   ` [PATCH v2 0/3] bugfix about KEEP CRC offload lihuisong (C)
2024-07-19  9:04 ` [PATCH v3 " Jie Hai
2024-07-19  9:04   ` Jie Hai [this message]
2024-09-05  6:33     ` [PATCH v3 1/3] ethdev: add description for " Andrew Rybchenko
2024-07-19  9:04   ` [PATCH v3 2/3] net/hns3: fix packet length do not contain CRC data length Jie Hai
2024-07-19  9:04   ` [PATCH v3 3/3] net/hns3: fix Rx packet without CRC data Jie Hai
2024-07-19  9:49   ` [PATCH v3 0/3] bugfix about KEEP CRC offload fengchengwen
2024-08-09  9:21   ` Jie Hai
2024-09-05  2:53   ` Jie Hai
2024-10-18  1:39   ` Jie Hai
2024-11-06  2:19   ` Jie Hai
2024-11-13  3:14   ` Jie Hai

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=20240719090415.1513301-2-haijie1@huawei.com \
    --to=haijie1@huawei.com \
    --cc=allain.legacy@windriver.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ferruh.yigit@amd.com \
    --cc=huangdengdui@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=mb@smartsharesystems.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).