From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9CC39B0AF for ; Fri, 20 Jun 2014 08:14:54 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 19 Jun 2014 23:09:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,512,1400050800"; d="scan'208";a="531394855" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 19 Jun 2014 23:15:02 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s5K6Exvr018780; Fri, 20 Jun 2014 14:14:59 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s5K6Eukw023385; Fri, 20 Jun 2014 14:14:58 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s5K6Eu4j023363; Fri, 20 Jun 2014 14:14:56 +0800 From: Helin Zhang To: dev@dpdk.org Date: Fri, 20 Jun 2014 14:14:44 +0800 Message-Id: <1403244889-21358-3-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1403244889-21358-1-git-send-email-helin.zhang@intel.com> References: <1403244889-21358-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH 2/7] i40evf: support configuring crc stripping hw offload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 06:14:55 -0000 In VF driver, crc stripping hw offload is enabled or not, according to the configurations in config file. Signed-off-by: Helin Zhang Acked-by: Cunming Liang Acked-by: Jing Chen --- lib/librte_pmd_i40e/i40e_ethdev_vf.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c index 4851df9..de71407 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c +++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c @@ -1062,8 +1062,22 @@ static struct rte_driver rte_i40evf_driver = { PMD_REGISTER_DRIVER(rte_i40evf_driver); static int -i40evf_dev_configure(__rte_unused struct rte_eth_dev *dev) +i40evf_dev_configure(struct rte_eth_dev *dev) { + struct rte_eth_conf* conf = &dev->data->dev_conf; + +#ifdef RTE_LIBRTE_I40E_PF_DISABLE_STRIP_CRC + if (conf->rxmode.hw_strip_crc) { + conf->rxmode.hw_strip_crc = 0; + PMD_DRV_LOG(INFO, "VF can not enable hw CRC stripping\n"); + } +#else + if (!conf->rxmode.hw_strip_crc) { + conf->rxmode.hw_strip_crc = 1; + PMD_DRV_LOG(INFO, "VF can not disable hw CRC stripping\n"); +} +#endif + return 0; } -- 1.8.1.4