From: Ferruh Yigit <ferruh.yigit@intel.com>
To: David Marchand <david.marchand@redhat.com>, dev@dpdk.org
Cc: stable@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH 7/8] net/ring: do not count unsent packets as errors
Date: Thu, 25 Jul 2019 17:19:27 +0100 [thread overview]
Message-ID: <3f3fbd9f-0cfa-041b-e993-c66a4888a95e@intel.com> (raw)
In-Reply-To: <1564046068-21905-8-git-send-email-david.marchand@redhat.com>
On 7/25/2019 10:14 AM, David Marchand wrote:
> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> drivers/net/ring/rte_eth_ring.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
> index eb347bc..eef7606 100644
> --- a/drivers/net/ring/rte_eth_ring.c
> +++ b/drivers/net/ring/rte_eth_ring.c
> @@ -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;
Can we remove 'err_pkts' completely, it seems already calculated wrong?
> }
>
> stats->ipackets = rx_total;
> stats->opackets = tx_total;
> - stats->oerrors = tx_err_total;
>
> return 0;
> }
>
next prev parent reply other threads:[~2019-07-25 16:19 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 9:14 [dpdk-dev] [PATCH 0/8] oerrors stats fixes for virtual pmds David Marchand
2019-07-25 9:14 ` [dpdk-dev] [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-dev] [PATCH 2/8] net/af_xdp: remove unused Tx counter David Marchand
2019-07-25 15:49 ` Ye Xiaolong
2019-07-25 19:04 ` David Marchand
2019-07-26 1:33 ` Ye Xiaolong
2019-07-25 9:14 ` [dpdk-dev] [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-dev] [PATCH 4/8] net/virtio: " David Marchand
2019-07-26 2:39 ` Tiwei Bie
2019-07-25 9:14 ` [dpdk-dev] [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-dev] [PATCH 6/8] net/memif: " David Marchand
2019-07-25 16:18 ` Ferruh Yigit
2019-07-25 9:14 ` [dpdk-dev] [PATCH 7/8] net/ring: " David Marchand
2019-07-25 16:19 ` Ferruh Yigit [this message]
2019-07-25 9:14 ` [dpdk-dev] [PATCH 8/8] net/vhost: " David Marchand
2019-07-26 2:44 ` Tiwei Bie
2019-07-26 10:21 ` [dpdk-dev] [PATCH v2 0/9] oerrors stats fixes for virtual pmds David Marchand
2019-07-26 10:21 ` [dpdk-dev] [PATCH v2 1/9] net/af_packet: remove unused Rx counter David Marchand
2019-07-26 10:21 ` [dpdk-dev] [PATCH v2 2/9] net/af_xdp: remove unused Tx counter David Marchand
2019-07-26 10:21 ` [dpdk-dev] [PATCH v2 3/9] net/null: remove unused Tx error counter David Marchand
2019-07-26 10:21 ` [dpdk-dev] [PATCH v2 4/9] net/virtio: " David Marchand
2019-07-26 10:21 ` [dpdk-dev] [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 ` [dpdk-dev] [PATCH v2 6/9] net/kni: do not count unsent packets as errors David Marchand
2019-07-26 13:23 ` Ferruh Yigit
2019-07-26 10:21 ` [dpdk-dev] [PATCH v2 7/9] net/memif: " David Marchand
2019-07-26 13:24 ` Ferruh Yigit
2019-07-26 10:21 ` [dpdk-dev] [PATCH v2 8/9] net/ring: " David Marchand
2019-07-26 13:24 ` Ferruh Yigit
2019-07-26 10:21 ` [dpdk-dev] [PATCH v2 9/9] net/vhost: " David Marchand
2019-07-26 13:28 ` [dpdk-dev] [PATCH v2 0/9] oerrors stats fixes for virtual pmds Ferruh Yigit
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=3f3fbd9f-0cfa-041b-e993-c66a4888a95e@intel.com \
--to=ferruh.yigit@intel.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--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).