From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 12FDF45655; Fri, 19 Jul 2024 11:11:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BAE0E40E1E; Fri, 19 Jul 2024 11:11:33 +0200 (CEST) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id 47AB7402B8 for ; Fri, 19 Jul 2024 11:04:28 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4WQNvy4dpvz1HFGn; Fri, 19 Jul 2024 17:01:50 +0800 (CST) Received: from kwepemf500004.china.huawei.com (unknown [7.202.181.242]) by mail.maildlp.com (Postfix) with ESMTPS id 3E84E1A016C; Fri, 19 Jul 2024 17:04:26 +0800 (CST) Received: from localhost.huawei.com (10.90.30.45) by kwepemf500004.china.huawei.com (7.202.181.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Fri, 19 Jul 2024 17:04:25 +0800 From: Jie Hai To: , , , , , Thomas Monjalon , Allain Legacy CC: , , Subject: [PATCH v3 1/3] ethdev: add description for KEEP CRC offload Date: Fri, 19 Jul 2024 17:04:13 +0800 Message-ID: <20240719090415.1513301-2-haijie1@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20240719090415.1513301-1-haijie1@huawei.com> References: <20240206011030.2007689-1-haijie1@huawei.com> <20240719090415.1513301-1-haijie1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.90.30.45] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemf500004.china.huawei.com (7.202.181.242) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Dengdui Huang 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 Acked-by: Morten Brørup Acked-by: Huisong Li Acked-by: Jie Hai --- 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