[v3,3/5] net/ena: report Rx overrun errors in xstats
Checks
Commit Message
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(+)
@@ -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.**
@@ -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;
}
/**
@@ -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 {