net/tap: fix RxQ errors stat
authorDavid Marchand <david.marchand@redhat.com>
Mon, 4 Mar 2019 11:18:35 +0000 (12:18 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jun 2019 11:21:20 +0000 (20:21 +0900)
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 <david.marchand@redhat.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
drivers/net/tap/rte_eth_tap.c

index 9dd7731..3841842 100644 (file)
@@ -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];
        }