From: David Marchand Date: Mon, 4 Mar 2019 11:18:31 +0000 (+0100) Subject: net/null: fix RxQ errors stat X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c6bc117c99ba750835bcb51f922f3901a7cfa314;p=dpdk.git net/null: fix RxQ errors stat Transmit errors must not be reported in q_errors[] which is for reception. Fixes: c743e50c475f ("null: new poll mode driver") Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index d1d49b53bd..f1b521a756 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -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;