[ofa-general] [PATCH] mlx4_ib/mthca: Fix dispatch of IB_EVENT_LID_CHANGE

Jack Morgenstein jackm at dev.mellanox.co.il
Thu Nov 27 05:43:10 PST 2008


On Thursday 27 November 2008 15:26, Moni Shoua wrote:
> I'm also changing the action in case ib_query_port() fails. 
> Instead of ignoring the failure I now assume the worst (i.e: LID_CHANGE)
> 
OK.  This will not be worse than the current situation.
(actually, it may in certain cases, because you can generate the both LID_CHANGE event and
 a CLIENT_REREGISTER event, where before only one was generated.  However,
 if query_port fails, we will probably see other failures as well, so what
 the heck).

BTW,
The condition I sent in my last post is not enough.
It should be:
        if ((in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
             in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) &&
            in_mad->mad_hdr.method == IB_MGMT_METHOD_SET &&
	    in_mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO &&
            !ib_query_port(ibdev, port_num, &pattr))
                prev_lid = pattr.lid;

since the query_port response data is only relevant for the IB_SMP_ATTR_PORT_INFO
path in smp_snoop.

- Jack



More information about the general mailing list