git: 3394b3acbd70 - stable/15 - ena: Report RX overrun errors
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 30 Apr 2026 17:47:45 UTC
The branch stable/15 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=3394b3acbd70b6ebc7a6c725e96c1e9efb0b0e0c
commit 3394b3acbd70b6ebc7a6c725e96c1e9efb0b0e0c
Author: David Arinzon <darinzon@amazon.com>
AuthorDate: 2026-04-15 12:13:56 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2026-04-30 17:47:07 +0000
ena: Report RX overrun errors
Extract rx_overruns from the keep alive descriptor reported by
the device and expose it via sysctl hw stats.
RX overrun errors occur when a packet arrives but there are not
enough free buffers in the RX ring to receive it.
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Differential Revision: https://reviews.freebsd.org/D56640
(cherry picked from commit e3f4a63af63bea70bc86b6c790b14aa5ee99fcd0)
---
sys/dev/ena/ena.c | 4 ++++
sys/dev/ena/ena.h | 2 ++
sys/dev/ena/ena_sysctl.c | 2 ++
3 files changed, 8 insertions(+)
diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c
index eddb7dbd42e8..b91fade61cec 100644
--- a/sys/dev/ena/ena.c
+++ b/sys/dev/ena/ena.c
@@ -3090,15 +3090,19 @@ ena_keep_alive_wd(void *adapter_data, struct ena_admin_aenq_entry *aenq_e)
sbintime_t stime;
uint64_t rx_drops;
uint64_t tx_drops;
+ uint64_t rx_overruns;
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;
counter_u64_zero(adapter->hw_stats.rx_drops);
counter_u64_add(adapter->hw_stats.rx_drops, rx_drops);
counter_u64_zero(adapter->hw_stats.tx_drops);
counter_u64_add(adapter->hw_stats.tx_drops, tx_drops);
+ counter_u64_zero(adapter->hw_stats.rx_overruns);
+ counter_u64_add(adapter->hw_stats.rx_overruns, rx_overruns);
stime = getsbinuptime();
atomic_store_rel_64(&adapter->keep_alive_timestamp, stime);
diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h
index b2156437f847..8b5bcdc3214f 100644
--- a/sys/dev/ena/ena.h
+++ b/sys/dev/ena/ena.h
@@ -417,6 +417,8 @@ struct ena_hw_stats {
counter_u64_t rx_drops;
counter_u64_t tx_drops;
+
+ counter_u64_t rx_overruns;
};
/* Board specific private data structure */
diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c
index 38e52f9066cc..a46119e06adf 100644
--- a/sys/dev/ena/ena_sysctl.c
+++ b/sys/dev/ena/ena_sysctl.c
@@ -419,6 +419,8 @@ ena_sysctl_add_stats(struct ena_adapter *adapter)
&hw_stats->rx_drops, "Receive packet drops");
SYSCTL_ADD_COUNTER_U64(ctx, hw_list, OID_AUTO, "tx_drops", CTLFLAG_RD,
&hw_stats->tx_drops, "Transmit packet drops");
+ SYSCTL_ADD_COUNTER_U64(ctx, hw_list, OID_AUTO, "rx_overruns", CTLFLAG_RD,
+ &hw_stats->rx_overruns, "Receive overruns");
/* ENA Admin queue stats */
admin_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "admin_stats",