[roce-0114]RDMA/hns: Fix wrong parameters when initial mtt of srq->idx_que

Bug #1859590 reported by Fred Kimmy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kunpeng920
Fix Released
Undecided
Unassigned
Ubuntu-18.04
Invalid
Undecided
Unassigned
Ubuntu-18.04-hwe
Fix Released
Undecided
Unassigned
Ubuntu-20.04
Fix Released
Undecided
Unassigned
Upstream-kernel
Fix Released
Undecided
Unassigned

Bug Description

[Bug Description]
The parameters npages used to initial mtt of srq->idx_que shouldn't be same with srq's. And page_shift should be calculated from idx_buf_pg_sz.

[Steps to Reproduce]
Transport using SRQ

[Actual Results]
May set wrong page shift to mtt of srq->idx_queue

[Expected Results]
Set appropriate value.

[Reproducibility]
Inevitably

[Additional information]
Hardware: D06 CS
Firmware: NA
Kernel: NA

[Resolution]
This patch fixes above issues and use field named npage and page_shift in hns_roce_buf instead of two temporary variables to let us use them anywhere.

RDMA/hns: Fix wrong parameters when initial mtt of srq->idx_que

Ike Panhc (ikepanhc)
tags: added: ikeradar
Revision history for this message
Ike Panhc (ikepanhc) wrote :

This patch fixes 18df508c7970 ("RDMA/hns: Remove if-else judgment statements for creating srq"), which landed in mainline kernel since v5.4. This is not needed for v4.15 based kernel.

tags: removed: ikeradar
Changed in kunpeng920:
status: New → Fix Committed
Ike Panhc (ikepanhc)
Changed in kunpeng920:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.