[IPOIB] filter out packets with payload MTU bigger then our adapter payload MTU
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 23 Nov 2006 14:18:13 +0000 (14:18 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 23 Nov 2006 14:18:13 +0000 (14:18 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@547 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib/kernel/ipoib_port.c

index 36ef586..26c6ee2 100644 (file)
@@ -1886,6 +1886,17 @@ __recv_mgr_filter(
                        continue;\r
                }\r
 \r
+               if((len - sizeof(ipoib_hdr_t)) > p_port->p_adapter->params.payload_mtu)\r
+               {\r
+                       IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,\r
+                               ("Received ETH packet > payload MTU (%d)\n",\r
+                               p_port->p_adapter->params.payload_mtu) );\r
+                       ipoib_inc_recv_stat( p_port->p_adapter, IP_STAT_ERROR, 0 );\r
+                       cl_qlist_insert_tail( p_bad_list, &p_desc->item.list_item );\r
+                       ipoib_port_deref( p_port, ref_recv_inv_len );\r
+                       continue;\r
+                       \r
+               }\r
                /* Successful completion.  Get the receive information. */\r
                cl_perf_start( GetRecvEndpts );\r
                __recv_get_endpts( p_port, p_desc, p_wc, &p_src, &p_dst );\r