Commit 0fd0175
RDMA/hns: Fix 0-length sge calculation error
One RC SQ WQE can store 2 sges but UD can't, so ignore 2 valid sges of
wr.sglist for RC which have been filled in WQE before setting extended
sge. Either of RC and UD can not contain 0-length sges, so these 0-length
sges should be skipped.
Fixes: 54d6638 ("RDMA/hns: Optimize WQE buffer size calculating process")
Link: https://lore.kernel.org/r/1606558959-48510-2-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>1 parent 1d11d26 commit 0fd0175
1 file changed
+10
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
| 217 | + | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
222 | | - | |
223 | 221 | | |
224 | 222 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | 223 | | |
231 | 224 | | |
232 | | - | |
233 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
234 | 230 | | |
235 | | - | |
236 | 231 | | |
237 | 232 | | |
238 | 233 | | |
| |||
340 | 335 | | |
341 | 336 | | |
342 | 337 | | |
343 | | - | |
| 338 | + | |
| 339 | + | |
344 | 340 | | |
345 | 341 | | |
346 | 342 | | |
| |||
503 | 499 | | |
504 | 500 | | |
505 | 501 | | |
506 | | - | |
| 502 | + | |
507 | 503 | | |
508 | 504 | | |
509 | 505 | | |
| |||
0 commit comments