This is taken care of in validate_mad() function before code in my patch gets called. So it should work as Sean points out, basically if Baseversion is not 1, MAD would get dropped.
Thanks, Swapna -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jason Gunthorpe Sent: Thursday, January 19, 2012 2:49 AM To: Hefty, Sean Cc: Swapna Thete; [email protected]; [email protected] Subject: Re: [PATCH 2/2] IB/mad: Return unsupported for MADs as appropriate On Wed, Jan 18, 2012 at 07:30:03PM +0000, Hefty, Sean wrote: > > I feel if the base version is not supported then a GetResp should be > > returned without a memcpy. The base version set to the highest > > supported value and the TID copied over from the reply but everything > > else 0'd. This allows base version discovery which might be important > > some day. > > If the BaseVersion isn't supported, then I don't know that the code > should assume anything about the rest of the MAD format, including > the location or size of any other fields. If we at least know that > BaseVersion = 1, then we should be safe checking for common methods. > If BaseVersion > 1, then maybe we're better off just dropping the > MAD still. Yes, that is why the compliance statement is sort of short sighted.. The flowchart makes more sense. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
