[roce-0114]RDMA/hns: Correct the value of srq_desc_size
Bug #1859596 reported by
Fred Kimmy
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]
srq_desc_size should be rounded up to pow of two before used, or related calculation may cause allocating wrong size of memory for srq buffer.
[Steps to Reproduce]
Use srq.
[Actual Results]
Allocate wrong size of memory for srq buffer
[Expected Results]
Allocate correct size.
[Reproducibility]
Inevitably
[Additional information]
Hardware: D06 CS
Firmware: NA
Kernel: NA
[Resolution]
Round up to power of two when calculate size of srq buffer.
411c1e6774e2 RDMA/hns: Correct the value of srq_desc_size
This patch fixes c7bcb13442e1 ("RDMA/hns: Add SRQ support for hip08 kernel mode"), which is landed in mainline kernel for v5.0. It is not necessary to cherry-pick for 4.15 based kernel.