Commit 6f3b60e0 authored by Junxian Huang's avatar Junxian Huang Committed by Juan Zhou
Browse files

RDMA/hns: Response dmac to userspace

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8HZ7W



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

While creating AH, dmac is already resolved in kernel. Response dmac
to userspace so that userspace doesn't need to resolve dmac repeatly.

Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
parent 431c875e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ int hns_roce_create_ah(struct ib_ah *ibah, struct rdma_ah_init_attr *init_attr,
	if (udata) {
		resp.priority = ah->av.sl;
		resp.tc_mode = tc_mode;
		memcpy(resp.dmac, ah_attr->roce.dmac, ETH_ALEN);
		ret = ib_copy_to_udata(udata, &resp,
				       min(udata->outlen, sizeof(resp)));
	}
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ struct hns_roce_ib_create_qp_resp {
struct hns_roce_ib_create_ah_resp {
	__u8    priority;
	__u8    tc_mode;
	__u8    reserved[6];
	__u8    dmac[6];
};

struct hns_roce_ib_modify_qp_resp {