[ofw] [patch] fix forwarding of ipoib

Smith, Stan stan.smith at intel.com
Wed Oct 6 13:12:08 PDT 2010


Hello,
  What's up with posting patches from a source tree which only Mellanox employees can see? Please resubmit patch made against winOFED SVN if you want reasonable feedback.
Obviously this patch does not apply nor is it even close...

Another issue is posting patches in HTML format email, impossible to cut-n-paste; either plain-text or a plain-text patch file attachment - please.

>From what little sense the patch makes without context, it seems to follow what you claim it will do.

Curly braces at ~4250 are not required although they might improve readability in this case.

Speaking of code formatting @ 4250, most of the ipoib code uses the following if statement format:  'if(<sp>condition<sp>)' why do you deviate?
Also 4260.

Why do I care, for the same reasons the Linux community and Microsoft cares.

The 'return' statement @ ~8709, if this is the end of build_send_desc() then it needs to return a value?

grumpy stan.

________________________________
From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
Sent: Wednesday, October 06, 2010 9:42 AM
To: ofw at lists.openfabrics.org
Subject: [ofw] [patch] fix forwarding of ipoib

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/646b104b/attachment.html>


More information about the ofw mailing list