From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: [PATCH v2 2/2] ethdev: add new offload flag to keep CRC Date: Wed, 21 Mar 2018 19:47:30 +0000 Message-ID: <20180321194730.52068-2-ferruh.yigit@intel.com> References: <20180320112631.107105-1-ferruh.yigit@intel.com> <20180321194730.52068-1-ferruh.yigit@intel.com> Cc: dev@dpdk.org, Ferruh Yigit To: Neil Horman , John McNamara , Marko Kovacevic , Thomas Monjalon Return-path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 20CB37D19 for ; Wed, 21 Mar 2018 20:47:34 +0100 (CET) In-Reply-To: <20180321194730.52068-1-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" DEV_RX_OFFLOAD_KEEP_CRC offload flag added. DEV_RX_OFFLOAD_CRC_STRIP flag will remain one more release but default behavior in PMDs is to strip the CRC independent from this flag. Until DEV_RX_OFFLOAD_CRC_STRIP flag is removed: - Setting both KEEP_CRC & CRC_STRIP is INVALID - Setting only CRC_STRIP PMD should strip the CRC - Setting only KEEP_CRC PMD should keep the CRC - Not setting both PMD should strip the CRC Signed-off-by: Ferruh Yigit --- lib/librte_ether/rte_ethdev.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 5e13dca6a..ab1030d42 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -939,6 +939,9 @@ struct rte_eth_conf { #define DEV_RX_OFFLOAD_SCATTER 0x00002000 #define DEV_RX_OFFLOAD_TIMESTAMP 0x00004000 #define DEV_RX_OFFLOAD_SECURITY 0x00008000 +/* Invalid to set both DEV_RX_OFFLOAD_CRC_STRIP and DEV_RX_OFFLOAD_KEEP_CRC + * No DEV_RX_OFFLOAD_CRC_STRIP flag means stripping CRC */ +#define DEV_RX_OFFLOAD_KEEP_CRC 0x00010000 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \ DEV_RX_OFFLOAD_UDP_CKSUM | \ DEV_RX_OFFLOAD_TCP_CKSUM) -- 2.13.6