[ofa-general] RE: [PATCH] ib/mad: BMA responses are discarded in kernel

Hefty, Sean sean.hefty at intel.com
Wed Aug 27 11:00:46 PDT 2008


>Notice of fix for bug 988
>(https://bugs.openfabrics.org/show_bug.cgi?id=988).
>
>The following patch resolves an issue where incoming BMA responses are
>dropped due to a bad "is response" check.  Fixed to use the
>ib_response_mad() predicate, which correctly handles BMA MADs.
>
>Signed-off-by: Michael Brooks <michael.brooks at qlogic.com>

Acked-by: Sean Hefty <sean.hefty at intel.com>

>---

Given how long this bug has been around, I'm guessing this is okay to wait for 2.6.28.  Does that seem okay with you, Michael?

>diff --git a/drivers/infiniband/core/mad.c
>b/drivers/infiniband/core/mad.c
>index 6f42877..19d9468 100644
>--- a/drivers/infiniband/core/mad.c
>+++ b/drivers/infiniband/core/mad.c
>@@ -1693,9 +1693,8 @@ static inline int rcv_has_same_gid(struct
>ib_mad_agent_private *mad_agent_priv,
>        u8 port_num = mad_agent_priv->agent.port_num;
>        u8 lmc;
>
>-       send_resp = ((struct ib_mad *)(wr->send_buf.mad))->
>-                    mad_hdr.method & IB_MGMT_METHOD_RESP;
>-       rcv_resp = rwc->recv_buf.mad->mad_hdr.method &
>IB_MGMT_METHOD_RESP;
>+       send_resp = ib_response_mad((struct ib_mad *)wr->send_buf.mad);
>+       rcv_resp = ib_response_mad(rwc->recv_buf.mad);
>
>        if (send_resp == rcv_resp)
>                /* both requests, or both responses. GIDs different */
>_______________________________________________
>general mailing list
>general at lists.openfabrics.org
>http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
>To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



More information about the general mailing list