RE: [PATCH 2/2] IB/mad: Return unsupported for MADs as appropriate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Yes Sean. I got your point. As I mentioned earlier, there is already a function called validate_mad(), which checks for
Base version and class version as per figure 169 that Jason
Pointed out. If it's not matching, no response will be generated
And packet will be dropped. I will add a function like generate_unmatched_resp() the way you suggested to check for method get/set and return response as IB_MGMT_MAD_STATUS_BAD_VERSION only
Then. For other methods, again the packet would be dropped.

However, Hal and Jack were still concerned that this is not the correct Status code and it should instead be "Method/attribute unsupported". If there is a consensus on this status code, I can
Include that as well along with the change for generate_unmatched_resp().


-----Original Message-----
From: Hefty, Sean [mailto:sean.hefty@xxxxxxxxx]
Sent: Friday, January 20, 2012 8:58 PM
To: Swapna Thete; Hal Rosenstock
Cc: roland@xxxxxxxxxx; linux-rdma@xxxxxxxxxxxxxxx; Jack Morgenstein
Subject: RE: [PATCH 2/2] IB/mad: Return unsupported for MADs as appropriate

> Thank you all for your suggestions.
> However, I just wanted to understand that given this code is for the
> case of an entire class not supported, isn't this error code
> IB_MGMT_MAD_STATUS_BAD_VERSION (MAD returned with Bad Status: Unsupported
> Class or Version) more appropriate? Also this is
> Part of IB spec error codes.

As Jason pointed out, see figure 169, but, yes, this is the correct value for your case.  What I was suggesting is moving these checks out into another function, dealing with the specific case(s) that you are interested in, and deferring work on other cases.  The function I'm referring to would use positive checks to determine if a reply should be generated and what type of reply it needs to be, with the default case to simply discard the MAD.  Silently dropping these MADs is permissible under the spec, automatically generating a canned reply is not.

- Sean

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.

[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]

Add to Google Powered by Linux