From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 2/7] i40evf: support configuring crc stripping hw offload Date: Fri, 20 Jun 2014 16:08:28 +0200 Message-ID: <6265238.1xJbmmqJzt@xps13> References: <1403244889-21358-1-git-send-email-helin.zhang@intel.com> <1403244889-21358-3-git-send-email-helin.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Helin Zhang Return-path: In-Reply-To: <1403244889-21358-3-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" 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 > Acked-by: Cunming Liang > Acked-by: Jing Chen [...] > 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