From: Wenjia Zhang <wenjia@linux.ibm.com>
To: Wen Gu <guwen@linux.alibaba.com>,
kgraul@linux.ibm.com, jaka@linux.ibm.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/2] net/smc: Scan from current RMB list when no position specified
Date: Tue, 30 May 2023 22:08:51 +0200 [thread overview]
Message-ID: <4c8f11e5-d97d-5c9a-69b1-ba11c5857799@linux.ibm.com> (raw)
In-Reply-To: <1685101741-74826-2-git-send-email-guwen@linux.alibaba.com>
On 26.05.23 13:49, Wen Gu wrote:
> When finding the first RMB of link group, it should start from the
> current RMB list whose index is 0. So fix it.
>
> Fixes: b4ba4652b3f8 ("net/smc: extend LLC layer for SMC-Rv2")
> Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
> ---
> net/smc/smc_llc.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c
> index a0840b8..8423e8e 100644
> --- a/net/smc/smc_llc.c
> +++ b/net/smc/smc_llc.c
> @@ -578,7 +578,10 @@ static struct smc_buf_desc *smc_llc_get_next_rmb(struct smc_link_group *lgr,
> {
> struct smc_buf_desc *buf_next;
>
> - if (!buf_pos || list_is_last(&buf_pos->list, &lgr->rmbs[*buf_lst])) {
> + if (!buf_pos)
> + return _smc_llc_get_next_rmb(lgr, buf_lst);
> +
> + if (list_is_last(&buf_pos->list, &lgr->rmbs[*buf_lst])) {
> (*buf_lst)++;
> return _smc_llc_get_next_rmb(lgr, buf_lst);
> }
It seems too late, but still, why not? :
- if (!buf_pos || list_is_last(&buf_pos->list, &lgr->rmbs[*buf_lst])) {
- (*buf_lst)++;
+ if (list_is_last(&buf_pos->list, &lgr->rmbs[(*buf_lst])++)) {
Thanks,
Wenjia
next prev parent reply other threads:[~2023-05-30 20:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 11:48 [PATCH net 0/2] Two fixes for SMCRv2 Wen Gu
2023-05-26 11:49 ` [PATCH net 1/2] net/smc: Scan from current RMB list when no position specified Wen Gu
2023-05-30 20:08 ` Wenjia Zhang [this message]
2023-05-26 11:49 ` [PATCH net 2/2] net/smc: Don't use RMBs not mapped to new link in SMCRv2 ADD LINK Wen Gu
2023-05-27 10:22 ` Wenjia Zhang
2023-05-27 15:20 ` Wen Gu
2023-05-30 20:34 ` Wenjia Zhang
2023-06-01 8:37 ` Wen Gu
2023-05-30 9:30 ` [PATCH net 0/2] Two fixes for SMCRv2 patchwork-bot+netdevbpf
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=4c8f11e5-d97d-5c9a-69b1-ba11c5857799@linux.ibm.com \
--to=wenjia@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=jaka@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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