[roce-0114]RDMA/hns: Correct the value of srq_desc_size

Bug #1859596 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]
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

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

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.

tags: removed: ikeradar
Changed in kunpeng920:
status: New → Fix Committed
Revision history for this message
Ike Panhc (ikepanhc) wrote :

In HWE 5.3 kernel already.

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.