IPOIB_EXIT( IPOIB_DBG_ENDPT );\r
}\r
\r
-\r
-void\r
-ipoib_port_flush_endpts(\r
- IN ipoib_port_t* const p_port )\r
-{\r
- cl_map_item_t *p_item;\r
- ipoib_endpt_t *p_endpt;\r
-\r
- IPOIB_ENTER( IPOIB_DBG_ENDPT );\r
-\r
- cl_obj_lock( &p_port->obj );\r
- p_item = cl_qmap_head( &p_port->endpt_mgr.mac_endpts );\r
- while( p_item != cl_qmap_end( &p_port->endpt_mgr.mac_endpts ) )\r
- {\r
- p_endpt = PARENT_STRUCT( p_item, ipoib_endpt_t, mac_item );\r
- p_item = cl_qmap_next( p_item );\r
-\r
- /*\r
- * If the endpoint has been marked as expired before, and we have\r
- * an AV handle, free the AV.\r
- */\r
- if( p_endpt->expired && p_endpt->h_av )\r
- {\r
- CL_ASSERT( p_endpt->obj.ref_cnt == 1 );\r
- p_port->p_adapter->p_ifc->destroy_av( p_endpt->h_av );\r
- p_endpt->h_av = NULL;\r
- p_endpt->expired = FALSE;\r
- }\r
-\r
- /*\r
- * If the endpoint is not in use, mark it as expired.\r
- * Note that the ref count is only zero when the endpoint gets\r
- * destroyed, so an endpoint that is not in use has a ref count of 1.\r
- * Also note that we never expire any multicast endpoints.\r
- */\r
- CL_ASSERT( p_endpt->obj.ref_cnt != 0 );\r
- if( p_endpt->obj.ref_cnt == 1 && p_endpt->h_av && !p_endpt->h_mcast )\r
- p_endpt->expired = TRUE;\r
- }\r
- cl_obj_unlock( &p_port->obj );\r
-\r
- IPOIB_EXIT( IPOIB_DBG_ENDPT );\r
-}\r
-\r
-\r
/*\r
* The sequence for port up is as follows:\r
* 1. The port goes active. This allows the adapter to send SA queries\r