[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:
@@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user