Skip to contentSkip to conversation

oerrors stats fixes for virtual pmds

PATCH Superseded David Marchand 4 participants 37 messages Jul 25, 2019 – Jul 26, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

cover oerrors stats fixes for virtual pmds

I did a pass on the pmds about oerrors some time ago, but still did not find the motivation to finish yet.
For now, here is a series of cleanups on the virtual pmds.

The former patches are just about removing counters that adds nothing to the stats.

The latter patches make sure that unsent packets (because of a temporary situation) are not added to oerrors since an application can decide to send them again later.

Wrt oerrors, the pcap pmd should be fixed with the series [1]. But the tap pmd still needs to be inspected.

1: https://patchwork.dpdk.org/project/dpdk/list/?series=5701

Signature · 24 lines
David Marchand

David Marchand (8):
  net/af_packet: remove unused Rx counter
  net/af_xdp: remove unused Tx counter
  net/null: remove unused Tx error counter
  net/virtio: remove unused Tx error counter
  net/kni: do not count unsent packets as errors
  net/memif: do not count unsent packets as errors
  net/ring: do not count unsent packets as errors
  net/vhost: do not count unsent packets as errors

 drivers/net/af_packet/rte_eth_af_packet.c | 1 -
 drivers/net/af_xdp/rte_eth_af_xdp.c       | 2 --
 drivers/net/kni/rte_eth_kni.c             | 3 ---
 drivers/net/memif/rte_eth_memif.c         | 2 --
 drivers/net/null/rte_eth_null.c           | 9 ++-------
 drivers/net/ring/rte_eth_ring.c           | 4 +---
 drivers/net/vhost/rte_eth_vhost.c         | 4 +---
 drivers/net/virtio/virtio_ethdev.c        | 3 ---
 8 files changed, 4 insertions(+), 24 deletions(-)

-- 
1.8.3.1
#1 lore raw

PATCH 1/8 net/af_packet: remove unused Rx counter

This Rx counter has never been used.

Fixes 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")
---
 drivers/net/af_packet/rte_eth_af_packet.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/af_packet/rte_eth_af_packet.c +0 -1
index 2f6508f..82bf2cd 100644
@@ -51,7 +51,6 @@ struct pkt_rx_queue {
 	uint16_t in_port;
 
 	volatile unsigned long rx_pkts;
-	volatile unsigned long err_pkts;
 	volatile unsigned long rx_bytes;
 };
 
Signature · 1 line
1.8.3.1
#3 lore raw

PATCH 2/8 net/af_xdp: remove unused Tx counter

In reply to David Marchand

This Tx counter is now unused.

Fixes 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/af_xdp/rte_eth_af_xdp.c +0 -2
index 33352e1..41ed5b2 100644
@@ -97,7 +97,6 @@ struct pkt_rx_queue {
 
 struct tx_stats {
 	uint64_t tx_pkts;
-	uint64_t err_pkts;
 	uint64_t tx_bytes;
 };
 
@@ -456,7 +455,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->imissed += xdp_stats.rx_dropped;
 
 		stats->opackets += stats->q_opackets[i];
-		stats->oerrors += txq->stats.err_pkts;
 		stats->obytes += stats->q_obytes[i];
 	}
 
Signature · 1 line
1.8.3.1
Reviewed-by on v1 2/8
#4 lore raw

Re: [dpdk-dev] [PATCH 2/8] net/af_xdp: remove unused Tx counter

Quoted 3 lines · David Marchand

This Tx counter is now unused.

Fixes 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")

err_pkts seems not introduced by this commit?

Quoted 29 lines

---
drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --

1 file changed, 2 deletions(-)
drivers/net/af_xdp/rte_eth_af_xdp.c +0 -2
index 33352e1..41ed5b2 100644
@@ -97,7 +97,6 @@ struct pkt_rx_queue {
 
 struct tx_stats {
 	uint64_t tx_pkts;
-	uint64_t err_pkts;
 	uint64_t tx_bytes;
 };
 
@@ -456,7 +455,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->imissed += xdp_stats.rx_dropped;
 
 		stats->opackets += stats->q_opackets[i];
-		stats->oerrors += txq->stats.err_pkts;
 		stats->obytes += stats->q_obytes[i];
 	}
 
Signature · 1 line
1.8.3.1
#5 lore raw

Re: [dpdk-dev] [PATCH 2/8] net/af_xdp: remove unused Tx counter

Quoted 7 lines · Ye Xiaolong
Quoted 3 lines · David Marchand

This Tx counter is now unused.

Fixes 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")

err_pkts seems not introduced by this commit?

This commit removed the only place where it was used.

Quoted 27 lines
Quoted 27 lines

---
drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --

1 file changed, 2 deletions(-)
drivers/net/af_xdp/rte_eth_af_xdp.c +0 -2
index 33352e1..41ed5b2 100644
@@ -97,7 +97,6 @@ struct pkt_rx_queue {
 
 struct tx_stats {
      uint64_t tx_pkts;
-      uint64_t err_pkts;
      uint64_t tx_bytes;
 };
 
@@ -456,7 +455,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
              stats->imissed += xdp_stats.rx_dropped;
 
              stats->opackets += stats->q_opackets[i];
-              stats->oerrors += txq->stats.err_pkts;
              stats->obytes += stats->q_obytes[i];
      }
 
Quoted 5 lines
Quoted 3 lines

--
1.8.3.1

Thanks.

Signature · 1 line
David Marchand
#6 lore raw

Re: [dpdk-dev] [PATCH 2/8] net/af_xdp: remove unused Tx counter

Quoted 11 lines · David Marchand
Quoted 7 lines · Ye Xiaolong
Quoted 3 lines · David Marchand

This Tx counter is now unused.

Fixes 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")

err_pkts seems not introduced by this commit?

This commit removed the only place where it was used.

Got it, make sense.

Thanks,
Xiaolong

Quoted 37 lines
Quoted 27 lines
Quoted 27 lines

---
drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --

1 file changed, 2 deletions(-)
drivers/net/af_xdp/rte_eth_af_xdp.c +0 -2
index 33352e1..41ed5b2 100644
@@ -97,7 +97,6 @@ struct pkt_rx_queue {
 
 struct tx_stats {
      uint64_t tx_pkts;
-      uint64_t err_pkts;
      uint64_t tx_bytes;
 };
 
@@ -456,7 +455,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
              stats->imissed += xdp_stats.rx_dropped;
 
              stats->opackets += stats->q_opackets[i];
-              stats->oerrors += txq->stats.err_pkts;
              stats->obytes += stats->q_obytes[i];
      }
 
Quoted 5 lines
Quoted 3 lines

--
1.8.3.1

Thanks.

Signature · 1 line
David Marchand
#7 lore raw

PATCH 3/8 net/null: remove unused Tx error counter

In reply to David Marchand

This Tx counter has never been used.

Fixes c743e50c475f ("null: new poll mode driver")
---
 drivers/net/null/rte_eth_null.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/net/null/rte_eth_null.c +2 -7
index 31cbb84..b2c92ab 100644
@@ -62,7 +62,6 @@ struct null_queue {
 
 	rte_atomic64_t rx_pkts;
 	rte_atomic64_t tx_pkts;
-	rte_atomic64_t err_pkts;
 };
 
 struct pmd_internals {
@@ -311,7 +310,7 @@ static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
 {
 	unsigned i, num_stats;
-	unsigned long rx_total = 0, tx_total = 0, tx_err_total = 0;
+	unsigned long rx_total = 0, tx_total = 0;
 	const struct pmd_internals *internal;
 
 	if ((dev == NULL) || (igb_stats == NULL))
@@ -334,12 +333,10 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
 		igb_stats->q_opackets[i] =
 			internal->tx_null_queues[i].tx_pkts.cnt;
 		tx_total += igb_stats->q_opackets[i];
-		tx_err_total += internal->tx_null_queues[i].err_pkts.cnt;
 	}
 
 	igb_stats->ipackets = rx_total;
 	igb_stats->opackets = tx_total;
-	igb_stats->oerrors = tx_err_total;
 
 	return 0;
 }
@@ -356,10 +353,8 @@ eth_stats_reset(struct rte_eth_dev *dev)
 	internal = dev->data->dev_private;
 	for (i = 0; i < RTE_DIM(internal->rx_null_queues); i++)
 		internal->rx_null_queues[i].rx_pkts.cnt = 0;
-	for (i = 0; i < RTE_DIM(internal->tx_null_queues); i++) {
+	for (i = 0; i < RTE_DIM(internal->tx_null_queues); i++)
 		internal->tx_null_queues[i].tx_pkts.cnt = 0;
-		internal->tx_null_queues[i].err_pkts.cnt = 0;
-	}
 }
 
 static void
Signature · 1 line
1.8.3.1
#9 lore raw

PATCH 4/8 net/virtio: remove unused Tx error counter

In reply to David Marchand

This Tx counter has never been used.

Fixes 9658d17da27b ("virtio: maintain stats per queue")
---
 drivers/net/virtio/virtio_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/virtio/virtio_ethdev.c +0 -3
index 62c8274..20840bf 100644
@@ -121,7 +121,6 @@ static const struct rte_virtio_xstats_name_off rte_virtio_rxq_stat_strings[] = {
 static const struct rte_virtio_xstats_name_off rte_virtio_txq_stat_strings[] = {
 	{"good_packets",           offsetof(struct virtnet_tx, stats.packets)},
 	{"good_bytes",             offsetof(struct virtnet_tx, stats.bytes)},
-	{"errors",                 offsetof(struct virtnet_tx, stats.errors)},
 	{"multicast_packets",      offsetof(struct virtnet_tx, stats.multicast)},
 	{"broadcast_packets",      offsetof(struct virtnet_tx, stats.broadcast)},
 	{"undersize_packets",      offsetof(struct virtnet_tx, stats.size_bins[0])},
@@ -944,7 +943,6 @@ virtio_update_stats(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
 		stats->opackets += txvq->stats.packets;
 		stats->obytes += txvq->stats.bytes;
-		stats->oerrors += txvq->stats.errors;
 
 		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
 			stats->q_opackets[i] = txvq->stats.packets;
@@ -1082,7 +1080,6 @@ virtio_dev_stats_reset(struct rte_eth_dev *dev)
 
 		txvq->stats.packets = 0;
 		txvq->stats.bytes = 0;
-		txvq->stats.errors = 0;
 		txvq->stats.multicast = 0;
 		txvq->stats.broadcast = 0;
 		memset(txvq->stats.size_bins, 0,
Signature · 1 line
1.8.3.1
#11 lore raw

PATCH 5/8 net/kni: do not count unsent packets as errors

In reply to David Marchand

err_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 75e2bc54c018 ("net/kni: add KNI PMD")
---
 drivers/net/kni/rte_eth_kni.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/kni/rte_eth_kni.c +0 -3
index 9e0c6bd..8026566 100644
@@ -270,7 +270,6 @@ eth_kni_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	unsigned long rx_packets_total = 0, rx_bytes_total = 0;
 	unsigned long tx_packets_total = 0, tx_bytes_total = 0;
 	struct rte_eth_dev_data *data = dev->data;
-	unsigned long tx_packets_err_total = 0;
 	unsigned int i, num_stats;
 	struct pmd_queue *q;
 
@@ -292,14 +291,12 @@ eth_kni_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->q_obytes[i] = q->tx.bytes;
 		tx_packets_total += stats->q_opackets[i];
 		tx_bytes_total += stats->q_obytes[i];
-		tx_packets_err_total += q->tx.err_pkts;
 	}
 
 	stats->ipackets = rx_packets_total;
 	stats->ibytes = rx_bytes_total;
 	stats->opackets = tx_packets_total;
 	stats->obytes = tx_bytes_total;
-	stats->oerrors = tx_packets_err_total;
 
 	return 0;
 }
Signature · 1 line
1.8.3.1
#12 lore raw

Re: [dpdk-dev] [PATCH 5/8] net/kni: do not count unsent packets as errors

Quoted 5 lines · David Marchand

err_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.

'err_pkts' seems calculated wrong both in Rx & Tx and KNI PMD, looks like we can remove it completely, what do you think?

Quoted 37 lines
Fixes 75e2bc54c018 ("net/kni: add KNI PMD")
---
 drivers/net/kni/rte_eth_kni.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/kni/rte_eth_kni.c +0 -3
index 9e0c6bd..8026566 100644
@@ -270,7 +270,6 @@ eth_kni_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	unsigned long rx_packets_total = 0, rx_bytes_total = 0;
 	unsigned long tx_packets_total = 0, tx_bytes_total = 0;
 	struct rte_eth_dev_data *data = dev->data;
-	unsigned long tx_packets_err_total = 0;
 	unsigned int i, num_stats;
 	struct pmd_queue *q;
 
@@ -292,14 +291,12 @@ eth_kni_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->q_obytes[i] = q->tx.bytes;
 		tx_packets_total += stats->q_opackets[i];
 		tx_bytes_total += stats->q_obytes[i];
-		tx_packets_err_total += q->tx.err_pkts;
 	}
 
 	stats->ipackets = rx_packets_total;
 	stats->ibytes = rx_bytes_total;
 	stats->opackets = tx_packets_total;
 	stats->obytes = tx_bytes_total;
-	stats->oerrors = tx_packets_err_total;
 
 	return 0;
 }
#13 lore raw

Re: [dpdk-dev] [PATCH 5/8] net/kni: do not count unsent packets as errors

Quoted 10 lines · Ferruh Yigit
Quoted 5 lines · David Marchand

err_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.

'err_pkts' seems calculated wrong both in Rx & Tx and KNI PMD, looks like we can remove it completely, what do you think?

On the rx side, I agree that err_pkts makes little sense. On the tx side, it can be seen as a "tx full" counter.

So not sure about the tx side, but I sure can remove the rx part (in a separate patch?).

Signature · 1 line
David Marchand
#14 lore raw

Re: [dpdk-dev] [PATCH 5/8] net/kni: do not count unsent packets as errors

Quoted 10 lines · David Marchand
Quoted 8 lines · Ferruh Yigit
Quoted 5 lines · David Marchand

err_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.

Quoted 8 lines
Quoted 2 lines

'err_pkts' seems calculated wrong both in Rx & Tx and KNI PMD, looks like we can remove it completely, what do you think?

On the rx side, I agree that err_pkts makes little sense. On the tx side, it can be seen as a "tx full" counter.

So not sure about the tx side, but I sure can remove the rx part (in a separate patch?).

On second thought, we have nothing to report "tx full" for now (unless adding xstats support but it is too late for 19.08).
I will go with dropping those bits if you are still okay with this (and idem with the others drivers for which you commented in the same way).

Signature · 1 line
David Marchand
#15 lore raw

Re: [dpdk-dev] [PATCH 5/8] net/kni: do not count unsent packets as errors

Quoted 18 lines · David Marchand
Quoted 16 lines · David Marchand
Quoted 10 lines · Ferruh Yigit
Quoted 5 lines · David Marchand

err_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.

'err_pkts' seems calculated wrong both in Rx & Tx and KNI PMD, looks like we can remove it completely, what do you think?

On the rx side, I agree that err_pkts makes little sense. On the tx side, it can be seen as a "tx full" counter.

Quoted 6 lines
Quoted 2 lines

So not sure about the tx side, but I sure can remove the rx part (in a separate patch?).

On second thought, we have nothing to report "tx full" for now (unless adding xstats support but it is too late for 19.08).
I will go with dropping those bits if you are still okay with this

+1 to drop, thanks.

Quoted 4 lines

(and idem with the others drivers for which you commented in the same way).

#16 lore raw

PATCH 6/8 net/memif: do not count unsent packets as errors

In reply to David Marchand

n_err 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 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
---
 drivers/net/memif/rte_eth_memif.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/memif/rte_eth_memif.c +0 -2
index 00c9b39..080729a 100644
@@ -938,7 +938,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	stats->ibytes = 0;
 	stats->opackets = 0;
 	stats->obytes = 0;
-	stats->oerrors = 0;
 
 	tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings :
 	    pmd->run.num_m2s_rings;
@@ -966,7 +965,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->q_obytes[i] = mq->n_bytes;
 		stats->opackets += mq->n_pkts;
 		stats->obytes += mq->n_bytes;
-		stats->oerrors += mq->n_err;
 	}
 	return 0;
 }
Signature · 1 line
1.8.3.1
#17 lore raw

Re: [dpdk-dev] [PATCH 6/8] net/memif: do not count unsent packets as errors

Quoted 26 lines · David Marchand

n_err 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 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
---
 drivers/net/memif/rte_eth_memif.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/memif/rte_eth_memif.c +0 -1
index 00c9b39..080729a 100644
@@ -938,7 +938,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	stats->ibytes = 0;
 	stats->opackets = 0;
 	stats->obytes = 0;
-	stats->oerrors = 0;
 
 	tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings :
 	    pmd->run.num_m2s_rings;

drivers/net/memif/rte_eth_memif.c memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) · line 969

Quoted 4 lines
drivers/net/memif/rte_eth_memif.c +0 -1
@@ -966,7 +965,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->q_obytes[i] = mq->n_bytes;
 		stats->opackets += mq->n_pkts;
 		stats->obytes += mq->n_bytes;
-		stats->oerrors += mq->n_err;

Can we also delete 'n_err', it seems calculated wrong already?

Quoted 4 lines
drivers/net/memif/rte_eth_memif.c +0 -0
 	}
 	return 0;
 }
#18 lore raw

PATCH 7/8 net/ring: do not count unsent packets as errors

In reply to David Marchand

err_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 e1e4017751f1 ("ring: add new driver")
---
 drivers/net/ring/rte_eth_ring.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ring/rte_eth_ring.c +1 -3
index eb347bc..eef7606 100644
@@ -172,7 +172,7 @@ static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	unsigned int i;
-	unsigned long rx_total = 0, tx_total = 0, tx_err_total = 0;
+	unsigned long rx_total = 0, tx_total = 0;
 	const struct pmd_internals *internal = dev->data->dev_private;
 
 	for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS &&
@@ -185,12 +185,10 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			i < dev->data->nb_tx_queues; i++) {
 		stats->q_opackets[i] = internal->tx_ring_queues[i].tx_pkts.cnt;
 		tx_total += stats->q_opackets[i];
-		tx_err_total += internal->tx_ring_queues[i].err_pkts.cnt;
 	}
 
 	stats->ipackets = rx_total;
 	stats->opackets = tx_total;
-	stats->oerrors = tx_err_total;
 
 	return 0;
 }
Signature · 1 line
1.8.3.1
#19 lore raw

Re: [dpdk-dev] [PATCH 7/8] net/ring: do not count unsent packets as errors

Quoted 28 lines · David Marchand

err_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 e1e4017751f1 ("ring: add new driver")
---
 drivers/net/ring/rte_eth_ring.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ring/rte_eth_ring.c +1 -1
index eb347bc..eef7606 100644
@@ -172,7 +172,7 @@ static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	unsigned int i;
-	unsigned long rx_total = 0, tx_total = 0, tx_err_total = 0;
+	unsigned long rx_total = 0, tx_total = 0;
 	const struct pmd_internals *internal = dev->data->dev_private;
 
 	for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS &&

drivers/net/ring/rte_eth_ring.c eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) · line 188

Quoted 4 lines
drivers/net/ring/rte_eth_ring.c +0 -1
@@ -185,12 +185,10 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			i < dev->data->nb_tx_queues; i++) {
 		stats->q_opackets[i] = internal->tx_ring_queues[i].tx_pkts.cnt;
 		tx_total += stats->q_opackets[i];
-		tx_err_total += internal->tx_ring_queues[i].err_pkts.cnt;

Can we remove 'err_pkts' completely, it seems already calculated wrong?

Quoted 9 lines
drivers/net/ring/rte_eth_ring.c +0 -1
 	}
 
 	stats->ipackets = rx_total;
 	stats->opackets = tx_total;
-	stats->oerrors = tx_err_total;
 
 	return 0;
 }
#20 lore raw

PATCH 8/8 net/vhost: do not count unsent packets as errors

In reply to David Marchand

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")
---
 drivers/net/vhost/rte_eth_vhost.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/vhost/rte_eth_vhost.c +1 -3
index 57f382c..a4892d7 100644
@@ -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;
 
Signature · 1 line
1.8.3.1
Reviewed-by on v1 8/8
#21 lore raw

Re: [dpdk-dev] [PATCH 8/8] net/vhost: do not count unsent packets as errors

Quoted 6 lines · David Marchand

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.

Quoted 8 lines
Fixes 5f05e95cd5d9 ("net/vhost: fix Tx error counting")
Fixes ee584e9710b9 ("vhost: add driver on top of the library")
---
 drivers/net/vhost/rte_eth_vhost.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
#22 lore raw

v2 cover oerrors stats fixes for virtual pmds

In reply to David Marchand

I did a pass on the pmds about oerrors some time ago, but still did not find the motivation to finish yet.
For now, here is a series of cleanups on the virtual pmds.

The former patches are just about removing counters that adds nothing to the stats.

The latter patches make sure that unsent packets (because of a temporary situation) are not added to oerrors since an application can decide to send them again later.

Wrt oerrors, the pcap pmd should be fixed with the series [1]. But the tap pmd still needs to be inspected.

1: https://patchwork.dpdk.org/project/dpdk/list/?series=5701

Changelog since v1:
- added a patch on kni that drops a Rx counter
- dropped the Tx counter for kni, memif and ring

Signature · 26 lines
David Marchand

David Marchand (9):
  net/af_packet: remove unused Rx counter
  net/af_xdp: remove unused Tx counter
  net/null: remove unused Tx error counter
  net/virtio: remove unused Tx error counter
  net/kni: remove unused Rx "error" counter
  net/kni: do not count unsent packets as errors
  net/memif: do not count unsent packets as errors
  net/ring: do not count unsent packets as errors
  net/vhost: do not count unsent packets as errors

 drivers/net/af_packet/rte_eth_af_packet.c |  1 -
 drivers/net/af_xdp/rte_eth_af_xdp.c       |  2 --
 drivers/net/kni/rte_eth_kni.c             |  7 -------
 drivers/net/memif/rte_eth_memif.c         |  7 -------
 drivers/net/memif/rte_eth_memif.h         |  1 -
 drivers/net/null/rte_eth_null.c           |  9 ++-------
 drivers/net/ring/rte_eth_ring.c           | 16 ++++------------
 drivers/net/vhost/rte_eth_vhost.c         |  4 +---
 drivers/net/virtio/virtio_ethdev.c        |  3 ---
 9 files changed, 7 insertions(+), 43 deletions(-)

-- 
1.8.3.1
#23 lore raw

PATCH v2 1/9 net/af_packet: remove unused Rx counter

This Rx counter has never been used.

Fixes 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")
---
 drivers/net/af_packet/rte_eth_af_packet.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/af_packet/rte_eth_af_packet.c +0 -1
index 2f6508f..82bf2cd 100644
@@ -51,7 +51,6 @@ struct pkt_rx_queue {
 	uint16_t in_port;
 
 	volatile unsigned long rx_pkts;
-	volatile unsigned long err_pkts;
 	volatile unsigned long rx_bytes;
 };
 
Signature · 1 line
1.8.3.1
#24 lore raw

PATCH v2 2/9 net/af_xdp: remove unused Tx counter

In reply to David Marchand

This Tx counter is now unused.

Fixes 10edf857fde4 ("net/af_xdp: make reserve/submit peek/release consistent")
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/af_xdp/rte_eth_af_xdp.c +0 -2
index 33352e1..41ed5b2 100644
@@ -97,7 +97,6 @@ struct pkt_rx_queue {
 
 struct tx_stats {
 	uint64_t tx_pkts;
-	uint64_t err_pkts;
 	uint64_t tx_bytes;
 };
 
@@ -456,7 +455,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->imissed += xdp_stats.rx_dropped;
 
 		stats->opackets += stats->q_opackets[i];
-		stats->oerrors += txq->stats.err_pkts;
 		stats->obytes += stats->q_obytes[i];
 	}
 
Signature · 1 line
1.8.3.1
#25 lore raw

PATCH v2 3/9 net/null: remove unused Tx error counter

In reply to David Marchand

This Tx counter has never been used.

Fixes c743e50c475f ("null: new poll mode driver")
---
 drivers/net/null/rte_eth_null.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/net/null/rte_eth_null.c +2 -7
index 31cbb84..b2c92ab 100644
@@ -62,7 +62,6 @@ struct null_queue {
 
 	rte_atomic64_t rx_pkts;
 	rte_atomic64_t tx_pkts;
-	rte_atomic64_t err_pkts;
 };
 
 struct pmd_internals {
@@ -311,7 +310,7 @@ static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
 {
 	unsigned i, num_stats;
-	unsigned long rx_total = 0, tx_total = 0, tx_err_total = 0;
+	unsigned long rx_total = 0, tx_total = 0;
 	const struct pmd_internals *internal;
 
 	if ((dev == NULL) || (igb_stats == NULL))
@@ -334,12 +333,10 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
 		igb_stats->q_opackets[i] =
 			internal->tx_null_queues[i].tx_pkts.cnt;
 		tx_total += igb_stats->q_opackets[i];
-		tx_err_total += internal->tx_null_queues[i].err_pkts.cnt;
 	}
 
 	igb_stats->ipackets = rx_total;
 	igb_stats->opackets = tx_total;
-	igb_stats->oerrors = tx_err_total;
 
 	return 0;
 }
@@ -356,10 +353,8 @@ eth_stats_reset(struct rte_eth_dev *dev)
 	internal = dev->data->dev_private;
 	for (i = 0; i < RTE_DIM(internal->rx_null_queues); i++)
 		internal->rx_null_queues[i].rx_pkts.cnt = 0;
-	for (i = 0; i < RTE_DIM(internal->tx_null_queues); i++) {
+	for (i = 0; i < RTE_DIM(internal->tx_null_queues); i++)
 		internal->tx_null_queues[i].tx_pkts.cnt = 0;
-		internal->tx_null_queues[i].err_pkts.cnt = 0;
-	}
 }
 
 static void
Signature · 1 line
1.8.3.1
#26 lore raw

PATCH v2 4/9 net/virtio: remove unused Tx error counter

In reply to David Marchand

This Tx counter has never been used.

Fixes 9658d17da27b ("virtio: maintain stats per queue")
---
 drivers/net/virtio/virtio_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/virtio/virtio_ethdev.c +0 -3
index 62c8274..20840bf 100644
@@ -121,7 +121,6 @@ static const struct rte_virtio_xstats_name_off rte_virtio_rxq_stat_strings[] = {
 static const struct rte_virtio_xstats_name_off rte_virtio_txq_stat_strings[] = {
 	{"good_packets",           offsetof(struct virtnet_tx, stats.packets)},
 	{"good_bytes",             offsetof(struct virtnet_tx, stats.bytes)},
-	{"errors",                 offsetof(struct virtnet_tx, stats.errors)},
 	{"multicast_packets",      offsetof(struct virtnet_tx, stats.multicast)},
 	{"broadcast_packets",      offsetof(struct virtnet_tx, stats.broadcast)},
 	{"undersize_packets",      offsetof(struct virtnet_tx, stats.size_bins[0])},
@@ -944,7 +943,6 @@ virtio_update_stats(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 
 		stats->opackets += txvq->stats.packets;
 		stats->obytes += txvq->stats.bytes;
-		stats->oerrors += txvq->stats.errors;
 
 		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
 			stats->q_opackets[i] = txvq->stats.packets;
@@ -1082,7 +1080,6 @@ virtio_dev_stats_reset(struct rte_eth_dev *dev)
 
 		txvq->stats.packets = 0;
 		txvq->stats.bytes = 0;
-		txvq->stats.errors = 0;
 		txvq->stats.multicast = 0;
 		txvq->stats.broadcast = 0;
 		memset(txvq->stats.size_bins, 0,
Signature · 1 line
1.8.3.1
#27 lore raw

PATCH v2 5/9 net/kni: remove unused Rx "error" counter

In reply to David Marchand

The delta between what the application asked to receive and what was indeed received, can not be called an error counter.
This counter is not reported anywhere, remove it.

Fixes 75e2bc54c018 ("net/kni: add KNI PMD")
---
 drivers/net/kni/rte_eth_kni.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/kni/rte_eth_kni.c +0 -1
index 9e0c6bd..884280c 100644
@@ -83,7 +83,6 @@ eth_kni_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 	nb_pkts = rte_kni_rx_burst(kni, bufs, nb_bufs);
 
 	kni_q->rx.pkts += nb_pkts;
-	kni_q->rx.err_pkts += nb_bufs - nb_pkts;
 
 	return nb_pkts;
 }
Signature · 1 line
1.8.3.1
#29 lore raw

PATCH v2 6/9 net/kni: do not count unsent packets as errors

In reply to David Marchand

err_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 75e2bc54c018 ("net/kni: add KNI PMD")

---
Changelog since v1:
- dropped the err_pkts counter entirely as nothing reports it

---
 drivers/net/kni/rte_eth_kni.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/net/kni/rte_eth_kni.c +0 -6
index 884280c..515c0aa 100644
@@ -35,7 +35,6 @@ struct eth_kni_args {
 struct pmd_queue_stats {
 	uint64_t pkts;
 	uint64_t bytes;
-	uint64_t err_pkts;
 };
 
 struct pmd_queue {
@@ -97,7 +96,6 @@ eth_kni_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 	nb_pkts =  rte_kni_tx_burst(kni, bufs, nb_bufs);
 
 	kni_q->tx.pkts += nb_pkts;
-	kni_q->tx.err_pkts += nb_bufs - nb_pkts;
 
 	return nb_pkts;
 }
@@ -269,7 +267,6 @@ eth_kni_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	unsigned long rx_packets_total = 0, rx_bytes_total = 0;
 	unsigned long tx_packets_total = 0, tx_bytes_total = 0;
 	struct rte_eth_dev_data *data = dev->data;
-	unsigned long tx_packets_err_total = 0;
 	unsigned int i, num_stats;
 	struct pmd_queue *q;
 
@@ -291,14 +288,12 @@ eth_kni_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->q_obytes[i] = q->tx.bytes;
 		tx_packets_total += stats->q_opackets[i];
 		tx_bytes_total += stats->q_obytes[i];
-		tx_packets_err_total += q->tx.err_pkts;
 	}
 
 	stats->ipackets = rx_packets_total;
 	stats->ibytes = rx_bytes_total;
 	stats->opackets = tx_packets_total;
 	stats->obytes = tx_bytes_total;
-	stats->oerrors = tx_packets_err_total;
 
 	return 0;
 }
@@ -319,7 +314,6 @@ eth_kni_stats_reset(struct rte_eth_dev *dev)
 		q = data->tx_queues[i];
 		q->tx.pkts = 0;
 		q->tx.bytes = 0;
-		q->tx.err_pkts = 0;
 	}
 }
 
Signature · 1 line
1.8.3.1
Acked-by on v2 6/9
#30 lore raw

Re: [dpdk-dev] [PATCH v2 6/9] net/kni: do not count unsent packets as errors

Quoted 10 lines · David Marchand

err_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 75e2bc54c018 ("net/kni: add KNI PMD")
#31 lore raw

PATCH v2 7/9 net/memif: do not count unsent packets as errors

In reply to David Marchand

n_err 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 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

---
Changelog since v1:
- dropped the n_err counter entirely as nothing reports it

---
 drivers/net/memif/rte_eth_memif.c | 7 -------
 drivers/net/memif/rte_eth_memif.h | 1 -
 2 files changed, 8 deletions(-)
drivers/net/memif/rte_eth_memif.c +0 -7
index 00c9b39..bcda426 100644
@@ -479,7 +479,6 @@ no_free_slots:
 		}
 	}
 
-	mq->n_err += nb_pkts - n_tx_pkts;
 	mq->n_pkts += n_tx_pkts;
 	return n_tx_pkts;
 }
@@ -857,7 +856,6 @@ memif_tx_queue_setup(struct rte_eth_dev *dev,
 	    (pmd->role == MEMIF_ROLE_SLAVE) ? MEMIF_RING_S2M : MEMIF_RING_M2S;
 	mq->n_pkts = 0;
 	mq->n_bytes = 0;
-	mq->n_err = 0;
 	mq->intr_handle.fd = -1;
 	mq->intr_handle.type = RTE_INTR_HANDLE_EXT;
 	dev->data->tx_queues[qid] = mq;
@@ -886,7 +884,6 @@ memif_rx_queue_setup(struct rte_eth_dev *dev,
 	mq->type = (pmd->role == MEMIF_ROLE_SLAVE) ? MEMIF_RING_M2S : MEMIF_RING_S2M;
 	mq->n_pkts = 0;
 	mq->n_bytes = 0;
-	mq->n_err = 0;
 	mq->intr_handle.fd = -1;
 	mq->intr_handle.type = RTE_INTR_HANDLE_EXT;
 	mq->mempool = mb_pool;
@@ -938,7 +935,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	stats->ibytes = 0;
 	stats->opackets = 0;
 	stats->obytes = 0;
-	stats->oerrors = 0;
 
 	tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings :
 	    pmd->run.num_m2s_rings;
@@ -966,7 +962,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->q_obytes[i] = mq->n_bytes;
 		stats->opackets += mq->n_pkts;
 		stats->obytes += mq->n_bytes;
-		stats->oerrors += mq->n_err;
 	}
 	return 0;
 }
@@ -983,14 +978,12 @@ memif_stats_reset(struct rte_eth_dev *dev)
 		    dev->data->rx_queues[i];
 		mq->n_pkts = 0;
 		mq->n_bytes = 0;
-		mq->n_err = 0;
 	}
 	for (i = 0; i < pmd->run.num_m2s_rings; i++) {
 		mq = (pmd->role == MEMIF_ROLE_SLAVE) ? dev->data->rx_queues[i] :
 		    dev->data->tx_queues[i];
 		mq->n_pkts = 0;
 		mq->n_bytes = 0;
-		mq->n_err = 0;
 	}
 }
 
drivers/net/memif/rte_eth_memif.h +0 -1
index 24e8a09..8269212 100644
@@ -66,7 +66,6 @@ struct memif_queue {
 	/* rx/tx info */
 	uint64_t n_pkts;			/**< number of rx/tx packets */
 	uint64_t n_bytes;			/**< number of rx/tx bytes */
-	uint64_t n_err;				/**< number of tx errors */
 
 	memif_ring_t *ring;			/**< pointer to ring */
 
Signature · 1 line
1.8.3.1
Reviewed-by on v2 7/9
#32 lore raw

Re: [dpdk-dev] [PATCH v2 7/9] net/memif: do not count unsent packets as errors

Quoted 9 lines · David Marchand

n_err 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 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
#33 lore raw

PATCH v2 8/9 net/ring: do not count unsent packets as errors

In reply to David Marchand

err_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 e1e4017751f1 ("ring: add new driver")

---
Changelog since v1:
- dropped the err_pkts counter entirely as nothing reports it

---
 drivers/net/ring/rte_eth_ring.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/net/ring/rte_eth_ring.c +4 -12
index eb347bc..634da63 100644
@@ -41,7 +41,6 @@ struct ring_queue {
 	struct rte_ring *rng;
 	rte_atomic64_t rx_pkts;
 	rte_atomic64_t tx_pkts;
-	rte_atomic64_t err_pkts;
 };
 
 struct pmd_internals {
@@ -89,13 +88,10 @@ eth_ring_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 	struct ring_queue *r = q;
 	const uint16_t nb_tx = (uint16_t)rte_ring_enqueue_burst(r->rng,
 			ptrs, nb_bufs, NULL);
-	if (r->rng->flags & RING_F_SP_ENQ) {
+	if (r->rng->flags & RING_F_SP_ENQ)
 		r->tx_pkts.cnt += nb_tx;
-		r->err_pkts.cnt += nb_bufs - nb_tx;
-	} else {
+	else
 		rte_atomic64_add(&(r->tx_pkts), nb_tx);
-		rte_atomic64_add(&(r->err_pkts), nb_bufs - nb_tx);
-	}
 	return nb_tx;
 }
 
@@ -172,7 +168,7 @@ static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	unsigned int i;
-	unsigned long rx_total = 0, tx_total = 0, tx_err_total = 0;
+	unsigned long rx_total = 0, tx_total = 0;
 	const struct pmd_internals *internal = dev->data->dev_private;
 
 	for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS &&
@@ -185,12 +181,10 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			i < dev->data->nb_tx_queues; i++) {
 		stats->q_opackets[i] = internal->tx_ring_queues[i].tx_pkts.cnt;
 		tx_total += stats->q_opackets[i];
-		tx_err_total += internal->tx_ring_queues[i].err_pkts.cnt;
 	}
 
 	stats->ipackets = rx_total;
 	stats->opackets = tx_total;
-	stats->oerrors = tx_err_total;
 
 	return 0;
 }
@@ -203,10 +197,8 @@ eth_stats_reset(struct rte_eth_dev *dev)
 
 	for (i = 0; i < dev->data->nb_rx_queues; i++)
 		internal->rx_ring_queues[i].rx_pkts.cnt = 0;
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
+	for (i = 0; i < dev->data->nb_tx_queues; i++)
 		internal->tx_ring_queues[i].tx_pkts.cnt = 0;
-		internal->tx_ring_queues[i].err_pkts.cnt = 0;
-	}
 }
 
 static void
Signature · 1 line
1.8.3.1
Reviewed-by on v2 8/9
#34 lore raw

Re: [dpdk-dev] [PATCH v2 8/9] net/ring: do not count unsent packets as errors

Quoted 10 lines · David Marchand

err_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 e1e4017751f1 ("ring: add new driver")
#35 lore raw

PATCH v2 9/9 net/vhost: do not count unsent packets as errors

In reply to David Marchand

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")
---
 drivers/net/vhost/rte_eth_vhost.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/vhost/rte_eth_vhost.c +1 -3
index 57f382c..a4892d7 100644
@@ -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;
 
Signature · 1 line
1.8.3.1
#36 lore raw
In reply to David Marchand
Quoted 11 lines · David Marchand

I did a pass on the pmds about oerrors some time ago, but still did not find the motivation to finish yet.
For now, here is a series of cleanups on the virtual pmds.

The former patches are just about removing counters that adds nothing to the stats.

The latter patches make sure that unsent packets (because of a temporary situation) are not added to oerrors since an application can decide to send them again later.

Quoted 9 lines

Wrt oerrors, the pcap pmd should be fixed with the series [1]. But the tap pmd still needs to be inspected.

1: https://patchwork.dpdk.org/project/dpdk/list/?series=5701

Changelog since v1:
- added a patch on kni that drops a Rx counter
- dropped the Tx counter for kni, memif and ring

Series applied to dpdk-next-net/master, thanks.