Commit f7c8f2e9 authored by Parav Pandit's avatar Parav Pandit Committed by Doug Ledford

IB/uverbs: Make use of ib_modify_qp variant to avoid resolving DMAC

This patch makes use of IB core's ib_modify_qp_with_udata function that
also resolves the DMAC and handles udata.
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Reviewed-by: default avatarEli Cohen <eli@mellanox.com>
Reviewed-by: default avatarDaniel Jurgens <danielj@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent a512c2fb
...@@ -2005,28 +2005,13 @@ static int modify_qp(struct ib_uverbs_file *file, ...@@ -2005,28 +2005,13 @@ static int modify_qp(struct ib_uverbs_file *file,
rdma_ah_set_port_num(&attr->alt_ah_attr, rdma_ah_set_port_num(&attr->alt_ah_attr,
cmd->base.alt_dest.port_num); cmd->base.alt_dest.port_num);
if (qp->real_qp == qp) { ret = ib_modify_qp_with_udata(qp, attr,
if (cmd->base.attr_mask & IB_QP_AV) { modify_qp_mask(qp->qp_type,
ret = ib_resolve_eth_dmac(qp->device, &attr->ah_attr); cmd->base.attr_mask),
if (ret) udata);
goto release_qp;
}
ret = ib_security_modify_qp(qp,
attr,
modify_qp_mask(qp->qp_type,
cmd->base.attr_mask),
udata);
} else {
ret = ib_security_modify_qp(qp,
attr,
modify_qp_mask(qp->qp_type,
cmd->base.attr_mask),
NULL);
}
release_qp: release_qp:
uobj_put_obj_read(qp); uobj_put_obj_read(qp);
out: out:
kfree(attr); kfree(attr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment