DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Andrey Ignatov <rdna@apple.com>, dev@dpdk.org
Cc: Chenbo Xia <chenbo.xia@intel.com>, Wei Shen <wshen0123@apple.com>
Subject: Re: [PATCH] net/vhost: report TX errors in port stats
Date: Thu, 12 Oct 2023 15:49:11 +0200	[thread overview]
Message-ID: <6548fb9c-3f01-8616-036f-040186ff2b69@redhat.com> (raw)
In-Reply-To: <20230930010024.34377-1-rdna@apple.com>



On 9/30/23 03:00, Andrey Ignatov wrote:
> vhost device doesn't report TX errors what complicates debugging of
> dropped packets. Add oerrors to port stats.
> 
> - before (testpmd `show port stats`):
>    TX-packets: 18328512   TX-errors: 0          TX-bytes:  1173024768
> 
> - after:
>    TX-packets: 1737728    TX-errors: 131367616  TX-bytes:  111214592
> 
> Signed-off-by: Andrey Ignatov <rdna@apple.com>
> ---
>   drivers/net/vhost/rte_eth_vhost.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
> index 8d37ec9775..48a9a79efe 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
> @@ -1299,6 +1299,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
>   	unsigned i;
>   	unsigned long rx_total = 0, tx_total = 0;
>   	unsigned long rx_total_bytes = 0, tx_total_bytes = 0;
> +	unsigned long tx_total_errors = 0;
>   	struct vhost_queue *vq;
>   
>   	for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS &&
> @@ -1323,12 +1324,15 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
>   
>   		stats->q_obytes[i] = vq->stats.bytes;
>   		tx_total_bytes += stats->q_obytes[i];
> +
> +		tx_total_errors += vq->stats.missed_pkts;
>   	}
>   
>   	stats->ipackets = rx_total;
>   	stats->opackets = tx_total;
>   	stats->ibytes = rx_total_bytes;
>   	stats->obytes = tx_total_bytes;
> +	stats->oerrors = tx_total_errors;
>   
>   	return 0;
>   }

Applied to nex-virtio/for-next-net.

Thanks,
Maxime


      parent reply	other threads:[~2023-10-12 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-30  1:00 Andrey Ignatov
2023-10-06  7:05 ` Maxime Coquelin
2023-10-12 13:49 ` Maxime Coquelin [this message]

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=6548fb9c-3f01-8616-036f-040186ff2b69@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=rdna@apple.com \
    --cc=wshen0123@apple.com \
    /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).