Re: [PATCH net] net/smc: return the right falback reason when prefix checks fail

From: Wenjia Zhang
Date: Thu Oct 12 2023 - 15:15:57 EST




On 12.10.23 15:05, Alexandra Winter wrote:


On 12.10.23 14:37, Dust Li wrote:
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 <dust.li@xxxxxxxxxxxxxxxxx>

As you point out the current code is not really wrong. So I am not sure,
whether this should be a fix for net, or rather a debug improvement for
net-next.
The return code was not precise, and since we do have already a more
appropriate return code to use. IMO, it was wrong. I'm for net.

Reviewed-by: Wenjia Zhang <wenjia@xxxxxxxxxxxxx>