> -----Original Message-----
> From: Thomas Monjalon [mailto:tho...@monjalon.net]
> Sent: Friday, February 15, 2019 7:39 PM
> To: Ananyev, Konstantin <konstantin.anan...@intel.com>
> Cc: David Marchand <david.march...@redhat.com>; Richardson, Bruce 
> <bruce.richard...@intel.com>; dev@dpdk.org; Lu, Wenzhuo
> <wenzhuo...@intel.com>; Wu, Jingjing <jingjing...@intel.com>; Iremonger, 
> Bernard <bernard.iremon...@intel.com>; Maxime Coquelin
> <mcoqu...@redhat.com>; Yigit, Ferruh <ferruh.yi...@intel.com>; Andrew 
> Rybchenko <arybche...@solarflare.com>; Wiles, Keith
> <keith.wi...@intel.com>
> Subject: Re: [dpdk-dev] [PATCH 3/5] app/testpmd: add missing transmit errors 
> stats
> 
> 15/02/2019 19:42, Ananyev, Konstantin:
> > >>> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of David Marchand
> > >>> I am also for option 2 especially because of this.
> > >>> A driver that refuses a packet for reason X (which is a limitation, or 
> > >>> an
> > >>> incorrect config or whatever that is not a transient condition) but 
> > >>> gives
> > >>> it back to the application is a bad driver.
> >
> > >>Why? What.s wrong to leave it to the upper layer to decide what to
> > >>do with the packets that can't be sent (by one reason or another)?
> >
> > >How does the upper layer know if this is a transient state or something 
> > >that can't be resolved?
> >
> > Via rte_errno, for example.
> 
> rte_errno is not a result per packet.

Surely it is not.
But tx_burst() can return after first failure.

> I think it is better to "eat" the packet
> as it is done for those transmitted to the HW.

Probably extra clarification is needed here.
Right now tx_burst (at least for PMDs I am aware about) doesn't
do any checking that:
-  packet is correct and can be handled
   (this is responsibility of tx_prepare)
- HW/PMD SW state is in valid and properly configured  
  (link is up, queue is configured, HW initialized properly).

All that really tx_burst() care about -there is enough free TX
descriptors to fill. When that happens - tx_burst() returns 
straightway.

So what particular error conditions are you talking about,
and when you think we have to 'eat' the packets?
Konstantin



 

Reply via email to