git: e3f4a63af63b - main - ena: Report RX overrun errors
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Apr 2026 21:15:09 UTC
The branch main has been updated by akiyano:
URL: https://cgit.FreeBSD.org/src/commit/?id=e3f4a63af63bea70bc86b6c790b14aa5ee99fcd0
commit e3f4a63af63bea70bc86b6c790b14aa5ee99fcd0
Author: David Arinzon <darinzon@amazon.com>
AuthorDate: 2026-04-15 12:13:56 +0000
Commit: Arthur Kiyanovski <akiyano@FreeBSD.org>
CommitDate: 2026-04-27 21:13:53 +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
---
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 6972c71bd67c..4f45d9103d76 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",