]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[ena] Limit submission queue fill level to completion queue size
authorMichael Brown <mcb30@ipxe.org>
Fri, 26 Aug 2022 13:13:52 +0000 (14:13 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 26 Aug 2022 18:37:54 +0000 (19:37 +0100)
commit856ffe000e79a1af24ea11301447dd70b8d54ac2
tree7d8f0ed41689425803f0c19eed5207de1d32e6b0
parentc5af41a6f5b5f4a420b3e539f9e3a8dc9f8dd03e
[ena] Limit submission queue fill level to completion queue size

The CREATE_CQ command is permitted to return a size smaller than
requested, which could leave us in a situation where the completion
queue could overflow.

Avoid overflow by limiting the submission queue fill level to the
actual size of the completion queue.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/ena.c
src/drivers/net/ena.h