Repository navigation
[bnxt] Bound CQ and NQ service loops - #1880
Conversation
|
Does the bnxt driver actually need this? The structure of most iPXE drivers makes it impossible for this situation to arise: each ring typically has a producer counter and a consumer counter, refills are performed outside of the polling loop, and so it is logically impossible for the polling loop to fail to terminate (because the consumer counter can never be incremented higher than the producer counter). For example: Lines 838 to 853 in cb7718c With the structure of the bnxt driver, it's not so immediately clear whether or not an infinite loop can happen, but I'd want to be convinced it's possible before adding more unnecessary complexity to the driver. |
|
Yes, I think bnxt can genuinely fail to terminate here, because it doesn't follow the usual structure: RX refill happens inside the CQ loop (bnxt_rx_process() → bnxt_post_rx_buffers() → RX doorbell), so each consumed completion immediately posts a new buffer, and the loop only exits when the valid bit is not set. |
Limit the number of entries processed per call in completion queue and notification queue service loops, so that a continuously populated queue cannot keep the driver in the service loop indefinitely. Signed-off-by: Joseph Wong <joseph.wong@broadcom.com>
Limit the number of entries processed per call in completion queue and notification queue service loops, so that a continuously populated queue cannot keep the driver in the service loop indefinitely.