From: Dust Li <dust.li@linux.alibaba.com>
To: Mahanta Jambigi <mjambigi@linux.ibm.com>,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, alibuda@linux.alibaba.com,
sidraya@linux.ibm.com, wenjia@linux.ibm.com
Cc: pasic@linux.ibm.com, horms@kernel.org, tonylu@linux.alibaba.com,
guwen@linux.alibaba.com, netdev@vger.kernel.org,
linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
Alexandra Winter <wintera@linux.ibm.com>
Subject: Re: [PATCH net] net/smc: Remove validation of reserved bits in CLC Decline message
Date: Tue, 2 Sep 2025 12:08:13 +0800 [thread overview]
Message-ID: <aLZtraICmwOQAtsO@linux.alibaba.com> (raw)
In-Reply-To: <57c2976e-8b6c-4cee-803f-ca5b0636f30b@linux.ibm.com>
On 2025-09-01 11:42:38, Mahanta Jambigi wrote:
>
>
>On 29/08/25 8:28 pm, Dust Li wrote:
>> >
>> > Fixes: 8ade200(net/smc: add v2 format of CLC decline message)
>> >
>> > Signed-off-by: Mahanta Jambigi <mjambigi@linux.ibm.com>
>> > Reference-ID: LTC214332
>>
>> I think this is your internal ID ? It's better not to leave that
>> in the upstream patches.
>
>Oops, I missed to remove it. Sure, I'll remove it.
>
>>
>> > Reviewed-by: Sidraya Jayagond <sidraya@linux.ibm.com>
>> > Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
>> >
>> > ---
>> > net/smc/smc_clc.c | 2 --
>> > 1 file changed, 2 deletions(-)
>> >
>> > diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c
>> > index 5a4db151fe95..08be56dfb3f2 100644
>> > --- a/net/smc/smc_clc.c
>> > +++ b/net/smc/smc_clc.c
>> > @@ -426,8 +426,6 @@ smc_clc_msg_decl_valid(struct smc_clc_msg_decline *dclc)
>> > {
>> > struct smc_clc_msg_hdr *hdr = &dclc->hdr;
>> >
>> > - if (hdr->typev1 != SMC_TYPE_R && hdr->typev1 != SMC_TYPE_D)
>> > - return false;
>>
>> Here it's checking the typev1 in smc_clc_msg_hdr, but your commit message
>> says it's validating the reserved bits:
>>
>> Currently SMC code is validating the reserved bits while parsing the incoming
>> CLC decline message & when this validation fails, its treated as a protocol
>> error.
>>
>> Did I miss something ?
>
>If you refer to struct *smc_clc_msg_hdr* in smc_clc.h file, typev1 member
>represents bits 4 & 5 at offset 7. If we compare it with the CLC Decline
>message header, it represents one of the reserved(5-7 bits) at offset 7. You
>can refer to below link for reserved bits.
>
>https://datatracker.ietf.org/doc/html/rfc7609#page-105
Oh, I see, thanks! The patch looks good to me.
BTW, I checked the rfc7609 and SMCv2.1 spec:
https://www.ibm.com/support/pages/system/files/inline-files/IBM%20Shared%20Memory%20Communications%20Version%202.1_0.pdf
I think the name type1/type2 in smc_clc_msg_hdr is confusing, as it doesn't sync
with the spec for decline message.
Best regards,
Dust
next prev parent reply other threads:[~2025-09-02 4:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 10:26 [PATCH net] net/smc: Remove validation of reserved bits in CLC Decline message Mahanta Jambigi
2025-08-29 14:58 ` Dust Li
2025-09-01 6:12 ` Mahanta Jambigi
2025-09-02 4:08 ` Dust Li [this message]
2025-09-02 6:05 ` Mahanta Jambigi
2025-09-02 7:26 ` Dust Li
2025-09-02 7:08 ` Simon Horman
2025-09-02 8:13 ` Mahanta Jambigi
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=aLZtraICmwOQAtsO@linux.alibaba.com \
--to=dust.li@linux.alibaba.com \
--cc=alibuda@linux.alibaba.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjambigi@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=sidraya@linux.ibm.com \
--cc=tonylu@linux.alibaba.com \
--cc=wenjia@linux.ibm.com \
--cc=wintera@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;
as well as URLs for NNTP newsgroup(s).