[ipoib] Fix handling of UDP fragments.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 27 Jan 2009 11:19:22 +0000 (11:19 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 27 Jan 2009 11:19:22 +0000 (11:19 +0000)
Signed of by:xalex@mellanox.co.il

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1891 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib/kernel/ipoib_port.c

index 7ebcc87..937cf5d 100644 (file)
@@ -3403,6 +3403,18 @@ __send_mgr_filter_udp(
 \r
        IPOIB_ENTER( IPOIB_DBG_SEND );\r
 \r
+       if (p_ip_hdr->offset > 0) {\r
+               /* This is a fragmented part of UDP packet\r
+                * Only first packet will contain UDP header in such case\r
+                * So, return if offset > 0\r
+                */\r
+               cl_perf_start( SendUdp );\r
+               status = __send_gen( p_port, p_desc,0 );\r
+               cl_perf_stop( &p_port->p_adapter->perf, SendUdp );\r
+               IPOIB_EXIT( IPOIB_DBG_SEND );\r
+               return status;\r
+       }\r
+       \r
        if( !buf_len )\r
        {\r
                cl_perf_start( QueryUdp );\r
@@ -3426,7 +3438,7 @@ __send_mgr_filter_udp(
        {\r
                p_udp_hdr = (udp_hdr_t*)GetIpPayloadPtr(p_ip_hdr);\r
        }\r
-       /* Get the UDP header and check the destination port numbers. */\r
+       \r
        if( buf_len < sizeof(udp_hdr_t) )\r
        {\r
                IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,\r
@@ -3434,6 +3446,7 @@ __send_mgr_filter_udp(
                return NDIS_STATUS_BUFFER_TOO_SHORT;\r
        }\r
 \r
+       /* Get the UDP header and check the destination port numbers. */\r
        if( (p_udp_hdr->src_port != DHCP_PORT_CLIENT ||\r
                p_udp_hdr->dst_port != DHCP_PORT_SERVER) &&\r
                (p_udp_hdr->src_port != DHCP_PORT_SERVER ||\r