From: Slava Strebkov <slavas-hKgKHo2Ms0F+cjeuK/JdrQ@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org
Subject: [PATCH] opensm: EPI new event for duplicated node guid
Date: Wed, 10 Mar 2010 14:14:44 +0200 [thread overview]
Message-ID: <4B978D34.1050807@Voltaire.COM> (raw)
Added new event for plugin reporting duplicated guid.
Signed-off-by: Slava Strebkov <slavas-smomgflXvOZWk0Htik3J/w@public.gmane.org>
---
opensm/include/opensm/osm_event_plugin.h | 1 +
opensm/opensm/osm_node_info_rcv.c | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/opensm/include/opensm/osm_event_plugin.h b/opensm/include/opensm/osm_event_plugin.h
index 33d1920..7c4ed93 100644
--- a/opensm/include/opensm/osm_event_plugin.h
+++ b/opensm/include/opensm/osm_event_plugin.h
@@ -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;
diff --git a/opensm/opensm/osm_node_info_rcv.c b/opensm/opensm/osm_node_info_rcv.c
index b3e272c..db97df6 100644
--- a/opensm/opensm/osm_node_info_rcv.c
+++ b/opensm/opensm/osm_node_info_rcv.c
@@ -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_pe_event_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.port_id,
+ 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);
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reply other threads:[~2010-03-10 12:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B978D34.1050807@Voltaire.COM \
--to=slavas-hkgkho2ms0f+cjeuk/jdrq@public.gmane.org \
--cc=Sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.