[ofw] RE: [patch] fix ipoib performance problem in rev 1430

Fab Tillier ftillier at windows.microsoft.com
Wed Aug 27 09:22:47 PDT 2008


Hi Anatoly,

>Index: ulp/ipoib/kernel/ipoib_port.c
>===================================================================
>--- ulp/ipoib/kernel/ipoib_port.c      (revision 1521)
>+++ ulp/ipoib/kernel/ipoib_port.c  (working copy)
>@@ -2582,8 +2582,17 @@
>          }
>
>          /* Get the checksums directly from packet information. */
>+       if ( !p_port->p_adapter->params.recv_chksum_offload )

This should never be true for MTHCA.  Did you check to make sure that MTHCA sets the ipoib_csum field of the ib_ca_attr_t to FALSE?  I suspect that is the true bug fix.

What you're doing here is telling NDIS that the checksum succeeded, when it may not have.  NDIS shouldn't be asking IPoIB to do receive checksum offload for MTHCA.

>+       {
>+                 p_desc->ndis_csum.Value = 0;
>+p_desc->ndis_csum.Receive.NdisPacketTcpChecksumSucceeded = TRUE;
>+p_desc->ndis_csum.Receive.NdisPacketUdpChecksumSucceeded = TRUE;
>+p_desc->ndis_csum.Receive.NdisPacketIpChecksumSucceeded = TRUE;
>+       }
>+

Note also that you are discarding the results of the checksum calculation when running with the MLX4 driver, and always indicating successful calculation.

>          NDIS_PER_PACKET_INFO_FROM_PACKET( *pp_packet,
>TcpIpChecksumPacketInfo ) =
>                    (PVOID) (uintn_t) (p_desc->ndis_csum.Value);
>+
>          ipoib_inc_recv_stat( p_port->p_adapter, type, p_desc->len );
>
>          IPOIB_EXIT( IPOIB_DBG_RECV );



More information about the ofw mailing list