Skip to contentSkip to conversation

opensm/osmeventplugin: Added new event for plugin reporting duplicated guid

PATCH New Slava Strebkov 1 participant 1 message Jun 6, 2010 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 opensm/osmeventplugin: Added new event for plugin reporting duplicated guid

When OSM encounters duplicated guid in fabric,
event is sent to EPI.

---
 opensm/include/opensm/osm_event_plugin.h |    1 +
 opensm/opensm/osm_node_info_rcv.c        |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)
opensm/include/opensm/osm_event_plugin.h +1 -0
index 33d1920..7c4ed93 100644
@@ -72,6 +72,7 @@ typedef enum {
 	OSM_EVENT_ID_PORT_SELECT,
 	OSM_EVENT_ID_TRAP,
 	OSM_EVENT_ID_SUBNET_UP,
+	OSM_EVENT_ID_DUPLICATED_GUID,
 	OSM_EVENT_ID_MAX
 } osm_epi_event_id_t;
 
opensm/opensm/osm_node_info_rcv.c +6 -0
index b3e272c..1f7e010 100644
@@ -68,6 +68,7 @@ static void report_duplicated_guid(IN osm_sm_t * sm, osm_physp_t * p_physp,
 {
 	osm_physp_t *p_old, *p_new;
 	osm_dr_path_t path;
+	osm_epi_port_id_t epi_pe_data;
 
 	p_old = p_physp->p_remote_physp;
 	p_new = osm_node_get_physp_ptr(p_neighbor_node, port_num);
@@ -82,6 +83,11 @@ static void report_duplicated_guid(IN osm_sm_t * sm, osm_physp_t * p_physp,
 		cl_ntoh64(p_old->p_node->node_info.node_guid), p_old->port_num,
 		cl_ntoh64(p_new->p_node->node_info.node_guid), p_new->port_num);
 
+	osm_epi_create_port_id(&epi_pe_data,
+		p_physp->p_node->node_info.node_guid, p_physp->port_num,
+		(char*)p_physp->p_node->node_desc.description);
+	osm_opensm_report_event(sm->p_subn->p_osm,
+		OSM_EVENT_ID_DUPLICATED_GUID, &epi_pe_data);
 	osm_dump_dr_path(sm->p_log, osm_physp_get_dr_path_ptr(p_physp),
 			 OSM_LOG_ERROR);
 
Signature · 6 lines
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html