From: Dust Li Date: Thu, 12 Oct 2023 12:37:29 +0000 (+0800) Subject: net/smc: return the right falback reason when prefix checks fail X-Git-Tag: v6.1.63~717 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=753ef5ef4c3b53daeee92f0e08258128ba5bd210;p=sdk%2Femulator%2Femulator-kernel.git net/smc: return the right falback reason when prefix checks fail commit 4abbd2e3c1db671fa1286390f1310aec78386f1d upstream. 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: e49300a6bf62 ("net/smc: add listen processing for SMC-Rv2") Signed-off-by: Dust Li Reviewed-by: Alexandra Winter Reviewed-by: Wenjia Zhang Link: https://lore.kernel.org/r/20231012123729.29307-1-dust.li@linux.alibaba.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index f774d840759d..9fe62b5b0297 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -2322,7 +2322,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 */