Skip to content

Commit

Permalink
net/kni: fix RxQ errors stat
Browse files Browse the repository at this point in the history
[ upstream commit 90c3547 ]

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

Fixes: 75e2bc5 ("net/kni: add KNI PMD")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
david-marchand authored and kevintraynor committed Jun 21, 2019
1 parent e25c8ce commit 5280da5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/kni/rte_eth_kni.c
Expand Up @@ -285,10 +285,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;
Expand Down

0 comments on commit 5280da5

Please sign in to comment.