Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: Bernard Metzler <BMT@zurich.ibm.com>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>,
	"leon@kernel.org" <leon@kernel.org>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH V2 3/3] RDMA/siw: Call llist_reverse_order in siw_run_sq
Date: Mon, 21 Aug 2023 21:23:52 +0800	[thread overview]
Message-ID: <b14d64e6-5972-c0eb-36a5-a35cbd004b9a@linux.dev> (raw)
In-Reply-To: <SN7PR15MB575541C91E91623AC6D70B3A991EA@SN7PR15MB5755.namprd15.prod.outlook.com>



On 8/21/23 20:00, Bernard Metzler wrote:
>
>> -----Original Message-----
>> From: Guoqing Jiang <guoqing.jiang@linux.dev>
>> Sent: Monday, 21 August 2023 10:48
>> To: Bernard Metzler <BMT@zurich.ibm.com>; jgg@ziepe.ca; leon@kernel.org
>> Cc: linux-rdma@vger.kernel.org
>> Subject: [EXTERNAL] [PATCH V2 3/3] RDMA/siw: Call llist_reverse_order in
>> siw_run_sq
>>
>> We can call the function to get fifo list.
>>
>> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
>> ---
>>   drivers/infiniband/sw/siw/siw_qp_tx.c | 12 +-----------
>>   1 file changed, 1 insertion(+), 11 deletions(-)
>>
>> diff --git a/drivers/infiniband/sw/siw/siw_qp_tx.c
>> b/drivers/infiniband/sw/siw/siw_qp_tx.c
>> index 4b292e0504f1..eb3d438828e2 100644
>> --- a/drivers/infiniband/sw/siw/siw_qp_tx.c
>> +++ b/drivers/infiniband/sw/siw/siw_qp_tx.c
>> @@ -1229,17 +1229,7 @@ int siw_run_sq(void *data)
>>   			break;
>>
>>   		active = llist_del_all(&tx_task->active);
>> -		/*
>> -		 * llist_del_all returns a list with newest entry first.
>> -		 * Re-order list for fairness among QP's.
>> -		 */
>> -		while (active) {
>> -			struct llist_node *tmp = active;
>> -
>> -			active = llist_next(active);
>> -			tmp->next = fifo_list;
>> -			fifo_list = tmp;
>> -		}
>> +		fifo_list = llist_reverse_order(active);
>>   		while (fifo_list) {
>>   			qp = container_of(fifo_list, struct siw_qp, tx_list);
>>   			fifo_list = llist_next(fifo_list);
>> --
>> 2.35.3
> Oh yes, that function already exists. Many thanks!
> I'd keep the comment, since it might be not obvious why we
> reverse the list.

Ok, will add them back.

> Acked-by: Bernard Metzler <bmt@zurich.ibm.com>

Appreciate for your review!

Thanks,
Guoqing

      reply	other threads:[~2023-08-21 13:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21  8:47 [PATCH V2 0/3] Misc changes for siw Guoqing Jiang
2023-08-21  8:47 ` [PATCH V2 1/3] RDMA/siw: Balance the reference of cep->kref in the error path Guoqing Jiang
2023-08-21 12:06   ` Bernard Metzler
2023-08-21  8:47 ` [PATCH V2 2/3] RDMA/siw: Correct wrong debug message Guoqing Jiang
2023-08-21 11:57   ` Bernard Metzler
2023-08-21  8:47 ` [PATCH V2 3/3] RDMA/siw: Call llist_reverse_order in siw_run_sq Guoqing Jiang
2023-08-21 12:00   ` Bernard Metzler
2023-08-21 13:23     ` Guoqing Jiang [this message]

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=b14d64e6-5972-c0eb-36a5-a35cbd004b9a@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=BMT@zurich.ibm.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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