[8/8] net/vhost: do not count unsent packets as errors
Checks
Commit Message
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 <david.marchand@redhat.com>
---
drivers/net/vhost/rte_eth_vhost.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On Thu, Jul 25, 2019 at 11:14:28AM +0200, David Marchand wrote:
> 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 <david.marchand@redhat.com>
> ---
> drivers/net/vhost/rte_eth_vhost.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
@@ -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;