> From: Stephen Hemminger [mailto:step...@networkplumber.org]
> Sent: Wednesday, 1 May 2024 18.45
> 
> On Wed, 1 May 2024 17:25:59 +0100
> Ferruh Yigit <ferruh.yi...@amd.com> wrote:
> 
> > >  - Remove the tx_error counter since it was not correct.
> > >    When transmit ring is full it is not an error and
> > >    the driver correctly returns only the number sent.
> > >
> >
> > nack
> > Transmit full is not only return case here.
> > There are actual errors continue to process relying this error
> calculation.
> > Also there are error cases like interface down.
> > Those error cases should be handled individually if we remove this.
> > I suggest split this change to separate patch.
> 
> I see multiple drivers have copy/pasted same code and consider
> transmit full as an error. It is not.

+1
Transmit full is certainly not an error!

> 
> There should be a new statistic at ethdev layer that does record
> transmit full, and make it across all drivers, but that would have
> to wait for ABI change.

What happens to these non-transmittable packets depend on the application.
Our application discards them and count them in a (per-port, per-queue) 
application level counter tx_nodescr, which eventually becomes 
IF-MIB::ifOutDiscards in SNMP. I think many applications behave similarly, so 
having an ethdev layer tx_nodescr counter might be helpful.
Other applications could try to retransmit them; if there are still no TX 
descriptors, they will be counted again.

In case anyone gets funny ideas: The PMD should still not free those 
non-transmitted packet mbufs, because the application might want to treat them 
differently than the transmitted packets, e.g. for latency stats or packet 
capture.

Reply via email to