-----Original Message----- From: Thomas Monjalon [mailto:thomas.monja...@6wind.com] Sent: Friday, June 20, 2014 10:08 PM To: Zhang, Helin Cc: dev at dpdk.org Subject: Re: [dpdk-dev] [PATCH 2/7] i40evf: support configuring crc stripping hw offload
Hi Helin, 2014-06-20 14:14, Helin Zhang: > 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> [...] > 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; > } Please, I don't understand why CRC stripping must be configured at build time. I understand VF capability depends of the PF configuration, but we should be able to configure it at run time. -- Thomas ---------------------------------------------------------------------------------------------------------------------------------------- Hi Thomas This solution is the same as what we did in ixgbe. As you know most of VF functionalities are controlled by PF. If the configuration is set for global, VF driver cannot ask for change, as the change will impact PF functionality. If the configuration can be set for PF/VF function separately, VF driver can change it directly or ask PF to change according to the hardware implementation. Let's skip the VF CRC change for i40e of 1.7.0-rc2 at this moment, and I will investigate more and send separate patches later for that. Regards, Helin