From: David Marchand Date: Mon, 4 Mar 2019 11:18:35 +0000 (+0100) Subject: net/tap: fix RxQ errors stat X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6d84612124417acbe0bbb0b9952cf3270b3b3a0f;p=dpdk.git net/tap: fix RxQ errors stat Transmit errors must not be reported in q_errors[] which is for reception. Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Keith Wiles --- diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 9dd77311b4..3841842f01 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -970,10 +970,9 @@ tap_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *tap_stats) for (i = 0; i < imax; i++) { tap_stats->q_opackets[i] = pmd->txq[i].stats.opackets; - tap_stats->q_errors[i] = pmd->txq[i].stats.errs; tap_stats->q_obytes[i] = pmd->txq[i].stats.obytes; tx_total += tap_stats->q_opackets[i]; - tx_err_total += tap_stats->q_errors[i]; + tx_err_total += pmd->txq[i].stats.errs; tx_bytes_total += tap_stats->q_obytes[i]; }