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 2/6] net/smc: add vendor unique experimental options area in clc handshake
Date: Thu, 17 Aug 2023 11:23:09 +0800 [thread overview]
Message-ID: <e6a97304-801d-476c-f8cf-9828175aaf34@linux.alibaba.com> (raw)
In-Reply-To: <dc94f888-971b-dbc2-d417-9e14734266fc@linux.ibm.com>
On 2023/8/17 05:49, Jan Karcher wrote:
> Hi Guangguan Wang,
>
> thank you, some minor thoughts on this one.
>
> On 16/08/2023 10:33, Guangguan Wang wrote:
...
>> -static void smc_clc_fill_fce(struct smc_clc_first_contact_ext *fce, int *len, int release_nr)
>> +static int smc_clc_fill_fce(struct smc_clc_first_contact_ext_v2x *fce,
>> + struct smc_init_info *ini)
>> {
>> + int ret = sizeof(*fce);
>> +
>> memset(fce, 0, sizeof(*fce));
>> - fce->os_type = SMC_CLC_OS_LINUX;
>> - fce->release = release_nr;
>> - memcpy(fce->hostname, smc_hostname, sizeof(smc_hostname));
>> - (*len) += sizeof(*fce);
>> + fce->fce_v20.os_type = SMC_CLC_OS_LINUX;
>> + fce->fce_v20.release = ini->release_nr;
>
> I don't like that this is called fce_v20.release which can be set to v2.1 here although the struct is named v20. Maybe let us call the struct something like fce_v2_base or fce_base_v2.
>
fce_v2_base sounds better.
>> diff --git a/net/smc/smc_clc.h b/net/smc/smc_clc.h
>> index b923e89acafb..6133276a8839 100644
>> --- a/net/smc/smc_clc.h
>> +++ b/net/smc/smc_clc.h
>> @@ -147,7 +147,9 @@ struct smc_clc_msg_proposal_prefix { /* prefix part of clc proposal message*/
>> struct smc_clc_msg_smcd { /* SMC-D GID information */
>> struct smc_clc_smcd_gid_chid ism; /* ISM native GID+CHID of requestor */
>> __be16 v2_ext_offset; /* SMC Version 2 Extension Offset */
>> - u8 reserved[28];
>> + u8 vendor_oui[3];
>> + u8 vendor_exp_options[5];
>> + u8 reserved[20];
>
> Could we either make those variables a bit more self explaining via their name (e.g. vendor_organization_uid) or adding a comment /* vendor organizationally unique identifier */
>
I will fix it in the next version.
>> };
>> struct smc_clc_smcd_v2_extension {
>> @@ -231,8 +233,17 @@ struct smc_clc_first_contact_ext {
>> u8 hostname[SMC_MAX_HOSTNAME_LEN];
>> };
>> +struct smc_clc_first_contact_ext_v2x {
>> + struct smc_clc_first_contact_ext fce_v20;
>
> as stated at the top where the release is assigned i'm not completly happy with the naming.
>
Thanks,
Guangguan Wang
next prev parent reply other threads:[~2023-08-17 3:24 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 [this message]
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=e6a97304-801d-476c-f8cf-9828175aaf34@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