net/sfc: fix VF error/missed stats mapping
authorAndrew Rybchenko <arybchenko@solarflare.com>
Wed, 16 Jan 2019 09:43:23 +0000 (09:43 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Jan 2019 08:47:26 +0000 (09:47 +0100)
VADAPTER_RX_OVERFLOW means Rx statistics overflow, not a missed
packet because of overflow.

VADAPTER_RX_BAD_PACKETS accumulates a number of error conditions,
but mainly impossibility to deliver because of no descriptors
available, so it is better to classify it as imissed.

Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/sfc_ethdev.c

index 3886daf..9f59c8d 100644 (file)
@@ -537,8 +537,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
                        mac_stats[EFX_MAC_VADAPTER_TX_UNICAST_BYTES] +
                        mac_stats[EFX_MAC_VADAPTER_TX_MULTICAST_BYTES] +
                        mac_stats[EFX_MAC_VADAPTER_TX_BROADCAST_BYTES];
-               stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_OVERFLOW];
-               stats->ierrors = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS];
+               stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS];
                stats->oerrors = mac_stats[EFX_MAC_VADAPTER_TX_BAD_PACKETS];
        } else {
                stats->ipackets = mac_stats[EFX_MAC_RX_PKTS];