[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>
This commit is contained in:
Michael Brown
2022-08-26 19:37:54 +01:00
parent c5af41a6f5
commit 856ffe000e
2 changed files with 11 additions and 4 deletions
+2
View File
@@ -496,6 +496,8 @@ struct ena_sq {
uint8_t direction;
/** Number of entries */
uint8_t count;
/** Fill level (limited to completion queue size) */
uint8_t fill;
};
/**