From patchwork Wed Mar 21 19:47:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 36416 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D0051AAA4; Wed, 21 Mar 2018 20:47:36 +0100 (CET) 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2018 12:47:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,341,1517904000"; d="scan'208";a="25903689" Received: from silpixa00399777.ir.intel.com (HELO silpixa00399777.ger.corp.intel.com) ([10.237.222.236]) by fmsmga007.fm.intel.com with ESMTP; 21 Mar 2018 12:47:33 -0700 From: Ferruh Yigit To: Neil Horman , John McNamara , Marko Kovacevic , Thomas Monjalon Cc: dev@dpdk.org, Ferruh Yigit Date: Wed, 21 Mar 2018 19:47:30 +0000 Message-Id: <20180321194730.52068-2-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180321194730.52068-1-ferruh.yigit@intel.com> References: <20180320112631.107105-1-ferruh.yigit@intel.com> <20180321194730.52068-1-ferruh.yigit@intel.com> Subject: [dpdk-dev] [PATCH v2 2/2] 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: , 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)