From mboxrd@z Thu Jan 1 00:00:00 1970 From: Helin Zhang Subject: [PATCH 2/7] i40evf: support configuring crc stripping hw offload Date: Fri, 20 Jun 2014 14:14:44 +0800 Message-ID: <1403244889-21358-3-git-send-email-helin.zhang@intel.com> References: <1403244889-21358-1-git-send-email-helin.zhang@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1403244889-21358-1-git-send-email-helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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