From: Wenjia Zhang <wenjia@linux.ibm.com>
To: Zhengchao Shao <shaozhengchao@huawei.com>,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: jaka@linux.ibm.com, alibuda@linux.alibaba.com,
tonylu@linux.alibaba.com, guwen@linux.alibaba.com,
weiyongjun1@huawei.com, yuehaibing@huawei.com
Subject: Re: [PATCH net-next 2/4] net/smc: remove the fallback in __smc_connect
Date: Wed, 31 Jul 2024 17:15:46 +0200 [thread overview]
Message-ID: <4232f3fb-4088-41e0-91f7-7813d3bb99e5@linux.ibm.com> (raw)
In-Reply-To: <20240730012506.3317978-3-shaozhengchao@huawei.com>
On 30.07.24 03:25, Zhengchao Shao wrote:
> When the SMC client begins to connect to server, smcd_version is set
> to SMC_V1 + SMC_V2. If fail to get VLAN ID, only SMC_V2 information
> is left in smcd_version. And smcd_version will not be changed to 0.
> Therefore, remove the fallback caused by the failure to get VLAN ID.
>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
> net/smc/af_smc.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
> index 73a875573e7a..83f5a1849971 100644
> --- a/net/smc/af_smc.c
> +++ b/net/smc/af_smc.c
> @@ -1523,10 +1523,6 @@ static int __smc_connect(struct smc_sock *smc)
> ini->smcd_version &= ~SMC_V1;
> ini->smcr_version = 0;
> ini->smc_type_v1 = SMC_TYPE_N;
> - if (!ini->smcd_version) {
> - rc = SMC_CLC_DECL_GETVLANERR;
> - goto fallback;
> - }
> }
>
> rc = smc_find_proposal_devices(smc, ini);
Though you're right that here smcd_version never gets 0, it actually is
a bug from ("42042dbbc2eb net/smc: prepare for SMC-Rv2 connection"). The
purpose of the check here was to fallback at a early phase before
calling smc_find_proposal_devices(). However, this change is not wrong,
just I personally like adding a check for smc_ism_is_v2_capable() more.
Thanks,
Wenjia
next prev parent reply other threads:[~2024-07-31 15:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 1:25 [PATCH net-next 0/4] net/smc: do some cleanups in smc module Zhengchao Shao
2024-07-30 1:25 ` [PATCH net-next 1/4] net/smc: remove unreferenced header in smc_loopback.h file Zhengchao Shao
2024-07-30 18:55 ` Simon Horman
2024-07-31 3:18 ` D. Wythe
2024-07-31 11:59 ` Wen Gu
2024-07-30 1:25 ` [PATCH net-next 2/4] net/smc: remove the fallback in __smc_connect Zhengchao Shao
2024-07-30 18:57 ` Simon Horman
2024-07-31 15:15 ` Wenjia Zhang [this message]
2024-08-01 1:22 ` shaozhengchao
2024-08-01 7:23 ` Wenjia Zhang
2024-08-01 11:35 ` shaozhengchao
2024-07-30 1:25 ` [PATCH net-next 3/4] net/smc: remove redundant code in smc_connect_check_aclc Zhengchao Shao
2024-07-30 18:58 ` Simon Horman
2024-07-30 1:25 ` [PATCH net-next 4/4] net/smc: remove unused input parameters in smcr_new_buf_create Zhengchao Shao
2024-07-30 18:59 ` Simon Horman
2024-07-31 10:50 ` [PATCH net-next 0/4] net/smc: do some cleanups in smc module patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4232f3fb-4088-41e0-91f7-7813d3bb99e5@linux.ibm.com \
--to=wenjia@linux.ibm.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=jaka@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shaozhengchao@huawei.com \
--cc=tonylu@linux.alibaba.com \
--cc=weiyongjun1@huawei.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox