[openib-general] Is an umad_close_port a good idea after I disconnect from the SA with osm_vendor_delete ?
Sasha Khapyorsky
sashak at voltaire.com
Mon Nov 27 08:43:07 PST 2006
On 14:13 Mon 27 Nov , Bub Thomas wrote:
>
> Sasha,
> whom to ask to add this to the osm_vendor functions?
Please test this patch:
diff --git a/osm/libvendor/osm_vendor_ibumad.c b/osm/libvendor/osm_vendor_ibumad.c
index e82695f..4205b23 100644
--- a/osm/libvendor/osm_vendor_ibumad.c
+++ b/osm/libvendor/osm_vendor_ibumad.c
@@ -545,10 +545,15 @@ osm_vendor_delete(
umad_receiver_t *p_ur;
int agent_id;
- /* unregister UMAD agents */
- for (agent_id = 0; agent_id < UMAD_CA_MAX_AGENTS; agent_id++)
- if ( (*pp_vend)->agents[agent_id] )
- umad_unregister( (*pp_vend)->umad_port_id, agent_id );
+ if ((*pp_vend)->umad_port_id >= 0) {
+ /* unregister UMAD agents */
+ for (agent_id = 0; agent_id < UMAD_CA_MAX_AGENTS; agent_id++)
+ if ( (*pp_vend)->agents[agent_id] )
+ umad_unregister((*pp_vend)->umad_port_id,
+ agent_id );
+ umad_close_port((*pp_vend)->umad_port_id);
+ (*pp_vend)->umad_port_id = -1;
+ }
clear_madw( *pp_vend );
/* make sure all ports are closed */
> Or should I file a bug for this
Good idea too.
Sasha
More information about the general
mailing list