[ofw] [IPOIB_NDIS6_CM] missing IRQL restore

Smith, Stan stan.smith at intel.com
Wed Aug 4 09:23:14 PDT 2010


Tzachi Dar wrote:
> I agree, this is indeed a bug, please check it in.


Done in SVN commit 2869.

>
> Thanks
> Tzachi
>
>> -----Original Message-----
>> From: Smith, Stan [mailto:stan.smith at intel.com]
>> Sent: Tuesday, August 03, 2010 11:49 PM
>> To: Tzachi Dar
>> Cc: ofw at lists.openfabrics.org
>> Subject: [IPOIB_NDIS6_CM] missing IRQL restore
>>
>>
>> Hello,
>>   In ipoib_port.cpp, function ipoib_port_send() the following code
>> is executed:
>>
>>         if (NDIS_TEST_SEND_AT_DISPATCH_LEVEL(send_flags))         {
>>                 //TODO Tzachid: make an assert here to validate your
>>                 IRQL ASSERT (KeGetCurrentIrql() == DISPATCH_LEVEL);
>>                 old_irql = DISPATCH_LEVEL;
>>         } else {
>>                 NDIS_RAISE_IRQL_TO_DISPATCH(&old_irql);
>>                 //ASSERT (KeGetCurrentIrql() == PASSIVE_LEVEL); //
>>         Happens }
>>
>> Further on under an error condition
>>
>>         cl_obj_lock( &p_port->obj );
>>         if( p_port->state != IB_QPS_RTS )
>>         {
>>                 cl_obj_unlock( &p_port->obj );
>>
>>                 IPOIB_PRINT( TRACE_LEVEL_VERBOSE, IPOIB_DBG_SEND,
>>                         ("Invalid QP state: not RTS, exiting from
>>                 port_send\n"));
>>                 NET_BUFFER_LIST_STATUS(p_net_buffer_list) =
>> NDIS_STATUS_FAILURE; ipoib_inc_send_stat( p_port->p_adapter,
>> IP_STAT_DROPPED, 0 );
>>
>>                 NdisMSendNetBufferListsCompleteX( p_port->p_adapter,
>>
>> p_net_buffer_list,
>>
>> send_complete_flags );
>>                 return;
>>         }
>>         cl_obj_unlock( &p_port->obj );
>>
>> Looks like the IRQL can be messed up on exit.
>> Following patch fixes the problem.
>> Do you agree?
>>
>> thanks,
>>
>> stan.
>>
>> --- A/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp  Tue Aug 03 13:02:05
>> 2010 +++ B/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp  Tue Aug 03
>> 13:40:09 2010 @@ -5440,6 +5440,10 @@
>>                 NdisMSendNetBufferListsCompleteX( p_port->p_adapter,
>>
>> p_net_buffer_list,
>>
>> send_complete_flags );
>> +
>> +               NDIS_LOWER_IRQL(old_irql, DISPATCH_LEVEL); +
>> +               IPOIB_EXIT( IPOIB_DBG_SEND );
>>                 return;
>>         }
>>         cl_obj_unlock( &p_port->obj );




More information about the ofw mailing list