Commit fe96220
RDMA/hns: Fix wrong WQE data when QP wraps around
When QP wraps around, WQE data from the previous use at the same
position still remains as driver does not clear it. The WQE field
layout differs across different opcodes, causing that the fields
that are not explicitly assigned for the current opcode retain
stale values, and are issued to HW by mistake. Such fields are as
follows:
* MSG_START_SGE_IDX field in ATOMIC WQE
* BLOCK_SIZE and ZBVA fields in FRMR WQE
* DirectWQE fields when DirectWQE not used
For ATOMIC WQE, always set the latest sge index in MSG_START_SGE_IDX
as required by HW.
For FRMR WQE and DirectWQE, clear only those unassigned fields
instead of the entire WQE to avoid performance penalty.
Fixes: 68a997c ("RDMA/hns: Add FRMR support for hip08")
Signed-off-by: Junxian Huang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>1 parent f5a7cbe commit fe96220
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
| |||
339 | 341 | | |
340 | 342 | | |
341 | 343 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | 344 | | |
346 | 345 | | |
347 | 346 | | |
| |||
586 | 585 | | |
587 | 586 | | |
588 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
589 | 591 | | |
590 | 592 | | |
591 | 593 | | |
| |||
734 | 736 | | |
735 | 737 | | |
736 | 738 | | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
737 | 742 | | |
738 | 743 | | |
739 | 744 | | |
| |||
0 commit comments