iwch_create_cq off by one error
Steve Wise
Acked-byQuoted 26 lines · Jon Mason
The cxbg3 driver is unnecessarily decreasing the number of cq entries by one when creating a cq. This will cause an error of not having as many cqs as requested by the user, if the user requests a power of 2 cq length.
Thanks,
JonSigned-off-by Jon Mason <[email protected]>--- drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/infiniband/hw/cxgb3/iwch_provider.c +1
-1@@ -188,7 +188,7 @@ static struct ib_cq *iwch_create_cq(struct ib_device *ibdev, int entries, int vereturn ERR_PTR (-ENOMEM ); } chp->rhp = rhp; - chp->ibcq.cqe = (1 << chp->cq.size_log2) -1 ; + chp->ibcq.cqe =1 << chp->cq.size_log2;spin_lock_init (&chp->lock);atomic_set (&chp->refcnt,1 );init_waitqueue_head (&chp->wait);
Steve Wise
Acked-byRe: [PATCH] update max_inline_data when creating a qp
In reply to a message not in the archiveQuoted 28 lines · Jon Mason
mthca modifies the attributes passed in when creating the qp to have (amongst other things) the
max_inline_data. While cxgb3 does modify the attributes of some of the parameters, it does not modify themax_inline_datato be what the adapter supports. cxgb should conform to the same behavior as mthca (as some user space programs are expecting this) and return themax_inline_data.Signed-off-by Jon Mason <[email protected]>--- drivers/infiniband/hw/cxgb3/iwch_provider.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)drivers/infiniband/hw/cxgb3/iwch_provider.c +3
-0@@ -818,8 +818,11 @@ static struct ib_qp *iwch_create_qp(struct ib_pd *pd,kfree (qhp);return ERR_PTR (-ENOMEM ); } + attrs->cap.max_recv_wr = rqsize -1 ; attrs->cap.max_send_wr = sqsize; + attrs->cap.max_inline_data =T3_MAX_INLINE ; + qhp->rhp = rhp; qhp->attr.pd = php->pdid; qhp->attr.scq = ((struct iwch_cq *) attrs->send_cq)->cq.cqid;
Roland Dreier
AppliedRe: [ofa-general] Re: [PATCH] update max_inline_data when creating a qp
thanks, applied
Hey Roland,
Are you going to pull this one in?
Thanks,
Steve.
Quoted 38 lines · Steve Wise
Acked-by Steve Wise <[email protected]>Quoted 22 lines · Jon Mason
The cxbg3 driver is unnecessarily decreasing the number of cq entries by one when creating a cq. This will cause an error of not having as many cqs as requested by the user, if the user requests a power of 2 cq length.
Thanks,
JonSigned-off-by Jon Mason <[email protected]>--- drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/infiniband/hw/cxgb3/iwch_provider.c +0
-0@@ -188,7 +188,7 @@ static struct ib_cq *iwch_create_cq(struct
ib_device*ibdev, int entries, int vereturn ERR_PTR(-ENOMEM); } chp->rhp = rhp;drivers/infiniband/hw/cxgb3/iwch_provider.c
Quoted 5 lines
drivers/infiniband/hw/cxgb3/iwch_provider.c +1
-1- chp->ibcq.cqe = (1 << chp->cq.size_log2) -1 ; + chp->ibcq.cqe =1 << chp->cq.size_log2;spin_lock_init (&chp->lock);atomic_set (&chp->refcnt,1 );init_waitqueue_head (&chp->wait);_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/generalTo unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
Quoted 1 line
Are you going to pull this one in?
Yeah... I'm on vacation for the week but I'll get it next week.
Roland Dreier
Appliedthanks, applied.