Skip to content

Commit 1d6e74e

Browse files
author
Mete Durlu
committed
net/smc: Scan from current RMB list when no position specified
JIRA: https://issues.redhat.com/browse/RHEL-73484 commit b24aa14 Author: Wen Gu <[email protected]> Date: Fri May 26 19:49:00 2023 +0800 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: b4ba465 ("net/smc: extend LLC layer for SMC-Rv2") Signed-off-by: Wen Gu <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Mete Durlu <[email protected]>
1 parent da6d7f1 commit 1d6e74e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net/smc/smc_llc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,10 @@ static struct smc_buf_desc *smc_llc_get_next_rmb(struct smc_link_group *lgr,
578578
{
579579
struct smc_buf_desc *buf_next;
580580

581-
if (!buf_pos || list_is_last(&buf_pos->list, &lgr->rmbs[*buf_lst])) {
581+
if (!buf_pos)
582+
return _smc_llc_get_next_rmb(lgr, buf_lst);
583+
584+
if (list_is_last(&buf_pos->list, &lgr->rmbs[*buf_lst])) {
582585
(*buf_lst)++;
583586
return _smc_llc_get_next_rmb(lgr, buf_lst);
584587
}

0 commit comments

Comments
 (0)