]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[ena] Specify the unused completion queue MSI-X vector as 0xffffffff
authorMichael Brown <mcb30@ipxe.org>
Fri, 26 Aug 2022 12:15:07 +0000 (13:15 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 26 Aug 2022 18:38:27 +0000 (19:38 +0100)
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>
src/drivers/net/ena.c
src/drivers/net/ena.h

index 46351dd7da8757ac2f607d90f9b3b4b304ecb2fc..bad0238fe1c5880af836711e8073fe5052fbd3b1 100644 (file)
@@ -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 */
index c7659873076c9232f815599009e64276ed375d09..78693e678d0d1ce30cd7b5a8c4642ec179c2f81c 100644 (file)
@@ -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 */