DPDK patches and discussions
 help / color / mirror / Atom feed
From: <shaibran@amazon.com>
To: <ferruh.yigit@amd.com>
Cc: <dev@dpdk.org>, <rbeider@amazon.com>, <atrwajee@amazon.com>,
	<amitbern@amazon.com>, <shaibran@amazon.com>
Subject: [PATCH v3 3/5] net/ena: report Rx overrun errors in xstats
Date: Thu, 26 Oct 2023 17:21:33 +0300	[thread overview]
Message-ID: <20231026142135.19967-4-shaibran@amazon.com> (raw)
In-Reply-To: <20231026142135.19967-1-shaibran@amazon.com>

From: Shai Brandes <shaibran@amazon.com>

RX overrun error occur when a packet arrives but there are
not enough free buffers in the RX ring to receive it.
The driver publishes the extended statistics with the RX
buffer overrun errors as reported by the device.

Signed-off-by: Shai Brandes <shaibran@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
---
 doc/guides/rel_notes/release_23_11.rst | 1 +
 drivers/net/ena/ena_ethdev.c           | 4 ++++
 drivers/net/ena/ena_ethdev.h           | 1 +
 3 files changed, 6 insertions(+)

diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst
index 77731fbf6a..2666371ccd 100644
--- a/doc/guides/rel_notes/release_23_11.rst
+++ b/doc/guides/rel_notes/release_23_11.rst
@@ -126,6 +126,7 @@ New Features
 
   * Upgraded ENA HAL to latest version.
   * Added support for connection tracking allowance utilization metric.
+  * Added support for reporting rx overrun errors in xstats.
 
 * **Updated Intel cpfl driver.**
 
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 3e79a58541..bd9d7c6249 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -90,6 +90,7 @@ static const struct ena_stats ena_stats_global_strings[] = {
 	ENA_STAT_GLOBAL_ENTRY(dev_start),
 	ENA_STAT_GLOBAL_ENTRY(dev_stop),
 	ENA_STAT_GLOBAL_ENTRY(tx_drops),
+	ENA_STAT_GLOBAL_ENTRY(rx_overruns),
 };
 
 /*
@@ -3906,15 +3907,18 @@ static void ena_keep_alive(void *adapter_data,
 	struct ena_admin_aenq_keep_alive_desc *desc;
 	uint64_t rx_drops;
 	uint64_t tx_drops;
+	uint64_t rx_overruns;
 
 	adapter->timestamp_wd = rte_get_timer_cycles();
 
 	desc = (struct ena_admin_aenq_keep_alive_desc *)aenq_e;
 	rx_drops = ((uint64_t)desc->rx_drops_high << 32) | desc->rx_drops_low;
 	tx_drops = ((uint64_t)desc->tx_drops_high << 32) | desc->tx_drops_low;
+	rx_overruns = ((uint64_t)desc->rx_overruns_high << 32) | desc->rx_overruns_low;
 
 	adapter->drv_stats->rx_drops = rx_drops;
 	adapter->dev_stats.tx_drops = tx_drops;
+	adapter->dev_stats.rx_overruns = rx_overruns;
 }
 
 /**
diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h
index 9268d44dde..3f29764ca6 100644
--- a/drivers/net/ena/ena_ethdev.h
+++ b/drivers/net/ena/ena_ethdev.h
@@ -219,6 +219,7 @@ struct ena_stats_dev {
 	 * As a workaround it is being published as an extended statistic.
 	 */
 	u64 tx_drops;
+	u64 rx_overruns;
 };
 
 struct ena_stats_metrics {
-- 
2.17.1


  parent reply	other threads:[~2023-10-26 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26 14:21 [PATCH v3 0/5] net/ena: v2.8.0 driver release shaibran
2023-10-26 14:21 ` [PATCH v3 1/5] net/ena: hal upgrade shaibran
2023-10-26 14:21 ` [PATCH v3 2/5] net/ena: add support for connection tracking metric shaibran
2023-10-26 14:21 ` shaibran [this message]
2023-10-26 14:21 ` [PATCH v3 4/5] net/ena: add support for ena-express metrics shaibran
2023-10-26 14:21 ` [PATCH v3 5/5] net/ena: update ena version to 2.8.0 shaibran
2023-10-27 16:33 ` [PATCH v3 0/5] net/ena: v2.8.0 driver release 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=20231026142135.19967-4-shaibran@amazon.com \
    --to=shaibran@amazon.com \
    --cc=amitbern@amazon.com \
    --cc=atrwajee@amazon.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=rbeider@amazon.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).