In VF driver, crc stripping hw offload is enabled or not, according to the configurations in config file.
Signed-off-by: Helin Zhang <helin.zhang at intel.com> Acked-by: Cunming Liang <cunming.liang at intel.com> Acked-by: Jing Chen <jing.d.chen at intel.com> --- 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