Skip to content

Commit

Permalink
net/smc: return the right falback reason when prefix checks fail
Browse files Browse the repository at this point in the history
In the smc_listen_work(), if smc_listen_prfx_check() failed,
the real reason: SMC_CLC_DECL_DIFFPREFIX was dropped, and
SMC_CLC_DECL_NOSMCDEV was returned.

Althrough this is also kind of SMC_CLC_DECL_NOSMCDEV, but return
the real reason is much friendly for debugging.

Fixes: e49300a ("net/smc: add listen processing for SMC-Rv2")
Signed-off-by: Dust Li <[email protected]>
Reviewed-by: Alexandra Winter <[email protected]>
Reviewed-by: Wenjia Zhang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
Dust Li authored and kuba-moo committed Oct 16, 2023
1 parent 883f0dc commit 4abbd2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/smc/af_smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2362,7 +2362,7 @@ static int smc_listen_find_device(struct smc_sock *new_smc,
smc_find_ism_store_rc(rc, ini);
return (!rc) ? 0 : ini->rc;
}
return SMC_CLC_DECL_NOSMCDEV;
return prfx_rc;
}

/* listen worker: finish RDMA setup */
Expand Down

0 comments on commit 4abbd2e

Please sign in to comment.