Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: error27@gmail.com, jgg@nvidia.com, zyjzyj2000@gmail.com,
	jhack@hpe.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/rxe: Fix error in rxe_task.c
Date: Tue, 4 Apr 2023 07:58:50 +0300	[thread overview]
Message-ID: <20230404045850.GE4514@unreal> (raw)
In-Reply-To: <727cd25c-7d8f-73d0-8867-836da29c54b2@gmail.com>

On Mon, Apr 03, 2023 at 03:38:13PM -0500, Bob Pearson wrote:
> On 3/29/23 14:33, Bob Pearson wrote:
> > In a previous patch TASKLET_STATE_SCHED was used as a bit but it
> > is a bit position instead. This patch corrects that error.
> > 
> > Reported-by: Dan Carpenter <error27@gmail.com>
> > Link: https://lore.kernel.org/linux-rdma/8a054b78-6d50-4bc6-8d8a-83f85fbdb82f@kili.mountain/
> > Fixes: d94671632572 ("RDMA/rxe: Rewrite rxe_task.c")
> > Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> > ---
> >  drivers/infiniband/sw/rxe/rxe_task.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c
> > index fea9a517c8d9..fb9a6bc8e620 100644
> > --- a/drivers/infiniband/sw/rxe/rxe_task.c
> > +++ b/drivers/infiniband/sw/rxe/rxe_task.c
> > @@ -21,7 +21,7 @@ static bool __reserve_if_idle(struct rxe_task *task)
> >  {
> >  	WARN_ON(rxe_read(task->qp) <= 0);
> >  
> > -	if (task->tasklet.state & TASKLET_STATE_SCHED)
> > +	if (task->tasklet.state & BIT(TASKLET_STATE_SCHED))
> >  		return false;
> >  
> >  	if (task->state == TASK_STATE_IDLE) {
> > @@ -46,7 +46,7 @@ static bool __reserve_if_idle(struct rxe_task *task)
> >   */
> >  static bool __is_done(struct rxe_task *task)
> >  {
> > -	if (task->tasklet.state & TASKLET_STATE_SCHED)
> > +	if (task->tasklet.state & BIT(TASKLET_STATE_SCHED))
> >  		return false;
> >  
> >  	if (task->state == TASK_STATE_IDLE ||
> 
> This patch fixes a bug in rxe_task.c introduced by the earlier patch (d94671632572 RDMA/rxe: Rewrite rxe_task.c)
> which is in for-next. The bug actually has minimal effects because TASKLET_STATE_SCHED is zero and in testing
> so far it doesn't seem to make a difference.
> 
> There is a second patch currently in patchworks ([for-next,v6] RDMA/rxe: Add workqueue support for tasks
> [for-next,v6] RDMA/rxe: Add workqueue support for tasks 	- - - 	--- 	2023-03-02 	Bob Pearson New)
> which is ahead of this one and replaces the tasklet implementation by work queues. This second patch replaces the
> lines lines containing the error with a workqueue specific equivalent.
> 
> There are two ways forward here. We could fix the tasklet version by applying this patch first or ignore the
> error and apply the workqueue patch first. My desire is to get rid of tasklets altogether so I prefer the
> second choice. If we choose the first choice then we need to reorder the two patches in patchworks and
> rebase the workqueue patch to match the fixed tasklet code.
> 
> Please suggest how you would like me to proceed.

I prefer to have small fix first as it is unclear when "RDMA/rxe: Add workqueue support for tasks"
will be merged.
https://lore.kernel.org/all/20230330053933.GJ831478@unreal

Thanks

> 
> Bob

  reply	other threads:[~2023-04-04  4:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 19:33 [PATCH] RDMA/rxe: Fix error in rxe_task.c Bob Pearson
2023-03-30  5:39 ` Leon Romanovsky
2023-04-03 20:38 ` Bob Pearson
2023-04-04  4:58   ` Leon Romanovsky [this message]
2023-04-04 16:36     ` Bob Pearson
2023-04-12 16:14 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230404045850.GE4514@unreal \
    --to=leon@kernel.org \
    --cc=error27@gmail.com \
    --cc=jgg@nvidia.com \
    --cc=jhack@hpe.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox