net/sfc: fix VF error/missed stats mapping
Checks
Commit Message
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 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On 1/16/2019 9:43 AM, Andrew Rybchenko wrote:
> 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>
Applied to dpdk-next-net/master, thanks.
@@ -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];