[ofw] FW: It seems that there are several places where the function __send_mgr_filter_udp is returning pending

Tzachi Dar tzachid at mellanox.co.il
Sun Dec 26 07:55:17 PST 2010


Below is the formal patch to the place where the code seems to be very confusing (no functionality change).

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 7084)
+++ B:/users/tzachid/projinf6/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp           (working copy)
@@ -4596,16 +4596,15 @@
                                status = __send_mgr_filter_udp( p_ip_hdr, p_mdl,
                                        (buf_len - hdr_size), p_eth_hdr->type, s_buf );
                                cl_perf_stop( &p_port->p_adapter->perf, FilterUdp );
-                              if( status == NDIS_STATUS_PENDING )
-                              {  /* not DHCP packet, keep going */
-                                              if( ETH_IS_MULTICAST( p_eth_hdr->dst.addr ) )
-                                                              p_desc->send_dir = SEND_UD_QP;
-                                              else
-                                                              p_desc->send_dir = SEND_RC_QP;
-                                              break;
+                             if( status != NDIS_STATUS_PENDING ) {
+                                             return status;
                                }
-                              return status;
-
+                               /* not DHCP packet, keep going */
+                             if( ETH_IS_MULTICAST( p_eth_hdr->dst.addr ) )
+                                             p_desc->send_dir = SEND_UD_QP;
+                             else
+                                             p_desc->send_dir = SEND_RC_QP;
+                             break;
                case IP_PROT_TCP:
                                p_desc->send_dir = SEND_RC_QP;
                                break;

From: Alex Naslednikov
Sent: Sunday, December 26, 2010 9:20 AM
To: Tzachi Dar; Galina Tcharny; Uri Habusha
Cc: Gilad Margalit
Subject: RE: It seems that there are several places where the function __send_mgr_filter_udp is returning pending

I agree.
Can you send it to the community, please ?

From: Tzachi Dar
Sent: Thursday, December 23, 2010 12:38 PM
To: Tzachi Dar; Alex Naslednikov; Galina Tcharny; Uri Habusha
Cc: Gilad Margalit
Subject: RE: It seems that there are several places where the function __send_mgr_filter_udp is returning pending

OK, my mistake.


The following code got me confused.

                                if( status == NDIS_STATUS_PENDING )
                                {  /* not DHCP packet, keep going */
                                                if( ETH_IS_MULTICAST( p_eth_hdr->dst.addr ) )
                                                                p_desc->send_dir = SEND_UD_QP;
                                                else
                                                                p_desc->send_dir = SEND_RC_QP;
                                                break;
                                }
                                return status;

Please note that it is not clear that the function will return.

I'll change it with

                                if( status != NDIS_STATUS_PENDING )
                                {
                                                Return status;
}
                                 /* not DHCP packet, keep going */
                                                if( ETH_IS_MULTICAST( p_eth_hdr->dst.addr ) )
                                                                p_desc->send_dir = SEND_UD_QP;
                                                else
                                                                p_desc->send_dir = SEND_RC_QP;
                break;




From: Tzachi Dar
Sent: Thursday, December 23, 2010 10:39 AM
To: Alex Naslednikov; Galina Tcharny; Uri Habusha
Cc: Tzachi Dar
Subject: It seems that there are several places where the function __send_mgr_filter_udp is returning pending

If I understand correctly this will cause the packets not to be sent.

Is this by design? Is this something that I don't understand?

Thanks
Tzachi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101226/04bc1e32/attachment.html>


More information about the ofw mailing list