patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH v2 6/9] net/kni: do not count unsent packets as errors
Date: Fri, 26 Jul 2019 12:21:25 +0200	[thread overview]
Message-ID: <1564136488-29065-7-git-send-email-david.marchand@redhat.com> (raw)
In-Reply-To: <1564136488-29065-1-git-send-email-david.marchand@redhat.com>

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")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
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(-)

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 884280c..515c0aa 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -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;
 	}
 }
 
-- 
1.8.3.1


  parent reply	other threads:[~2019-07-26 10:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1564046068-21905-1-git-send-email-david.marchand@redhat.com>
2019-07-25  9:14 ` [dpdk-stable] [PATCH 1/8] net/af_packet: remove unused Rx counter David Marchand
2019-07-25 16:06   ` Ferruh Yigit
2019-07-25  9:14 ` [dpdk-stable] [PATCH 3/8] net/null: remove unused Tx error counter David Marchand
2019-07-25 16:06   ` Ferruh Yigit
2019-07-25  9:14 ` [dpdk-stable] [PATCH 4/8] net/virtio: " David Marchand
2019-07-26  2:39   ` Tiwei Bie
2019-07-25  9:14 ` [dpdk-stable] [PATCH 5/8] net/kni: do not count unsent packets as errors David Marchand
2019-07-25 16:12   ` Ferruh Yigit
2019-07-25 19:07     ` David Marchand
2019-07-26  7:24       ` David Marchand
2019-07-26 10:17         ` Ferruh Yigit
2019-07-25  9:14 ` [dpdk-stable] [PATCH 7/8] net/ring: " David Marchand
2019-07-25 16:19   ` Ferruh Yigit
2019-07-25  9:14 ` [dpdk-stable] [PATCH 8/8] net/vhost: " David Marchand
2019-07-26  2:44   ` Tiwei Bie
     [not found] ` <1564136488-29065-1-git-send-email-david.marchand@redhat.com>
2019-07-26 10:21   ` [dpdk-stable] [PATCH v2 1/9] net/af_packet: remove unused Rx counter David Marchand
2019-07-26 10:21   ` [dpdk-stable] [PATCH v2 3/9] net/null: remove unused Tx error counter David Marchand
2019-07-26 10:21   ` [dpdk-stable] [PATCH v2 4/9] net/virtio: " David Marchand
2019-07-26 10:21   ` [dpdk-stable] [PATCH v2 5/9] net/kni: remove unused Rx "error" counter David Marchand
2019-07-26 13:23     ` Ferruh Yigit
2019-07-26 10:21   ` David Marchand [this message]
2019-07-26 13:23     ` [dpdk-stable] [PATCH v2 6/9] net/kni: do not count unsent packets as errors Ferruh Yigit
2019-07-26 10:21   ` [dpdk-stable] [PATCH v2 8/9] net/ring: " David Marchand
2019-07-26 13:24     ` Ferruh Yigit
2019-07-26 10:21   ` [dpdk-stable] [PATCH v2 9/9] net/vhost: " David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1564136488-29065-7-git-send-email-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).