> -----Original Message-----
> From: [email protected] [mailto:linux-rdma-
> [email protected]] On Behalf Of Jason Gunthorpe
> Sent: Wednesday, January 18, 2012 11:02 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 06:06:11PM +0000, Hefty, Sean wrote:
> > > + } else {
> > > +         memcpy(response, recv, sizeof(*response));
> > > +         response->header.recv_wc.wc = &response->header.wc;
> > > +         response->header.recv_wc.recv_buf.mad = &response->mad.mad;
> > > +         response->header.recv_wc.recv_buf.grh = &response->grh;
> > > +         response->mad.mad.mad_hdr.method = IB_MGMT_METHOD_GET_RESP;
> > > +         response->mad.mad.mad_hdr.status =
> > > +                         __be16_to_cpu(IB_MGMT_MAD_STATUS_BAD_VERSION);
> > > +         agent_send_response(&response->mad.mad, &recv->grh, wc,
> > > +                 port_priv->device, port_num, qp_info->qp->qp_num);
> > >   }
> >
> > I think we need to do more here than just generate a GetResp for an
> > unmatched receive.  The received MAD in question could itself be a
> > GetResp or a Send, Trap, Report, etc.  Maybe add a check:
> 
> No, refer to Figure 169. GetResp is the correct response.
> 
> The method cannot be parsed outside the context of the
> (baseVersion,manamgentClass,classVersion) tuple. A agent that does not
> understand the managementClass must return GetResp.
> 
> 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.

See C13-47 - "Packets failing one or more of these checks are discarded and no 
action is taken in response unless the method is a Get() or a Set()."

This patch would send a GetResp() to any method.
--
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

Reply via email to