mirror of https://gitee.com/openkylin/linux.git
Merge branch 'k.o/for-4.13-rc' into k.o/for-next
Pick up -rc fixes. Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
commit
732912c738
|
@ -1550,6 +1550,7 @@ static int create_qp(struct ib_uverbs_file *file,
|
|||
qp->qp_type = attr.qp_type;
|
||||
atomic_set(&qp->usecnt, 0);
|
||||
atomic_inc(&pd->usecnt);
|
||||
qp->port = 0;
|
||||
if (attr.send_cq)
|
||||
atomic_inc(&attr.send_cq->usecnt);
|
||||
if (attr.recv_cq)
|
||||
|
@ -1991,6 +1992,7 @@ static int modify_qp(struct ib_uverbs_file *file,
|
|||
attr->alt_timeout = cmd->base.alt_timeout;
|
||||
attr->rate_limit = cmd->rate_limit;
|
||||
|
||||
if (cmd->base.attr_mask & IB_QP_AV)
|
||||
attr->ah_attr.type = rdma_ah_find_type(qp->device,
|
||||
cmd->base.dest.port_num);
|
||||
if (cmd->base.dest.is_global) {
|
||||
|
@ -2011,8 +2013,9 @@ static int modify_qp(struct ib_uverbs_file *file,
|
|||
cmd->base.dest.port_num);
|
||||
rdma_ah_set_make_grd(&attr->ah_attr, false);
|
||||
|
||||
attr->alt_ah_attr.type = rdma_ah_find_type(qp->device,
|
||||
cmd->base.dest.port_num);
|
||||
if (cmd->base.attr_mask & IB_QP_ALT_PATH)
|
||||
attr->alt_ah_attr.type =
|
||||
rdma_ah_find_type(qp->device, cmd->base.dest.port_num);
|
||||
if (cmd->base.alt_dest.is_global) {
|
||||
rdma_ah_set_grh(&attr->alt_ah_attr, NULL,
|
||||
cmd->base.alt_dest.flow_label,
|
||||
|
|
|
@ -838,6 +838,7 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
|
|||
spin_lock_init(&qp->mr_lock);
|
||||
INIT_LIST_HEAD(&qp->rdma_mrs);
|
||||
INIT_LIST_HEAD(&qp->sig_mrs);
|
||||
qp->port = 0;
|
||||
|
||||
if (qp_init_attr->qp_type == IB_QPT_XRC_TGT)
|
||||
return ib_create_xrc_qp(qp, qp_init_attr);
|
||||
|
@ -1309,7 +1310,11 @@ int ib_modify_qp_with_udata(struct ib_qp *qp, struct ib_qp_attr *attr,
|
|||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
return ib_security_modify_qp(qp, attr, attr_mask, udata);
|
||||
ret = ib_security_modify_qp(qp, attr, attr_mask, udata);
|
||||
if (!ret && (attr_mask & IB_QP_PORT))
|
||||
qp->port = attr->port_num;
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(ib_modify_qp_with_udata);
|
||||
|
||||
|
|
|
@ -1122,6 +1122,12 @@ static int mlx5_ib_modify_port(struct ib_device *ibdev, u8 port, int mask,
|
|||
bool is_ib = (mlx5_ib_port_link_layer(ibdev, port) ==
|
||||
IB_LINK_LAYER_INFINIBAND);
|
||||
|
||||
/* CM layer calls ib_modify_port() regardless of the link layer. For
|
||||
* Ethernet ports, qkey violation and Port capabilities are meaningless.
|
||||
*/
|
||||
if (!is_ib)
|
||||
return 0;
|
||||
|
||||
if (MLX5_CAP_GEN(dev->mdev, ib_virt) && is_ib) {
|
||||
change_mask = props->clr_port_cap_mask | props->set_port_cap_mask;
|
||||
value = ~props->clr_port_cap_mask | props->set_port_cap_mask;
|
||||
|
|
|
@ -1253,6 +1253,7 @@ static int create_raw_packet_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
|
|||
goto err_destroy_tis;
|
||||
|
||||
sq->base.container_mibqp = qp;
|
||||
sq->base.mqp.event = mlx5_ib_qp_event;
|
||||
}
|
||||
|
||||
if (qp->rq.wqe_cnt) {
|
||||
|
|
|
@ -1696,6 +1696,7 @@ struct ib_qp {
|
|||
enum ib_qp_type qp_type;
|
||||
struct ib_rwq_ind_table *rwq_ind_tbl;
|
||||
struct ib_qp_security *qp_sec;
|
||||
u8 port;
|
||||
};
|
||||
|
||||
struct ib_mr {
|
||||
|
|
Loading…
Reference in New Issue