net/sfc: fix VF error/missed stats mapping

Message ID 1547631803-11272-1-git-send-email-arybchenko@solarflare.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • net/sfc: fix VF error/missed stats mapping
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Jan. 16, 2019, 9:43 a.m.
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

Ferruh Yigit Jan. 16, 2019, 7:45 p.m. | #1
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.

Patch

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 3886daf7a..9f59c8db9 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -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];