Message ID | 20231129032418.26705-5-guoqing.jiang@linux.dev (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Misc changes for siw | expand |
> -----Original Message----- > From: Guoqing Jiang <guoqing.jiang@linux.dev> > Sent: Wednesday, November 29, 2023 4:24 AM > To: Bernard Metzler <BMT@zurich.ibm.com>; jgg@ziepe.ca; leon@kernel.org > Cc: linux-rdma@vger.kernel.org; guoqing.jiang@linux.dev > Subject: [EXTERNAL] [PATCH 4/4] RDMA/siw: Call orq_get_current if possible > > We can call it in siw_orq_empty. > > Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev> > --- > drivers/infiniband/sw/siw/siw.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/sw/siw/siw.h > b/drivers/infiniband/sw/siw/siw.h > index 2edba2a864bb..75253f2b3e3d 100644 > --- a/drivers/infiniband/sw/siw/siw.h > +++ b/drivers/infiniband/sw/siw/siw.h > @@ -657,7 +657,7 @@ static inline struct siw_sqe *orq_get_free(struct > siw_qp *qp) > > static inline int siw_orq_empty(struct siw_qp *qp) > { > - return qp->orq[qp->orq_get % qp->attrs.orq_size].flags == 0 ? 1 : 0; > + return orq_get_current(qp)->flags == 0 ? 1 : 0; > } > > static inline struct siw_sqe *irq_alloc_free(struct siw_qp *qp) > -- > 2.35.3 Please change the commit message. Something like 'Use orq_get_current() in siw_orq_empty()'. Otherwise looks good! Acked-by: Bernard Metzler <bmt@zurich.ibm.com>
On 12/1/23 23:47, Bernard Metzler wrote: > >> -----Original Message----- >> From: Guoqing Jiang <guoqing.jiang@linux.dev> >> Sent: Wednesday, November 29, 2023 4:24 AM >> To: Bernard Metzler <BMT@zurich.ibm.com>; jgg@ziepe.ca; leon@kernel.org >> Cc: linux-rdma@vger.kernel.org; guoqing.jiang@linux.dev >> Subject: [EXTERNAL] [PATCH 4/4] RDMA/siw: Call orq_get_current if possible >> >> We can call it in siw_orq_empty. >> >> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev> >> --- >> drivers/infiniband/sw/siw/siw.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/infiniband/sw/siw/siw.h >> b/drivers/infiniband/sw/siw/siw.h >> index 2edba2a864bb..75253f2b3e3d 100644 >> --- a/drivers/infiniband/sw/siw/siw.h >> +++ b/drivers/infiniband/sw/siw/siw.h >> @@ -657,7 +657,7 @@ static inline struct siw_sqe *orq_get_free(struct >> siw_qp *qp) >> >> static inline int siw_orq_empty(struct siw_qp *qp) >> { >> - return qp->orq[qp->orq_get % qp->attrs.orq_size].flags == 0 ? 1 : 0; >> + return orq_get_current(qp)->flags == 0 ? 1 : 0; >> } >> >> static inline struct siw_sqe *irq_alloc_free(struct siw_qp *qp) >> -- >> 2.35.3 > Please change the commit message. Something like > 'Use orq_get_current() in siw_orq_empty()'. Ok, will do. > Otherwise looks good! > > Acked-by: Bernard Metzler <bmt@zurich.ibm.com> Thanks for your review! Guoqing
diff --git a/drivers/infiniband/sw/siw/siw.h b/drivers/infiniband/sw/siw/siw.h index 2edba2a864bb..75253f2b3e3d 100644 --- a/drivers/infiniband/sw/siw/siw.h +++ b/drivers/infiniband/sw/siw/siw.h @@ -657,7 +657,7 @@ static inline struct siw_sqe *orq_get_free(struct siw_qp *qp) static inline int siw_orq_empty(struct siw_qp *qp) { - return qp->orq[qp->orq_get % qp->attrs.orq_size].flags == 0 ? 1 : 0; + return orq_get_current(qp)->flags == 0 ? 1 : 0; } static inline struct siw_sqe *irq_alloc_free(struct siw_qp *qp)
We can call it in siw_orq_empty. Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev> --- drivers/infiniband/sw/siw/siw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)