[ofw] [Patch] [IPoIB_NDIS6_CM] LSO bug fix

Smith, Stan stan.smith at intel.com
Mon Sep 20 10:23:13 PDT 2010


Hello,
  If you know the MLX ipoib files and winOFED svn files are out of sync, why do you posted patches which will not apply?

Please resend as a patch against winOFED svn tree for consideration?

thank you,

stan.


-----Original Message-----
From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Alex Naslednikov
Sent: Sunday, September 19, 2010 8:17 AM
To: ofw at lists.openfabrics.org
Subject: [ofw] [Patch] [IPoIB_NDIS6_CM] LSO bug fix

LSO bug fix

Signed-off by: Alexander Naslednikov (xalex  at mellanox.co.il)

Index: B:/users/xalex/MLNX_VPI_trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
===================================================================
--- B:/users/xalex/MLNX_VPI_trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp      (revision 5274)
+++ B:/users/xalex/MLNX_VPI_trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp      (revision 5275)
@@ -3989,7 +3989,8 @@
        NDIS_STATUS             status;
        uint32_t                i, j            = 1;
        ULONG                   DataOffset      = 0;
-       uint32_t                offset          = sizeof(eth_hdr_t);
+       uint32_t                EthHeaderOffset                 = sizeof(eth_hdr_t);
+       static const    EthIPoIBHeaderOffset    = EthHeaderOffset - sizeof(ipoib_hdr_t);

        PERF_DECLARE( SendCopy );

@@ -4047,27 +4048,27 @@
                        ****************************/

                        p_desc->send_wr[0].local_ds[j].vaddr =
-                               p_sgl->Elements[0].Address.QuadPart + lso_header_size;
+                               p_sgl->Elements[0].Address.QuadPart + lso_header_size + DataOffset + EthIPoIBHeaderOffset;
                        p_desc->send_wr[0].local_ds[j].length =
-                               p_sgl->Elements[0].Length - lso_header_size;
+                               p_sgl->Elements[0].Length - lso_header_size - DataOffset - EthIPoIBHeaderOffset;
                        p_desc->send_wr[0].local_ds[j].lkey = s_buf->p_port->ib_mgr.lkey;
                        /* Set the number of data segments. */
                        p_desc->send_wr[0].wr.num_ds = 1;
                        return NDIS_STATUS_SUCCESS;
                }
        }
-       else while( offset )
+       else while( EthHeaderOffset )
        {
-               if( p_sgl->Elements[i].Length <= offset )
+               if( p_sgl->Elements[i].Length <= EthHeaderOffset )
                {
-                       offset -= p_sgl->Elements[i++].Length;
+                       EthHeaderOffset -= p_sgl->Elements[i++].Length;
                }
                else
                {
                        p_desc->send_wr[0].local_ds[j].vaddr =
-                               p_sgl->Elements[i].Address.QuadPart + offset + DataOffset;
+                               p_sgl->Elements[i].Address.QuadPart + EthHeaderOffset + DataOffset;
                        p_desc->send_wr[0].local_ds[j].length =
-                               p_sgl->Elements[i].Length - offset - DataOffset;
+                               p_sgl->Elements[i].Length - EthHeaderOffset - DataOffset;
                        p_desc->send_wr[0].local_ds[j].lkey = s_buf->p_port->ib_mgr.lkey;
                        i++;
                        j++;
_______________________________________________
ofw mailing list
ofw at lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw



More information about the ofw mailing list