From: Guangguan Wang <guangguan.wang@linux.alibaba.com>
To: Vadim Fedorenko <vadim.fedorenko@linux.dev>,
wenjia@linux.ibm.com, jaka@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 3/6] net/smc: support smc v2.x features validate
Date: Thu, 17 Aug 2023 11:31:22 +0800 [thread overview]
Message-ID: <e6847761-af77-6673-9e06-cc08eb4ba483@linux.alibaba.com> (raw)
In-Reply-To: <5421115a-a8d0-0eae-78b1-a2c5977e2ba1@linux.dev>
On 2023/8/16 20:49, Vadim Fedorenko wrote:
> On 16/08/2023 09:33, Guangguan Wang wrote:
>> +
>> +int smc_clc_cli_v2x_features_validate(struct smc_clc_first_contact_ext *fce,
>> + struct smc_init_info *ini)
>> +{
>> + if (ini->release_nr < SMC_RELEASE_1)
>> + return 0;
>> +
>> + return 0;
>> +}
>
> This function always returns 0. Is it really what expected?
>
This patch is a frame code of v2x features validate.
Please read the next 2 patches, where will fill more code logic in this function.
[PATCH net-next 4/6] net/smc: support max connections per lgr negotiation
int smc_clc_cli_v2x_features_validate(struct smc_clc_first_contact_ext *fce,
struct smc_init_info *ini)
{
+ struct smc_clc_first_contact_ext_v2x *fce_v2x =
+ (struct smc_clc_first_contact_ext_v2x *)fce;
+
if (ini->release_nr < SMC_RELEASE_1)
return 0;
+ if (!ini->is_smcd) {
+ if (fce_v2x->max_conns < SMC_CONN_PER_LGR_MIN)
+ return SMC_CLC_DECL_MAXCONNERR;
+ ini->max_conns = fce_v2x->max_conns;
+ }
+
return 0;
}
[PATCH net-next 5/6] net/smc: support max links per lgr negotiation in clc handshake
@@ -1208,6 +1216,11 @@ int smc_clc_cli_v2x_features_validate(struct smc_clc_first_contact_ext *fce,
if (fce_v2x->max_conns < SMC_CONN_PER_LGR_MIN)
return SMC_CLC_DECL_MAXCONNERR;
ini->max_conns = fce_v2x->max_conns;
+
+ if (fce_v2x->max_links > SMC_LINKS_ADD_LNK_MAX ||
+ fce_v2x->max_links < SMC_LINKS_ADD_LNK_MIN)
+ return SMC_CLC_DECL_MAXLINKERR;
+ ini->max_links = fce_v2x->max_links;
}
return 0;
Thanks,
Guangguan Wang
next prev parent reply other threads:[~2023-08-17 3:32 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
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 [this message]
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=e6847761-af77-6673-9e06-cc08eb4ba483@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=vadim.fedorenko@linux.dev \
--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