From: David Marchand Date: Fri, 26 Jul 2019 10:21:28 +0000 (+0200) Subject: net/vhost: do not count unsent packets as errors X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9151787924c20a03b3e57a8fdcd6aa3f912a3af8;p=dpdk.git net/vhost: do not count unsent packets as errors missed_pkts reflects the number of packets that the driver did not manage to send. This is a temporary situation, those packets are not freed and the application can still retry to send them later. Hence, we can't count them as transmit failed. Fixes: 5f05e95cd5d9 ("net/vhost: fix Tx error counting") Fixes: ee584e9710b9 ("vhost: add driver on top of the library") Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Tiwei Bie --- diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 57f382c65f..a4892d7a0d 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -1081,7 +1081,7 @@ static int eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) { unsigned i; - unsigned long rx_total = 0, tx_total = 0, tx_missed_total = 0; + unsigned long rx_total = 0, tx_total = 0; unsigned long rx_total_bytes = 0, tx_total_bytes = 0; struct vhost_queue *vq; @@ -1103,7 +1103,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) continue; vq = dev->data->tx_queues[i]; stats->q_opackets[i] = vq->stats.pkts; - tx_missed_total += vq->stats.missed_pkts; tx_total += stats->q_opackets[i]; stats->q_obytes[i] = vq->stats.bytes; @@ -1112,7 +1111,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->ipackets = rx_total; stats->opackets = tx_total; - stats->oerrors = tx_missed_total; stats->ibytes = rx_total_bytes; stats->obytes = tx_total_bytes;