[dpdk-dev] [PATCH] ethdev: add rx offload to drop error packets

Nipun Gupta nipun.gupta at nxp.com
Mon Aug 31 18:04:53 CEST 2020


Hi Ferruh,

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at intel.com>
> Sent: Monday, August 31, 2020 6:29 PM
> To: Nipun Gupta <nipun.gupta at nxp.com>; dev at dpdk.org
> Cc: thomas at monjalon.net; arybchenko at solarflare.com; Hemant Agrawal
> <hemant.agrawal at nxp.com>; Rohit Raj <rohit.raj at nxp.com>
> Subject: Re: [PATCH] ethdev: add rx offload to drop error packets
> 
> On 8/31/2020 8:53 AM, Nipun Gupta wrote:
> > This change adds a RX offload capability where hardware can drop the
> > packets in case there is an error in the packet such as L3 checksum
> > error or L4 checksum.
> >
> > Signed-off-by: Nipun Gupta <nipun.gupta at nxp.com>
> > Signed-off-by: Rohit Raj <rohit.raj at nxp.com>
> > ---
> >  lib/librte_ethdev/rte_ethdev.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> > index a49242bcd..bb9df2fb9 100644
> > --- a/lib/librte_ethdev/rte_ethdev.h
> > +++ b/lib/librte_ethdev/rte_ethdev.h
> > @@ -1120,6 +1120,7 @@ struct rte_eth_conf {
> >  #define DEV_RX_OFFLOAD_SCTP_CKSUM	0x00020000
> >  #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM  0x00040000
> >  #define DEV_RX_OFFLOAD_RSS_HASH		0x00080000
> > +#define DEV_RX_OFFLOAD_ERR_PKT_DROP	0x00100000
> >
> >  #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
> >  				 DEV_RX_OFFLOAD_UDP_CKSUM | \
> >
> 
> 
> Hi Nipun,
> 
> You adding a new offload type for network devices, it should have some more
> description and relevant PMD/testpmd updates too.

I should have added an RFC tag in the patch. I sent this for comment for error packet drop
offload support. I will send patches after proper implementation.

> 
> But before that, is dropping faulty packets an offload or a config option for
> the NIC? Or is this common for all NICs to have in ethdev?

We would like to have it as an offload capability, and on the basis of this capability
user can configure the Ethernet device to drop the error packets on the device itself
without providing them to the core.
Sorry I did not get your comment "Or is this common for all NICs to have in ethdev?"

Thanks,
Nipun


More information about the dev mailing list