net/idpf: fix incorrect status calculation
PATCH 1/1 net/idpf: fix incorrect status calculation
Fix the incorrect ingress and egress packet number calculation.
Fixes 7514d76d407b ("net/idpf: add basic statistics")
Signed-off-by Simei Su <[email protected]>
--- drivers/net/idpf/idpf_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/idpf/idpf_ethdev.c +4 -2
@@ -281,9 +281,11 @@ idpf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)idpf_vport_stats_update (&vport->eth_stats_offset, pstats); stats->ipackets = pstats->rx_unicast + pstats->rx_multicast + - pstats->rx_broadcast - pstats->rx_discards; + pstats->rx_broadcast + pstats->rx_discards + + pstats->rx_errors + pstats->rx_unknown_protocol; stats->opackets = pstats->tx_broadcast + pstats->tx_multicast + - pstats->tx_unicast; + pstats->tx_unicast + pstats->tx_discards + + pstats->tx_errors; stats->ierrors = pstats->rx_errors; stats->imissed = pstats->rx_discards; stats->oerrors = pstats->tx_errors + pstats->tx_discards;
Signature · 1 line
2.9.5