net/null: fix RxQ errors stat

Transmit errors must not be reported in q_errors[] which is for
reception.

Fixes: c743e50c47 ("null: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
David Marchand 2019-03-04 12:18:31 +01:00 committed by Ferruh Yigit
parent 81d03bff26
commit c6bc117c99

View File

@ -333,10 +333,8 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
for (i = 0; i < num_stats; i++) {
igb_stats->q_opackets[i] =
internal->tx_null_queues[i].tx_pkts.cnt;
igb_stats->q_errors[i] =
internal->tx_null_queues[i].err_pkts.cnt;
tx_total += igb_stats->q_opackets[i];
tx_err_total += igb_stats->q_errors[i];
tx_err_total += internal->tx_null_queues[i].err_pkts.cnt;
}
igb_stats->ipackets = rx_total;