Skip to content

Commit 4303e61

Browse files
Junxian Huangjgunthorpe
authored andcommitted
RDMA/hns: Bugfix for data type of dip_idx
dip_idx is associated with qp_num whose data type is u32. However, dip_idx is incorrectly defined as u8 data in the hns_roce_dip struct, which leads to data truncation during value assignment. Fixes: f91696f ("RDMA/hns: Support congestion control type selection according to the FW") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Junxian Huang <[email protected]> Signed-off-by: Wenpeng Liang <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 9bed8a7 commit 4303e61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/hns/hns_roce_hw_v2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ struct hns_roce_v2_priv {
14411441

14421442
struct hns_roce_dip {
14431443
u8 dgid[GID_LEN_V2];
1444-
u8 dip_idx;
1444+
u32 dip_idx;
14451445
struct list_head node; /* all dips are on a list */
14461446
};
14471447

0 commit comments

Comments
 (0)