Skip to contentSkip to conversation

update ENA driver to version 1.5.0

PATCH In review [email protected] 2 participants 4 messages Dec 28, 2017 – Jan 2, 2018

Subsystems (3)
lore
Share & tools
lore
#2 lore raw

PATCH 2/2 net: ena: increase ena driver version to 1.5.0

In reply to [email protected]

From: Netanel Belgazal <[email protected]>

---
 drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/amazon/ena/ena_netdev.h +1 -1
index 734ff2e84494..f1972b5ab650 100644
@@ -44,7 +44,7 @@
 #include "ena_eth_com.h"
 
 #define DRV_MODULE_VER_MAJOR	1
-#define DRV_MODULE_VER_MINOR	3
+#define DRV_MODULE_VER_MINOR	5
 #define DRV_MODULE_VER_SUBMINOR 0
 
 #define DRV_MODULE_NAME		"ena"
Signature · 1 line
2.7.3.AMZN
#1 lore raw

PATCH 1/2 net: ena: add detection and recovery mechanism for handling missed/misrouted MSI-X

In reply to [email protected]

From: Netanel Belgazal <[email protected]>

A mechanism for detection of stuck Rx/Tx rings due to missed or misrouted interrupts.
Check if there are unhandled completion descriptors before the first MSI-X interrupt arrived.
The check is per queue and per interrupt vector.
Once such condition is detected, driver and device reset is scheduled.

---
 drivers/net/ethernet/amazon/ena/ena_eth_com.c   | 12 +++++
 drivers/net/ethernet/amazon/ena/ena_eth_com.h   |  2 +
 drivers/net/ethernet/amazon/ena/ena_netdev.c    | 68 ++++++++++++++++++++++---
 drivers/net/ethernet/amazon/ena/ena_netdev.h    |  4 ++
 drivers/net/ethernet/amazon/ena/ena_regs_defs.h |  2 +
 5 files changed, 81 insertions(+), 7 deletions(-)
drivers/net/ethernet/amazon/ena/ena_eth_com.c +12 -0
index b11e573ad57a..04ed2b57ff20 100644
@@ -504,3 +504,15 @@ int ena_com_tx_comp_req_id_get(struct ena_com_io_cq *io_cq, u16 *req_id)
 
 	return 0;
 }
+
+bool ena_com_cq_empty(struct ena_com_io_cq *io_cq)
+{
+	struct ena_eth_io_rx_cdesc_base *cdesc;
+
+	cdesc = ena_com_get_next_rx_cdesc(io_cq);
+	if (cdesc)
+		return false;
+	else
+		return true;
+}
+
drivers/net/ethernet/amazon/ena/ena_eth_com.h +2 -0
index bb53c3a4f8e9..2f7657227cfe 100644
@@ -88,6 +88,8 @@ int ena_com_add_single_rx_desc(struct ena_com_io_sq *io_sq,
 
 int ena_com_tx_comp_req_id_get(struct ena_com_io_cq *io_cq, u16 *req_id);
 
+bool ena_com_cq_empty(struct ena_com_io_cq *io_cq);
+
 static inline void ena_com_unmask_intr(struct ena_com_io_cq *io_cq,
 				       struct ena_eth_io_intr_reg *intr_reg)
 {
drivers/net/ethernet/amazon/ena/ena_netdev.c +61 -7

113 lines not on this page · raw message

drivers/net/ethernet/amazon/ena/ena_netdev.h +4 -0
index 3bbc003871de..734ff2e84494 100644
@@ -122,6 +122,7 @@
  * We wait for 6 sec just to be on the safe side.
  */
 #define ENA_DEVICE_KALIVE_TIMEOUT	(6 * HZ)
+#define ENA_MAX_NO_INTERRUPT_ITERATIONS 3
 
 #define ENA_MMIO_DISABLE_REG_READ	BIT(0)
 
@@ -236,6 +237,9 @@ struct ena_ring {
 	/* The maximum header length the device can handle */
 	u8 tx_max_header_size;
 
+	bool first_interrupt;
+	u16 no_interrupt_event_cnt;
+
 	/* cpu for TPH */
 	int cpu;
 	 /* number of tx/rx_buffer_info's entries */
drivers/net/ethernet/amazon/ena/ena_regs_defs.h +2 -0
index 9aec43c5bba8..48ca97fbe7bc 100644
@@ -60,6 +60,8 @@ enum ena_regs_reset_reason_types {
 	ENA_REGS_RESET_USER_TRIGGER		= 12,
 
 	ENA_REGS_RESET_GENERIC			= 13,
+
+	ENA_REGS_RESET_MISS_INTERRUPT		= 14,
 };
 
 /* ena_registers offsets */
Signature · 1 line
2.7.3.AMZN
#0 lore raw

PATCH 1/2 update ENA driver to version 1.5.0

From: Netanel Belgazal <[email protected]>

This patchset contains two changes:
* Add a robust mechanism for detection of stuck Rx/Tx rings due to missed or misrouted MSI-X
* Increase the driver version to 1.5.0

Netanel Belgazal (2):
net: ena: add detection and recovery mechanism for handling
missed/misrouted MSI-X
net: ena: increase ena driver version to 1.5.0

 drivers/net/ethernet/amazon/ena/ena_eth_com.c   | 12 +++++
 drivers/net/ethernet/amazon/ena/ena_eth_com.h   |  2 +
 drivers/net/ethernet/amazon/ena/ena_netdev.c    | 68 ++++++++++++++++++++++---
 drivers/net/ethernet/amazon/ena/ena_netdev.h    |  6 ++-
 drivers/net/ethernet/amazon/ena/ena_regs_defs.h |  2 +
 5 files changed, 82 insertions(+), 8 deletions(-)
Signature · 1 line
2.7.3.AMZN
maintainer
#3 lore raw

From: <[email protected]>
Date: Thu, 28 Dec 2017 21:31:29 +0000

Quoted 6 lines

From: Netanel Belgazal <[email protected]>

This patchset contains two changes:
* Add a robust mechanism for detection of stuck Rx/Tx rings due to missed or misrouted MSI-X
* Increase the driver version to 1.5.0

I think you meant "[PATCH net-next 0/2]" for this email :-)

Series applied, thanks.