@@ -1223,6 +1223,8 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
qp->max_write_sge = qp_init_attr->cap.max_send_sge;
qp->max_read_sge = min_t(u32, qp_init_attr->cap.max_send_sge,
device->attrs.max_sge_rd);
+ if (qp_init_attr->create_flags & IB_QP_CREATE_SIGNATURE_EN)
+ qp->signature_en = true;
return qp;
@@ -425,9 +425,6 @@ struct mlx5_ib_qp {
int create_type;
- /* Store signature errors */
- bool signature_en;
-
struct list_head qps_list;
struct list_head cq_recv_list;
struct list_head cq_send_list;
@@ -495,9 +495,6 @@ static int calc_sq_size(struct mlx5_ib_dev *dev, struct ib_qp_init_attr *attr,
sizeof(struct mlx5_wqe_inline_seg);
attr->cap.max_inline_data = qp->max_inline_data;
- if (attr->create_flags & IB_QP_CREATE_SIGNATURE_EN)
- qp->signature_en = true;
-
wq_size = roundup_pow_of_two(attr->cap.max_send_wr * wqe_size);
qp->sq.wqe_cnt = wq_size / MLX5_SEND_WQE_BB;
if (qp->sq.wqe_cnt > (1 << MLX5_CAP_GEN(dev->mdev, log_max_qp_sz))) {
@@ -4636,7 +4633,7 @@ static int set_pi_umr_wr(const struct ib_send_wr *send_wr,
if (unlikely(send_wr->num_sge != 0) ||
unlikely(wr->access & IB_ACCESS_REMOTE_ATOMIC) ||
- unlikely(!sig_mr->sig) || unlikely(!qp->signature_en) ||
+ unlikely(!sig_mr->sig) || unlikely(!qp->ibqp.signature_en) ||
unlikely(!sig_mr->sig->sig_status_checked))
return -EINVAL;
@@ -4685,7 +4682,7 @@ static int set_sig_umr_wr(const struct ib_send_wr *send_wr,
if (unlikely(wr->wr.num_sge != 1) ||
unlikely(wr->access_flags & IB_ACCESS_REMOTE_ATOMIC) ||
- unlikely(!sig_mr->sig) || unlikely(!qp->signature_en) ||
+ unlikely(!sig_mr->sig) || unlikely(!qp->ibqp.signature_en) ||
unlikely(!sig_mr->sig->sig_status_checked))
return -EINVAL;
@@ -1688,6 +1688,7 @@ struct ib_qp {
struct ib_qp_security *qp_sec;
u8 port;
+ bool signature_en;
/*
* Implementation details of the RDMA core, don't use in drivers:
*/