net/af_packet: fix RxQ errors stat
authorDavid Marchand <david.marchand@redhat.com>
Mon, 4 Mar 2019 11:18:24 +0000 (12:18 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jun 2019 11:21:19 +0000 (20:21 +0900)
Transmit errors must not be reported in q_errors[] which is for
reception.

Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/af_packet/rte_eth_af_packet.c

index b5c4bef..4a660d5 100644 (file)
@@ -329,10 +329,9 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
                internal->nb_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS);
        for (i = 0; i < imax; i++) {
                igb_stats->q_opackets[i] = internal->tx_queue[i].tx_pkts;
-               igb_stats->q_errors[i] = internal->tx_queue[i].err_pkts;
                igb_stats->q_obytes[i] = internal->tx_queue[i].tx_bytes;
                tx_total += igb_stats->q_opackets[i];
-               tx_err_total += igb_stats->q_errors[i];
+               tx_err_total += internal->tx_queue[i].err_pkts;
                tx_bytes_total += igb_stats->q_obytes[i];
        }