Unverified Commit 6c3da6d1 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3938 RDMA/hns: Response dmac to userspace

Merge Pull Request from: @stinft 
 
While creating AH, dmac is already resolved in kernel. Response dmac to userspace so that userspace doesn't need to resolve dmac repeatedly.
https://gitee.com/openeuler/kernel/issues/I8HZ7W 
 
Link:https://gitee.com/openeuler/kernel/pulls/3938

 

Reviewed-by: default avatarChengchang Tang <tangchengchang@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 70e70910 4a43554d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,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
@@ -106,7 +106,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 {