[openib-general][PATCH] mthca & ib_verbs.h client reregister event support by the SW

Leonid Arsh leonida at voltaire.com
Mon Apr 10 00:14:43 PDT 2006


Michael,
IPoIB used to interpret the CLIENT_REREGISTER event as a LID_CHANGE 
event before.
That's why we could see that sometimes that IPoIB handled the LID_CHANGE 
event additional times.
With the patch, IPoIB will receive the correct CLIENT_REREGISTER event.

You are right, although the CLIENT_REREGISTER event handling is 
optional, we should add the event handling to IPoIB too.

I think, we should change a little the event handling procedure in 
IPoIB, in order to prevent superfluous
device flushing. That's why I didn't add the CLIENT_REREGISTER event to 
IPoIB yet.
I think, we should check more information in the flush_task (such as the 
port number, partition etc.)
in order to flush only right network interfaces.

Anyway, the patch does not harm IPoIB at all.




Michael S. Tsirkin wrote:
> Quoting r. Leonid Arsh <leonida at voltaire.com>:
>   
>> Index: linux-kernel/infiniband/hw/mthca/mthca_mad.c
>> ===================================================================
>> --- linux-kernel/infiniband/hw/mthca/mthca_mad.c	(revision 8509)
>> +++ linux-kernel/infiniband/hw/mthca/mthca_mad.c	(working copy)
>> @@ -81,19 +81,27 @@
>>
>>
>> ....
>>
>>
>>  			event.device           = ibdev;
>> -			event.event            = IB_EVENT_LID_CHANGE;
>>  			event.element.port_num = port_num;
>> +
>> +			if(pinfo->clientrereg_resv_subnetto & 0x80)
>> +				event.event            = IB_EVENT_CLIENT_REREGISTER;
>> +			else
>> +				event.event            = IB_EVENT_LID_CHANGE;
>> +
>>  			ib_dispatch_event(&event);
>>  		}
>>  
>>     
>
> Hmm, might this break ipoib? It currently does:
>
> void ipoib_event(struct ib_event_handler *handler,
>                  struct ib_event *record)
> {
>         struct ipoib_dev_priv *priv =
>                 container_of(handler, struct ipoib_dev_priv, event_handler);
>
>         if (record->event == IB_EVENT_PORT_ERR    ||
>             record->event == IB_EVENT_PKEY_CHANGE ||
>             record->event == IB_EVENT_PORT_ACTIVE ||
>             record->event == IB_EVENT_LID_CHANGE  ||
>             record->event == IB_EVENT_SM_CHANGE) {
>                 ipoib_dbg(priv, "Port state change event\n");
>                 queue_work(ipoib_workqueue, &priv->flush_task);
>         }
> }
>
> Don't we need to add IB_EVENT_CLIENT_REREGISTER too?
>
>   




More information about the general mailing list