From: Shai Brandes <shaibran@amazon.com>
To: <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, Shai Brandes <shaibran@amazon.com>
Subject: [PATCH v2 04/20] net/ena/base: add lost interrupt indication
Date: Wed, 15 Oct 2025 15:03:59 +0300 [thread overview]
Message-ID: <20251015120415.2204-5-shaibran@amazon.com> (raw)
In-Reply-To: <20251015120415.2204-1-shaibran@amazon.com>
Add infrastructure for the driver to pass indication via
unmask register to support interrupt lost heuristic.
Signed-off-by: Shai Brandes <shaibran@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
Reviewed-by: Yosef Raisman <yraisman@amazon.com>
---
drivers/net/ena/base/ena_com.h | 9 ++++++---
drivers/net/ena/ena_ethdev.c | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ena/base/ena_com.h b/drivers/net/ena/base/ena_com.h
index 180fa8966e..7f9a9c1522 100644
--- a/drivers/net/ena/base/ena_com.h
+++ b/drivers/net/ena/base/ena_com.h
@@ -1196,6 +1196,8 @@ static inline int ena_com_get_customer_metric_count(struct ena_com_dev *ena_dev)
* @unmask: unmask enable/disable
* @no_moderation_update: 0 - Indicates that any of the TX/RX intervals was
* updated, 1 - otherwise
+ * @lost_interrupt: true - if driver heuristic indicates interrupt was lost
+ * false - otherwise
*
* Prepare interrupt update register with the supplied parameters.
*/
@@ -1203,7 +1205,8 @@ static inline void ena_com_update_intr_reg(struct ena_eth_io_intr_reg *intr_reg,
u32 rx_delay_interval,
u32 tx_delay_interval,
bool unmask,
- bool no_moderation_update)
+ bool no_moderation_update,
+ bool lost_interrupt)
{
intr_reg->intr_control = 0;
intr_reg->intr_control |= rx_delay_interval &
@@ -1214,11 +1217,11 @@ static inline void ena_com_update_intr_reg(struct ena_eth_io_intr_reg *intr_reg,
ENA_ETH_IO_INTR_REG_TX_INTR_DELAY_MASK,
ENA_ETH_IO_INTR_REG_TX_INTR_DELAY_SHIFT);
- if (unmask)
+ if (likely(unmask && !lost_interrupt))
intr_reg->intr_control |= ENA_ETH_IO_INTR_REG_INTR_UNMASK_MASK;
intr_reg->intr_control |=
- ENA_FIELD_PREP(((u32)no_moderation_update),
+ ENA_FIELD_PREP(((u32)(no_moderation_update && !lost_interrupt)),
ENA_ETH_IO_INTR_REG_NO_MODERATION_UPDATE_MASK,
ENA_ETH_IO_INTR_REG_NO_MODERATION_UPDATE_SHIFT);
}
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index b2d61c881b..656e25fbac 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -3939,7 +3939,7 @@ static void ena_rx_queue_intr_set(struct rte_eth_dev *dev,
struct ena_ring *rxq = &adapter->rx_ring[queue_id];
struct ena_eth_io_intr_reg intr_reg;
- ena_com_update_intr_reg(&intr_reg, 0, 0, unmask, 1);
+ ena_com_update_intr_reg(&intr_reg, 0, 0, unmask, 1, 0);
ena_com_unmask_intr(rxq->ena_com_io_cq, &intr_reg);
}
--
2.17.1
next prev parent reply other threads:[~2025-10-15 12:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 12:03 [PATCH v2 00/20] net/ena: Release 2.14.0 Shai Brandes
2025-10-15 12:03 ` [PATCH v2 01/20] net/ena/base: optimize Tx desc fields setting Shai Brandes
2025-10-15 12:03 ` [PATCH v2 02/20] net/ena/base: add extended Tx cdesc support Shai Brandes
2025-10-15 12:03 ` [PATCH v2 03/20] net/ena/base: add IO ring helper functions Shai Brandes
2025-10-15 12:03 ` Shai Brandes [this message]
2025-10-21 5:25 ` [PATCH v2 00/20] net/ena: Release 2.14.0 Stephen Hemminger
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=20251015120415.2204-5-shaibran@amazon.com \
--to=shaibran@amazon.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.