You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
issue: 4392235 Fixing corruption on full SQ completion
We tracked the index of last cmpleted WQE, then on each CQE we iterate from the CQE index back until we reach last completed WQE.
However, since this WQE is considered free more than one WQE can be written in its space especially when we fill SQ to maximum.
Consider the following state:
| WQE3 | last_signalled (4 wqebb) | WQE1 | WQE2 |
Now since last_signalled space is considered free we may add more WQE, for instance,
| WQE3 | WQE4 (2wqebb, last_signalled_ptr) | WQE5 (1 wqebb) | WQE6 (1 wqebb) | WQE1 | WQE2 |
Now if we get completion for WQE6, we would complete untill last_signalled (WQE6 and WQE5), leaking the completions for WQE1,2,3,4.
This results in credits and resource leakage.
To resolve this issue, we replace the last_signalled with last_to_complete and keep the size of wqe in wqebbs per each sq-prop.
last_to_complete always points to the left most uncompleted wqe. Given the example above, last_to_complete will point to WQE1.
After completion loop last_to_complete will point to the next WQE index to be completed being it already psted or not.
Given | WQE1 (last_to_complete) | WQE2 | WQE3 |, on CQE for WQE3, we complete WQE3,WQE2,WQE1 and move last_to_complete to WQE4.
We can do this since we know the size of each WQE in wqebbs.
Removing unused reset_inflight_zc_buffers_ctx.
Signed-off-by: Alexander Grissik <[email protected]>
0 commit comments