On Thu, Feb 14, 2019 at 6:39 PM David Marchand <david.march...@redhat.com> wrote:
> On Thu, Feb 14, 2019 at 5:30 PM Bruce Richardson < > bruce.richard...@intel.com> wrote: > >> On Thu, Feb 14, 2019 at 04:42:50PM +0100, David Marchand wrote: >> > pmd can report transmit errors but those stats are not accounted here. >> > >> > Signed-off-by: David Marchand <david.march...@redhat.com> >> > --- >> > app/test-pmd/testpmd.c | 1 + >> > 1 file changed, 1 insertion(+) >> > >> > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c >> > index 984155a..3acd97b 100644 >> > --- a/app/test-pmd/testpmd.c >> > +++ b/app/test-pmd/testpmd.c >> > @@ -1838,6 +1838,7 @@ struct extmem_param { >> > total_recv += stats.ipackets; >> > total_xmit += stats.opackets; >> > total_rx_dropped += stats.imissed; >> > + port->tx_dropped += stats.oerrors; >> > total_tx_dropped += port->tx_dropped; >> > total_rx_nombuf += stats.rx_nombuf; >> > >> > >> Without knowing as to whether the line is needed or not, the line itself >> looks out of place. All other lines are assignments to local variables, >> apart from this. Should a local variable be defined for consistency? >> > > Thinking again about this oerrors stats... We had a discussion with Maxime, last week. So I want to make sure that what we both agreed makes sense :-) What is the purpose of oerrors ? Since the drivers (via rte_eth_tx_burst return value) report the numbers of packets successfully transmitted, the application can try to retransmit the packets that did not make it and counts this. If the driver counts such "missed" packets, then it does the job the application will do anyway (wasting some cycles). But what is more a problem is that the application does not know if the packets in oerrors are its own retries or problems that the driver can not detect (hw problems) but the hw can. So the best option is that oerrors does not report the packets the driver refuses (and I can see some drivers that do not comply to this) but only "external" errors from the driver pov. Back to my patch here, if we agree on this definition of oerrors, I can not add it to total_tx_dropped, but I suppose I can add some "TX HW errors: " and "Total TX HW errors: " logs so that we are aware that something went bad "further" than the driver. Let's sleep on it :-) -- David Marchand