Commit abbb9e1d authored by Ke Chen's avatar Ke Chen Committed by Wang Wensheng
Browse files

RDMA/hns: Pass mac type to user driver for ROH mode

driver inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5WKYW



-----------------------------------------------------------------------

The user mode driver needs to use the mac type to sense whether
it is in ROH mode, so it is necessary to add the mac type to
the user mode driver.

Signed-off-by: default avatarGuofeng Yue <yueguofeng@hisilicon.com>
Signed-off-by: default avatarKe Chen <chenke54@huawei.com>
Reviewed-by: default avatarYangyang Li <liyangyang20@huawei.com>
parent ac388b8e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -425,6 +425,7 @@ static int hns_roce_alloc_ucontext(struct ib_ucontext *uctx,
	}

	resp.cqe_size = hr_dev->caps.cqe_sz;
	resp.mac_type = hr_dev->mac_type;

	ret = ib_copy_to_udata(udata, &resp,
			       min(udata->outlen, sizeof(resp)));
+2 −0
Original line number Diff line number Diff line
@@ -116,6 +116,8 @@ struct hns_roce_ib_alloc_ucontext_resp {
	__u32   reserved;
	__u32	config;
	__u32	max_inline_data;
	__u8	mac_type;
	__u8	rsv1[7];
};

struct hns_roce_ib_alloc_ucontext {