[IBAL]attach QP to MC group only in case of full member join
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 14 Dec 2006 11:30:55 +0000 (11:30 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 14 Dec 2006 11:30:55 +0000 (11:30 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@560 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/al_mcast.c
ulp/ipoib/kernel/ipoib_adapter.c
ulp/ipoib/kernel/ipoib_port.c
ulp/ipoib/kernel/ipoib_port.h

index 7dfca76..fbf1feb 100644 (file)
@@ -503,9 +503,14 @@ join_async_cb(
                         */\r
                        h_mcast->state = SA_REG_ACTIVE;\r
                        /* Attach the QP to the multicast group. */\r
-                       status = verbs_attach_mcast(h_mcast);\r
-                       if( status == IB_SUCCESS )\r
-                               mcast_rec.h_mcast = h_mcast;\r
+                       if(ib_member_get_state(mcast_rec.p_member_rec->scope_state) == IB_MC_REC_STATE_FULL_MEMBER)\r
+                       {\r
+                               status = verbs_attach_mcast(h_mcast);\r
+                               if( status != IB_SUCCESS )\r
+                                       AL_PRINT( TRACE_LEVEL_ERROR, AL_DBG_MCAST, ("attach_mcast failed\n") );\r
+                       }\r
+                       mcast_rec.h_mcast = h_mcast;\r
+                       \r
                }\r
                else\r
                {\r
index 97eef50..0434814 100644 (file)
@@ -756,7 +756,7 @@ ipoib_refresh_mcast(
                        if( j != p_adapter->mcast_array_size )\r
                                continue;\r
 \r
-                       ipoib_port_join_mcast( p_port, p_mac_array[i] );\r
+                       ipoib_port_join_mcast( p_port, p_mac_array[i] ,IB_MC_REC_STATE_FULL_MEMBER);\r
                }\r
        }\r
 \r
@@ -976,7 +976,7 @@ ipoib_set_active(
                for( i = 0; i < p_adapter->mcast_array_size; i++ )\r
                {\r
                        ipoib_port_join_mcast(\r
-                               p_adapter->p_port, p_adapter->mcast_array[i] );\r
+                               p_adapter->p_port, p_adapter->mcast_array[i] ,IB_MC_REC_STATE_FULL_MEMBER);\r
                }\r
 \r
                /* Register all existing addresses. */\r
index eb3981b..f1d1a61 100644 (file)
@@ -1241,9 +1241,9 @@ __buf_mgr_put_recv_list(
        IN                              ipoib_port_t* const                     p_port,\r
        IN                              cl_qlist_t* const                       p_list )\r
 {\r
-       IPOIB_ENTER(  IPOIB_DBG_RECV );\r
+       //IPOIB_ENTER(  IPOIB_DBG_RECV );\r
        cl_qpool_put_list( &p_port->buf_mgr.recv_pool, p_list );\r
-       IPOIB_EXIT(  IPOIB_DBG_RECV );\r
+       //IPOIB_EXIT(  IPOIB_DBG_RECV );\r
 }\r
 \r
 \r
@@ -1388,7 +1388,7 @@ __recv_mgr_repost(
                if( !p_next )\r
                {\r
                        IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,\r
-                               ("Out of receive descriptors!\n") );\r
+                               ("Out of receive descriptors! recv queue depath 0x%x\n",p_port->recv_mgr.depth) );\r
                        break;\r
                }\r
 \r
@@ -3503,7 +3503,8 @@ __send_mgr_queue(
        if( status == NDIS_STATUS_NO_ROUTE_TO_DESTINATION &&\r
                ETH_IS_MULTICAST( p_eth_hdr->dst.addr ) )\r
        {\r
-               if( ipoib_port_join_mcast( p_port, p_eth_hdr->dst ) == IB_SUCCESS )\r
+               if( ipoib_port_join_mcast( p_port, p_eth_hdr->dst, \r
+                       IB_MC_REC_STATE_SEND_ONLY_MEMBER) == IB_SUCCESS )\r
                {\r
                        IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SEND,\r
                                ("Multicast Mac - trying to join.\n") );\r
@@ -3775,8 +3776,8 @@ ipoib_port_resume(
 \r
                        if( ETH_IS_MULTICAST( p_eth_hdr->dst.addr ) )\r
                        {\r
-                               if( ipoib_port_join_mcast( p_port, p_eth_hdr->dst ) ==\r
-                                       IB_SUCCESS )\r
+                               if( ipoib_port_join_mcast( p_port, p_eth_hdr->dst,\r
+                                       IB_MC_REC_STATE_SEND_ONLY_MEMBER) == IB_SUCCESS )\r
                                {\r
                                        IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SEND,\r
                                                ("Multicast Mac - trying to join.\n") );\r
@@ -5322,7 +5323,8 @@ __ib_mgr_activate(
 ib_api_status_t\r
 ipoib_port_join_mcast(\r
        IN                              ipoib_port_t* const                     p_port,\r
-       IN              const   mac_addr_t                                      mac )\r
+       IN              const   mac_addr_t                              mac,\r
+       IN              const   uint8_t                                 state)\r
 {\r
        ib_api_status_t         status;\r
        ib_mcast_req_t          mcast_req;\r
@@ -5356,7 +5358,8 @@ ipoib_port_join_mcast(
        /* Clear fields that aren't specified in the join */\r
        mcast_req.member_rec.mlid = 0;\r
        mcast_req.member_rec.mtu = 0;\r
-       mcast_req.member_rec.rate = 0;  \r
+       mcast_req.member_rec.rate = 0;\r
+       ib_member_set_state( &mcast_req.member_rec.scope_state,state);\r
 \r
        if( mac.addr[0] == 1 && mac.addr[1] == 0 && mac.addr[2] == 0x5E )\r
        {\r
index c7322d7..046d150 100644 (file)
@@ -565,7 +565,8 @@ ipoib_port_down(
 ib_api_status_t\r
 ipoib_port_join_mcast(\r
        IN                              ipoib_port_t* const                     p_port,\r
-       IN              const   mac_addr_t                                      mac );\r
+       IN              const   mac_addr_t                              mac,\r
+       IN              const   uint8_t                                 state );\r
 \r
 void\r
 ipoib_port_remove_endpt(\r