2023-05-26 11:56:58

by Wen Gu

[permalink] [raw]
Subject: [PATCH net 0/2] Two fixes for SMCRv2

This patch set includes two bugfix for SMCRv2.

Wen Gu (2):
net/smc: Scan from current RMB list when no position specified
net/smc: Don't use RMBs not mapped to new link in SMCRv2 ADD LINK

net/smc/smc_llc.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

--
1.8.3.1



2023-05-26 11:59:53

by Wen Gu

[permalink] [raw]
Subject: [PATCH net 1/2] net/smc: Scan from current RMB list when no position specified

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 <[email protected]>
---
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);
}
--
1.8.3.1


2023-05-30 09:40:21

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net 0/2] Two fixes for SMCRv2

Hello:

This series was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

On Fri, 26 May 2023 19:48:59 +0800 you wrote:
> This patch set includes two bugfix for SMCRv2.
>
> Wen Gu (2):
> net/smc: Scan from current RMB list when no position specified
> net/smc: Don't use RMBs not mapped to new link in SMCRv2 ADD LINK
>
> net/smc/smc_llc.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)

Here is the summary with links:
- [net,1/2] net/smc: Scan from current RMB list when no position specified
https://git.kernel.org/netdev/net/c/b24aa141c2ff
- [net,2/2] net/smc: Don't use RMBs not mapped to new link in SMCRv2 ADD LINK
https://git.kernel.org/netdev/net/c/71c6aa0305e3

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



2023-05-30 20:14:23

by Wenjia Zhang

[permalink] [raw]
Subject: Re: [PATCH net 1/2] net/smc: Scan from current RMB list when no position specified



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 <[email protected]>
> ---
> 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