[IPOIB/IPOIB_NDIS6_CM] fix the problem when IPoIB increments the receive statistics...
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 13 Jan 2010 17:39:56 +0000 (17:39 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 13 Jan 2010 17:39:56 +0000 (17:39 +0000)
Signed-off by: Tzachi Dar (tzachid at mellanox.co.il)
Signed-off by: Alex Naslednikov (xalex@mellanox.co.il)

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

ulp/ipoib/kernel/ipoib_port.c
ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp

index 3773c7c..3953126 100644 (file)
@@ -2136,7 +2136,6 @@ __recv_mgr_filter(
                }\r
                else\r
                {\r
-                       ip_stat_sel_t               ip_stat;\r
                        p_desc->len =\r
                                len + sizeof(eth_hdr_t) - sizeof(ipoib_hdr_t);\r
                        if( p_dst->h_mcast)\r
@@ -2147,22 +2146,18 @@ __recv_mgr_filter(
                                        p_dst->dgid.multicast.raw_group_id[13] == 0xFF )\r
                                {\r
                                        p_desc->type = PKT_TYPE_BCAST;\r
-                                       ip_stat = IP_STAT_BCAST_BYTES;\r
                                }\r
                                else\r
                                {\r
                                        p_desc->type = PKT_TYPE_MCAST;\r
-                                       ip_stat = IP_STAT_MCAST_BYTES;\r
                                }\r
                        }\r
                        else\r
                        {\r
                                p_desc->type = PKT_TYPE_UCAST;\r
-                               ip_stat = IP_STAT_UCAST_BYTES;\r
                                \r
                        }\r
                        cl_qlist_insert_tail( p_done_list, &p_desc->item.list_item );\r
-                       ipoib_inc_recv_stat( p_port->p_adapter,ip_stat , len );  \r
                }\r
        }\r
 \r
index ee60eed..2bff845 100644 (file)
@@ -2958,7 +2958,6 @@ __recv_mgr_prepare_NBL(
 {\r
        NDIS_STATUS                                                     status;\r
        uint32_t                                                        pkt_filter;\r
-       ip_stat_sel_t                                           type;\r
        //NDIS60\r
        NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO       chksum;\r
        //NDIS_TCP_IP_CHECKSUM_PACKET_INFO      chksum;\r
@@ -2980,14 +2979,12 @@ __recv_mgr_prepare_NBL(
                        pkt_filter & NDIS_PACKET_TYPE_DIRECTED )\r
                {\r
                        /* OK to report. */\r
-                       type = IP_STAT_UCAST_BYTES;\r
                        status = NDIS_STATUS_SUCCESS;\r
                        IPOIB_PRINT( TRACE_LEVEL_VERBOSE, IPOIB_DBG_ERROR,\r
                        ("Received UCAST PKT.\n"));\r
                }\r
                else\r
                {\r
-                       type = IP_STAT_DROPPED;\r
                        status = NDIS_STATUS_FAILURE;\r
                        IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,\r
                                ("Received UCAST PKT with ERROR !!!!\n"));\r
@@ -2998,14 +2995,12 @@ __recv_mgr_prepare_NBL(
                        pkt_filter & NDIS_PACKET_TYPE_BROADCAST )\r
                {\r
                        /* OK to report. */\r
-                       type = IP_STAT_BCAST_BYTES;\r
                        status = NDIS_STATUS_SUCCESS;\r
                        IPOIB_PRINT( TRACE_LEVEL_VERBOSE, IPOIB_DBG_RECV,\r
                        ("Received BCAST PKT.\n"));\r
                }\r
                else\r
                {\r
-                       type = IP_STAT_DROPPED;\r
                        status = NDIS_STATUS_FAILURE;\r
                        IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,\r
                        ("Received BCAST PKT with ERROR !!!!\n"));\r
@@ -3017,14 +3012,12 @@ __recv_mgr_prepare_NBL(
                        pkt_filter & NDIS_PACKET_TYPE_MULTICAST )\r
                {\r
                        /* OK to report. */\r
-                       type = IP_STAT_MCAST_BYTES;\r
                        status = NDIS_STATUS_SUCCESS;\r
                        IPOIB_PRINT( TRACE_LEVEL_VERBOSE, IPOIB_DBG_RECV,\r
                        ("Received UCAST PKT.\n"));\r
                }\r
                else\r
                {\r
-                       type = IP_STAT_DROPPED;\r
                        status = NDIS_STATUS_FAILURE;\r
                        IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,\r
                        ("Received MCAST PKT with ERROR !!!!\n"));\r
@@ -3034,7 +3027,6 @@ __recv_mgr_prepare_NBL(
 \r
        if( status != NDIS_STATUS_SUCCESS )\r
        {\r
-               ipoib_inc_recv_stat( p_port->p_adapter, type, 0, 0 );\r
                /* Return the receive descriptor to the pool. */\r
                __buf_mgr_put_recv( p_port, p_desc, NULL );\r
                IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,\r
@@ -3088,7 +3080,6 @@ __recv_mgr_prepare_NBL(
                (void*)(uintn_t)chksum.Value;\r
                break;\r
        }\r
-       ipoib_inc_recv_stat( p_port->p_adapter, type, p_desc->len, 1 );\r
 \r
        IPOIB_EXIT( IPOIB_DBG_RECV );\r
        return IB_SUCCESS;\r