[dpdk-dev] [PATCH] app/testpmd: do not enable Rx offloads by default

Lu, Wenzhuo wenzhuo.lu at intel.com
Fri Jan 26 08:31:57 CET 2018


Hi Stephen,


> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Friday, January 26, 2018 12:02 AM
> To: Thomas Monjalon <thomas at monjalon.net>
> Cc: Lu, Wenzhuo <wenzhuo.lu at intel.com>; Moti Haimovsky
> <motih at mellanox.com>; dev at dpdk.org; shahafs at mellanox.com; Yigit,
> Ferruh <ferruh.yigit at intel.com>
> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: do not enable Rx offloads by
> default
> 
> On Thu, 25 Jan 2018 10:04:11 +0100
> Thomas Monjalon <thomas at monjalon.net> wrote:
> 
> > 25/01/2018 02:11, Lu, Wenzhuo:
> > > > --- a/app/test-pmd/testpmd.c
> > > > +++ b/app/test-pmd/testpmd.c
> > > > @@ -305,9 +305,7 @@ struct fwd_engine * fwd_engines[] = {
> > > >   */
> > > >  struct rte_eth_rxmode rx_mode = {
> > > >  	.max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame
> > > > length. */
> > > > -	.offloads = (DEV_RX_OFFLOAD_VLAN_FILTER |
> > > > -		     DEV_RX_OFFLOAD_VLAN_STRIP |
> > > > -		     DEV_RX_OFFLOAD_CRC_STRIP),
> > > > +	.offloads = 0,
> > >
> > > Change the default behavior may trigger other problems. I think TX
> offload could be a good reference. Get the capability and check what's
> supported first, then ignore the not supported functions with printing a
> warning but not block anything...
> >
> > I agree that we should check the capabilities before requesting an offload.
> > But I disagree on another point: we should not enable an offload if
> > the user did not request it explicitly. It makes things unclear.
> > This is a testing tool, it should be close to the ethdev API behavior.
> >
> > Why these offload flags are silently enabled?
> 
> Also all virtual devices ignore CRC strip.
Look like it's the case the device ignores the flag if it doesn't have the capability.


More information about the dev mailing list