numam-dpdk/drivers/net/af_packet
Flavia Musatescu d4bda0ab29 net/af_packet: improve Tx statistics accuracy
When sendto call fails and ENOBUFS/EAGAIN error is being set
some of the packets are actually successfully transmitted.
There is no available count of those packets, so in order to
make the statistics more accurate, all the previously enqueued
packets will be considered successful, even though this is not
entirely correct.

Statistics numbers before this update:

Pktgen:
   Total Rx Pkts:               1360084
         Tx Pkts:               2000000
testpmd:
   RX-packets: 1408346  RX-missed: 0       RX-bytes:  84503418
   TX-packets: 526486   TX-errors: 881851  TX-bytes:  31589724

Statistics numbers after this update:

Pktgen:
   Total Rx Pkts:               1329872
         Tx Pkts:               2000000
testpmd:
   RX-packets: 1389156  RX-missed: 0       RX-bytes:  83349360
   TX-packets: 1389156  TX-errors: 0       TX-bytes:  83349360

Fixes: 74b7fc0a0f ("net/af_packet: fix packet bytes counting")
Cc: stable@dpdk.org

Signed-off-by: Flavia Musatescu <flavia.musatescu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-23 16:43:10 +02:00
..
Makefile use SPDX tag for 6WIND copyrighted files 2018-05-25 10:47:06 +02:00
meson.build drivers: add reasons for components being disabled 2019-07-02 23:21:11 +02:00
rte_eth_af_packet.c net/af_packet: improve Tx statistics accuracy 2019-10-23 16:43:10 +02:00
rte_pmd_af_packet_version.map af_packet: make the device detachable 2016-03-16 19:05:47 +01:00