On Thu, May 30, 2019 at 04:25:25PM +0300, Max Gurtovoy wrote: > This is a preparation for adding new signature API to the rw-API. > > Signed-off-by: Max Gurtovoy <maxg@xxxxxxxxxxxx> > Signed-off-by: Israel Rukshin <israelr@xxxxxxxxxxxx> Wouldn't it be better to have a qp_flags field with a bit set, as that is more extensible? > diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c > index fc55482f51d6..936498c3f9cb 100644 > --- a/drivers/infiniband/core/verbs.c > +++ b/drivers/infiniband/core/verbs.c > @@ -1233,6 +1233,8 @@ struct ib_qp *ib_create_qp_user(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; Don't we need a check if IB_QP_CREATE_SIGNATURE_EN is supported at all?