Skip to contentSkip to conversation

net/ena/base: add lost interrupt indication

PATCH Superseded Shai Brandes 1 participant 1 message Oct 15, 2025 Network drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 5/21 net/ena/base: add lost interrupt indication

Add infrastructure for the driver to pass indication via unmask register to support interrupt lost heuristic.

---
 drivers/net/ena/base/ena_com.h | 9 ++++++---
 drivers/net/ena/ena_ethdev.c   | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/net/ena/base/ena_com.h +6 -3
index 38892ac7e1..82306aaa9c 100644
@@ -1197,6 +1197,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.
  */
@@ -1204,7 +1206,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 &
@@ -1215,11 +1218,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);
 }
drivers/net/ena/ena_ethdev.c +1 -1
index b2d61c881b..656e25fbac 100644
@@ -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);
 }
 
Signature · 1 line
2.17.1