From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 8AF621BAFB for ; Fri, 8 Jun 2018 23:57:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jun 2018 14:57:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,491,1520924400"; d="scan'208";a="235640229" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.212]) by fmsmga005.fm.intel.com with ESMTP; 08 Jun 2018 14:57:34 -0700 From: Ferruh Yigit To: Neil Horman , John McNamara , Marko Kovacevic , Thomas Monjalon Cc: dev@dpdk.org, Ferruh Yigit Date: Fri, 8 Jun 2018 23:57:09 +0100 Message-Id: <20180608225709.19473-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.14.4 Subject: [dpdk-dev] [RFC] ethdev: add new offload flag to keep CRC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2018 21:57:39 -0000 DEV_RX_OFFLOAD_KEEP_CRC offload flag added. DEV_RX_OFFLOAD_CRC_STRIP flag will remain one more release default behavior in PMDs is to keep the CRC until this flag removed 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 keep the CRC Signed-off-by: Ferruh Yigit --- doc/guides/rel_notes/deprecation.rst | 10 ---------- lib/librte_ethdev/rte_ethdev.h | 4 ++++ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 1ce692eac..cd128ae23 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -67,16 +67,6 @@ Deprecation Notices - removal of ``txq_flags`` field from ``rte_eth_txconf`` struct. - removal of the offloads bit-field from ``rte_eth_rxmode`` struct. -* ethdev: A new offloading flag ``DEV_RX_OFFLOAD_KEEP_CRC`` will be added in v18.08, - This will replace the usage of not setting ``DEV_RX_OFFLOAD_CRC_STRIP`` flag - and will be implemented in PMDs accordingly. - In v18.08 both ``DEV_RX_OFFLOAD_KEEP_CRC`` and ``DEV_RX_OFFLOAD_CRC_STRIP`` flags - will be available, usage will be: - ``CRC_STRIP``: Strip CRC from packet - ``KEEP_CRC``: Keep CRC in packet - Both ``CRC_STRIP`` & ``KEEP_CRC``: Invalid - No flag: Keep CRC in packet - * ethdev: In v18.11 ``DEV_RX_OFFLOAD_CRC_STRIP`` offload flag will be removed, default behavior without any flag will be changed to CRC strip. To keep CRC ``DEV_RX_OFFLOAD_KEEP_CRC`` flag is required. diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 36e3984ea..c81af09f8 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -939,6 +939,10 @@ 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 keep 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.14.4