From: David Marchand Date: Mon, 4 Mar 2019 11:18:28 +0000 (+0100) Subject: net/kni: fix RxQ errors stat X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=90c354711658283c4f89822ec0f59bfadc08298b;p=dpdk.git net/kni: fix RxQ errors stat Transmit errors must not be reported in q_errors[] which is for reception. Fixes: 75e2bc54c018 ("net/kni: add KNI PMD") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Ferruh Yigit --- diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 42a45333d4..9e0c6bd2fa 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -290,10 +290,9 @@ eth_kni_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) q = data->tx_queues[i]; stats->q_opackets[i] = q->tx.pkts; stats->q_obytes[i] = q->tx.bytes; - stats->q_errors[i] = q->tx.err_pkts; tx_packets_total += stats->q_opackets[i]; tx_bytes_total += stats->q_obytes[i]; - tx_packets_err_total += stats->q_errors[i]; + tx_packets_err_total += q->tx.err_pkts; } stats->ipackets = rx_packets_total;