From: Guangguan Wang <guangguan.wang@linux.alibaba.com>
To: Jan Karcher <jaka@linux.ibm.com>,
wenjia@linux.ibm.com, kgraul@linux.ibm.com,
tonylu@linux.alibaba.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: horms@kernel.org, alibuda@linux.alibaba.com,
guwen@linux.alibaba.com, linux-s390@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/6] net/smc: support smc release version negotiation in clc handshake
Date: Thu, 17 Aug 2023 11:18:47 +0800 [thread overview]
Message-ID: <2a494003-c41d-c8a6-6e3f-df6280494715@linux.alibaba.com> (raw)
In-Reply-To: <36db51b2-ff88-0419-1e9b-cae2b111e570@linux.ibm.com>
On 2023/8/16 22:14, Jan Karcher wrote:
>
>
> On 16/08/2023 10:33, Guangguan Wang wrote:
>> Support smc release version negotiation in clc handshake based on
>> SMC v2, where no negotiation process for different releases, but
>> for different versions. The latest smc release version was updated
>> to v2.1. And currently there are two release versions of SMCv2, v2.0
>> and v2.1. In the release version negotiation, client sends the preferred
>> release version by CLC Proposal Message, server makes decision for which
>> release version to use based on the client preferred release version and
>> self-supported release version (here choose the minimum release version
>> of the client preferred and server latest supported), then the decision
>> returns to client by CLC Accept Message. Client confirms the decision by
>> CLC Confirm Message.
>>
>> Client Server
>> Proposal(preferred release version)
>> ------------------------------------>
>>
>> Accept(accpeted release version)
>> min(client preferred, server latest supported)
>> <------------------------------------
>>
>> Confirm(accpeted release version)
>> ------------------------------------>
>>
>> Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
>> Reviewed-by: Tony Lu <tonylu@linux.alibaba.com>
>> ---
>> net/smc/af_smc.c | 18 ++++++++++++++++--
>> net/smc/smc.h | 5 ++++-
>> net/smc/smc_clc.c | 14 +++++++-------
>> net/smc/smc_clc.h | 23 ++++++++++++++++++++++-
>> net/smc/smc_core.h | 1 +
>> 5 files changed, 50 insertions(+), 11 deletions(-)
>>
>> diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
>> index a7f887d91d89..97265691bc95 100644
>> --- a/net/smc/af_smc.c
>> +++ b/net/smc/af_smc.c
>> @@ -1187,6 +1187,9 @@ static int smc_connect_rdma_v2_prepare(struct smc_sock *smc,
>> return SMC_CLC_DECL_NOINDIRECT;
>> }
>> }
>> +
>> + ini->release_nr = fce->release;
>> +
>
> why would we do this and vvvvv
>> return 0;
>> }
>> @@ -1355,6 +1358,13 @@ static int smc_connect_ism(struct smc_sock *smc,
>> struct smc_clc_msg_accept_confirm_v2 *aclc_v2 =
>> (struct smc_clc_msg_accept_confirm_v2 *)aclc;
>> + if (ini->first_contact_peer) {
>> + struct smc_clc_first_contact_ext *fce =
>> + smc_get_clc_first_contact_ext(aclc_v2, true);
>> +
>> + ini->release_nr = fce->release;
>> + }
>> +
>
> this two times?
> Can't we put this together into __smc_connect where those functions get called (via smc_connect_rdma and smc_connect_ism)?
>
> Please provide reasoning, it might be that i oversaw the reasoning behind this duplication.
>
ini->release_nr is assigned only when doing first connect, thus this depends on the value test of
ini->first_contact_peer. I have to follow the ini->first_contact_peer code logic, which may also
make us wonder that why not put ini->first_contact_peer together into __smc_connect.
Indeed, both of ini->first_contact_peer and ini->release_nr can put together into __smc_connect.
But I think it is better to start a new patch series to refactor those code, not in v2.1 features.
> Also note: Even if there is a reason to set this information seperate for SMC-D and SMC-R think about using your very neat helper function (smc_get_clc_first_contact_ext) in smc_connect_rdma_v2_prepare as well.
>
OK, I will replace the code to smc_get_clc_first_contact_ext.
Thanks,
Guangguan Wang
next prev parent reply other threads:[~2023-08-17 3:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 8:33 [PATCH net-next 0/6] net/smc: several features's implementation for smc v2.1 Guangguan Wang
2023-08-16 8:33 ` [PATCH net-next 1/6] net/smc: support smc release version negotiation in clc handshake Guangguan Wang
2023-08-16 14:14 ` Jan Karcher
2023-08-17 3:18 ` Guangguan Wang [this message]
2023-08-17 6:42 ` Jan Karcher
2023-08-16 8:33 ` [PATCH net-next 2/6] net/smc: add vendor unique experimental options area " Guangguan Wang
2023-08-16 21:49 ` Jan Karcher
2023-08-17 3:23 ` Guangguan Wang
2023-08-16 8:33 ` [PATCH net-next 3/6] net/smc: support smc v2.x features validate Guangguan Wang
2023-08-16 12:49 ` Vadim Fedorenko
2023-08-17 3:31 ` Guangguan Wang
2023-08-17 6:42 ` Jan Karcher
2023-08-17 9:25 ` Guangguan Wang
2023-08-16 8:33 ` [PATCH net-next 4/6] net/smc: support max connections per lgr negotiation Guangguan Wang
2023-08-17 6:42 ` Jan Karcher
2023-08-17 9:25 ` Guangguan Wang
2023-08-16 8:33 ` [PATCH net-next 5/6] net/smc: support max links per lgr negotiation in clc handshake Guangguan Wang
2023-08-16 8:33 ` [PATCH net-next 6/6] net/smc: Extend SMCR v2 linkgroup netlink attribute Guangguan Wang
2023-08-17 6:43 ` [PATCH net-next 0/6] net/smc: several features's implementation for smc v2.1 Jan Karcher
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=2a494003-c41d-c8a6-6e3f-df6280494715@linux.alibaba.com \
--to=guangguan.wang@linux.alibaba.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=horms@kernel.org \
--cc=jaka@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tonylu@linux.alibaba.com \
--cc=wenjia@linux.ibm.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