[ofw] [patch] fix forwarding of ipoib

Tzachi Dar tzachid at mellanox.co.il
Wed Oct 6 09:41:40 PDT 2010


It seems that we had a problem with forwarding packets. The packet would be sent with one fragment size with size 0. The hw would than refuse to send the packet.

Thanks
Tzachi

Index: b:/users/tzachid/projinf6/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
===================================================================
--- b:/users/tzachid/projinf6/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp              (revision 6618)
+++ b:/users/tzachid/projinf6/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp           (revision 6619)
@@ -1154,7 +1154,7 @@
                                return status;
                }
                p_port->ib_mgr.qpn = qp_attr.num;
-
+
                /* Register all of physical memory */
                phys_create.length = MEM_REG_SIZE;
                phys_create.num_ranges = 1;
@@ -4247,8 +4247,10 @@
                                                p_desc->send_wr[0].local_ds[j].length =
                                                                p_sgl->Elements[i].Length - EthHeaderOffset - DataOffset;
                                                p_desc->send_wr[0].local_ds[j].lkey = s_buf->p_port->ib_mgr.lkey;
+                                             if(p_desc->send_wr[0].local_ds[j].length > 0) {
+                                                             j++;
+                                             }
                                                i++;
-                                              j++;
                                                break;
                                }
                }
@@ -4257,6 +4259,7 @@
                {
                                p_desc->send_wr[0].local_ds[j].vaddr = p_sgl->Elements[i].Address.QuadPart;
                                p_desc->send_wr[0].local_ds[j].length = p_sgl->Elements[i].Length;
+                             CL_ASSERT(p_desc->send_wr[0].local_ds[j].length > 0);
                                p_desc->send_wr[0].local_ds[j].lkey = s_buf->p_port->ib_mgr.lkey;
                                i++;
                                j++;
@@ -5219,7 +5222,7 @@
                                                                p_desc->send_wr[i-1].wr.p_next = &p_desc->send_wr[i].wr;
                                                }
                                }
-
+
                                p_desc->send_wr[p_desc->num_wrs - 1].wr.wr_id = (uintn_t)s_buf ;
                                p_desc->send_wr[p_desc->num_wrs - 1].wr.send_opt |= IB_SEND_OPT_SIGNALED;
                                p_desc->send_wr[p_desc->num_wrs - 1].wr.p_next = NULL;
@@ -8708,4 +8711,4 @@
                }
                return;
 }
-#endif
\ No newline at end of file
+#endif
Index: b:/users/tzachid/projinf6/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp
===================================================================
--- b:/users/tzachid/projinf6/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp          (revision 6618)
+++ b:/users/tzachid/projinf6/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp       (revision 6619)
@@ -3178,9 +3178,6 @@
                ipoib_port_ref( p_port, ref_send_packets );
                cl_obj_unlock( &p_adapter->obj );

-              if (NET_BUFFER_LIST_NEXT_NBL(net_buffer_list) != NULL) {
-                              cl_dbg_out("Recieved a list of NBLS ................\n");
-              }

                for (curr_net_buffer_list = net_buffer_list;
                                curr_net_buffer_list != NULL;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101006/8d593327/attachment.html>


More information about the ofw mailing list