aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2022-08-26 13:15:07 +0100
committerMichael Brown <mcb30@ipxe.org>2022-08-26 19:38:27 +0100
commit9f81e97af5e3861ea2d0ad7b11f2c8746c2c52f9 (patch)
tree2a11461771d07e5780eb5d58204fb9dd9a823294
parent6d2cead461db7243330f3275ff9ea7ff4607c4f8 (diff)
downloadipxe-9f81e97af5e3861ea2d0ad7b11f2c8746c2c52f9.zip
ipxe-9f81e97af5e3861ea2d0ad7b11f2c8746c2c52f9.tar.gz
ipxe-9f81e97af5e3861ea2d0ad7b11f2c8746c2c52f9.tar.bz2
[ena] Specify the unused completion queue MSI-X vector as 0xffffffff
Some versions of the ENA firmware (observed on a c6i.large instance in eu-west-2) will complain if the completion queue's MSI-X vector field is left empty, even though the queue configuration specifies that interrupts are not used. Work around these firmware versions by passing in what appears to be the magic "no MSI-X vector" value in this field. Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/drivers/net/ena.c1
-rw-r--r--src/drivers/net/ena.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/drivers/net/ena.c b/src/drivers/net/ena.c
index 46351dd..bad0238 100644
--- a/src/drivers/net/ena.c
+++ b/src/drivers/net/ena.c
@@ -469,6 +469,7 @@ static int ena_create_cq ( struct ena_nic *ena, struct ena_cq *cq ) {
req->header.opcode = ENA_CREATE_CQ;
req->create_cq.size = cq->size;
req->create_cq.count = cpu_to_le16 ( cq->requested );
+ req->create_cq.vector = cpu_to_le32 ( ENA_MSIX_NONE );
req->create_cq.address = cpu_to_le64 ( virt_to_bus ( cq->cqe.raw ) );
/* Issue request */
diff --git a/src/drivers/net/ena.h b/src/drivers/net/ena.h
index c765987..78693e6 100644
--- a/src/drivers/net/ena.h
+++ b/src/drivers/net/ena.h
@@ -230,6 +230,14 @@ struct ena_create_cq_req {
uint64_t address;
} __attribute__ (( packed ));
+/** Empty MSI-X vector
+ *
+ * Some versions of the ENA firmware will complain if the completion
+ * queue's MSI-X vector field is left empty, even though the queue
+ * configuration specifies that interrupts are not used.
+ */
+#define ENA_MSIX_NONE 0xffffffffUL
+
/** Create completion queue response */
struct ena_create_cq_rsp {
/** Header */