From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
"Hefty,
Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "Weiny, Ira" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Bart Van Assche
<bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH] IB/mad: In validate_mad, validate CM method and attribute
Date: Fri, 13 Nov 2015 14:12:24 -0500 [thread overview]
Message-ID: <56463618.4060104@dev.mellanox.co.il> (raw)
In-Reply-To: <20151112221300.GA12250-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
IOn 11/12/2015 5:13 PM, Jason Gunthorpe wrote:
> On Thu, Nov 12, 2015 at 08:30:55PM +0000, Hefty, Sean wrote:
>>>> + /* CM attributes other than ClassPortInfo only use Send method
>>> */
>>>> + if (mad_hdr->mgmt_class == IB_MGMT_CLASS_CM) {
>>>> + if (mad_hdr->attr_id != IB_MGMT_CLASSPORTINFO_ATTR_ID) {
>>>> + if (mad_hdr->method != IB_MGMT_METHOD_SEND)
>>>> + goto out;
>>>> + } else if (mad_hdr->method != IB_MGMT_METHOD_GET_RESP)
>>>> + goto out;
>>>> + }
>>>
>>> Doesn't this invalidate a CM Get(ClassPortInfo) mad?
>>
>> I believe this does.
My bad. That wasn't my intention.
>> I think you could remove the else if clause
>> and let the received MAD get passed to the CM. It would be dropped
>> there as unsupported. The net result is likely the same.
I'm dropping else clause for CM CPI validation in next version of this
patch.
> IIRC responding to Get(CPI) is mandatory?
Yes it's mandatory to support CPI (and get method of CPI) on a class.
However, it's not currently done in CM.
-- Hal
> Jason
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-11-13 19:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 11:48 [PATCH] IB/mad: In validate_mad, validate CM method and attribute Hal Rosenstock
[not found] ` <56447CA2.1070802-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-11-12 17:52 ` Hefty, Sean
2015-11-12 18:03 ` Bart Van Assche
[not found] ` <5644D468.3060507-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2015-11-15 8:36 ` Sagi Grimberg
2015-11-12 18:13 ` ira.weiny
[not found] ` <20151112181339.GA16488-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-11-12 20:30 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373A9BACD7D-8oqHQFITsIHTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-11-12 22:13 ` Jason Gunthorpe
[not found] ` <20151112221300.GA12250-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-12 22:57 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373A9BACE42-8oqHQFITsIHTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-11-13 19:14 ` Hal Rosenstock
2015-11-13 19:12 ` Hal Rosenstock [this message]
2015-11-13 20:07 ` Hal Rosenstock
2015-11-13 19:09 ` Hal Rosenstock
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=56463618.4060104@dev.mellanox.co.il \
--to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/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