[ofa-general] [PATCH] Fix the osm_epi_node_id_t structure name.

Ira Weiny weiny2 at llnl.gov
Tue Aug 14 16:21:48 PDT 2007


>From 6e01f304c1d1cbd8d1163708d907ec0550a0ca31 Mon Sep 17 00:00:00 2001
From: Ira K. Weiny <weiny2 at llnl.gov>
Date: Wed, 25 Jul 2007 11:33:08 -0700
Subject: [PATCH] Fix the osm_epi_node_id_t structure name.

   The structure osm_epi_node_id_t describes a port.

Signed-off-by: Ira K. Weiny <weiny2 at llnl.gov>
---
 opensm/include/opensm/osm_event_plugin.h   |   20 ++++++++++----------
 opensm/opensm/osm_perfmgr_db.c             |    4 ++--
 opensm/osmeventplugin/src/osmeventplugin.c |   24 ++++++++++++------------
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/opensm/include/opensm/osm_event_plugin.h b/opensm/include/opensm/osm_event_plugin.h
index 57d9e05..b575d2a 100644
--- a/opensm/include/opensm/osm_event_plugin.h
+++ b/opensm/include/opensm/osm_event_plugin.h
@@ -83,7 +83,7 @@ typedef struct {
 	uint64_t   node_guid;
 	uint8_t    port_num;
 	char       node_name[OSM_EPI_NODE_NAME_LEN];
-} osm_epi_node_id_t;
+} osm_epi_port_id_t;
 
 /** =========================================================================
  * Port error event
@@ -91,7 +91,7 @@ typedef struct {
  * This is a difference from the last reading.  NOT an absolute reading.
  */
 typedef struct {
-	osm_epi_node_id_t node_id;
+	osm_epi_port_id_t port_id;
 	uint64_t          symbol_err_cnt;
 	uint64_t          link_err_recover;
 	uint64_t          link_downed;
@@ -112,7 +112,7 @@ typedef struct {
  * This is a difference from the last reading.  NOT an absolute reading.
  */
 typedef struct {
-	osm_epi_node_id_t node_id;
+	osm_epi_port_id_t port_id;
 	uint64_t          xmit_data;
 	uint64_t          rcv_data;
 	uint64_t          xmit_pkts;
@@ -129,7 +129,7 @@ typedef struct {
  * This is a difference from the last reading.  NOT an absolute reading.
  */
 typedef struct {
-	osm_epi_node_id_t node_id;
+	osm_epi_port_id_t port_id;
 	uint64_t          xmit_wait;
 	time_t            time_diff_s;
 } osm_epi_ps_event_t;
@@ -138,7 +138,7 @@ typedef struct {
  * Trap events
  */
 typedef struct {
-	osm_epi_node_id_t node_id;
+	osm_epi_port_id_t port_id;
 	uint8_t           type;
 	uint32_t          prod_type;
 	uint16_t          trap_num;
@@ -189,13 +189,13 @@ void              osm_epi_report(osm_epi_plugin_t *plugin,
  * Helper functions
  */
 static inline void
-osm_epi_create_node_id(osm_epi_node_id_t *node_id, uint64_t node_guid,
+osm_epi_create_port_id(osm_epi_port_id_t *port_id, uint64_t node_guid,
 			uint8_t port_num, char *node_name)
 {
-	node_id->node_guid = node_guid;
-	node_id->port_num = port_num;
-	strncpy(node_id->node_name, node_name, OSM_EPI_NODE_NAME_LEN);
-	node_id->node_name[OSM_EPI_NODE_NAME_LEN-1] = '\0';
+	port_id->node_guid = node_guid;
+	port_id->port_num = port_num;
+	strncpy(port_id->node_name, node_name, OSM_EPI_NODE_NAME_LEN);
+	port_id->node_name[OSM_EPI_NODE_NAME_LEN-1] = '\0';
 }
 
 END_C_DECLS
diff --git a/opensm/opensm/osm_perfmgr_db.c b/opensm/opensm/osm_perfmgr_db.c
index 2a1c94b..4c82673 100644
--- a/opensm/opensm/osm_perfmgr_db.c
+++ b/opensm/opensm/osm_perfmgr_db.c
@@ -253,7 +253,7 @@ perfmgr_db_add_err_reading(perfmgr_db_t *db, uint64_t guid,
 	debug_dump_err_reading(db, guid, port, p_port, reading);
 
 	epi_pe_data.time_diff_s = (reading->time - previous->time);
-	osm_epi_create_node_id(&(epi_pe_data.node_id), guid, port, node->node_name);
+	osm_epi_create_port_id(&(epi_pe_data.port_id), guid, port, node->node_name);
 
 	/* calculate changes from previous reading */
 	epi_pe_data.symbol_err_cnt = (reading->symbol_err_cnt - previous->symbol_err_cnt);
@@ -378,7 +378,7 @@ perfmgr_db_add_dc_reading(perfmgr_db_t *db, uint64_t guid,
 	debug_dump_dc_reading(db, guid, port, p_port, reading);
 
 	epi_dc_data.time_diff_s = (reading->time - previous->time);
-	osm_epi_create_node_id(&(epi_dc_data.node_id), guid, port, node->node_name);
+	osm_epi_create_port_id(&(epi_dc_data.port_id), guid, port, node->node_name);
 
 	/* calculate changes from previous reading */
 	epi_dc_data.xmit_data = (reading->xmit_data - previous->xmit_data);
diff --git a/opensm/osmeventplugin/src/osmeventplugin.c b/opensm/osmeventplugin/src/osmeventplugin.c
index d315eb6..9307639 100644
--- a/opensm/osmeventplugin/src/osmeventplugin.c
+++ b/opensm/osmeventplugin/src/osmeventplugin.c
@@ -108,9 +108,9 @@ handle_port_counter(_log_events_t *log, osm_epi_pe_event_t *pc)
 		|| pc->vl15_dropped > 0) {
 		fprintf(log->log_file,
 			"Port counter errors for node 0x%"PRIx64" (%s) port %d\n",
-			pc->node_id.node_guid,
-			pc->node_id.node_name,
-			pc->node_id.port_num);
+			pc->port_id.node_guid,
+			pc->port_id.node_name,
+			pc->port_id.port_num);
 	}
 }
 
@@ -121,9 +121,9 @@ handle_port_counter_ext(_log_events_t *log, osm_epi_dc_event_t *epc)
 {
 	fprintf(log->log_file,
 		"Recieved Data counters for node 0x%"PRIx64" (%s) port %d\n",
-		epc->node_id.node_guid,
-		epc->node_id.node_name,
-		epc->node_id.port_num);
+		epc->port_id.node_guid,
+		epc->port_id.node_name,
+		epc->port_id.port_num);
 }
 
 /** =========================================================================
@@ -134,9 +134,9 @@ handle_port_select(_log_events_t *log, osm_epi_ps_event_t *ps)
 	if (ps->xmit_wait > 0) {
 		fprintf(log->log_file,
 			"Port select Xmit Wait counts for node 0x%"PRIx64" (%s) port %d\n",
-			ps->node_id.node_guid,
-			ps->node_id.node_name,
-			ps->node_id.port_num);
+			ps->port_id.node_guid,
+			ps->port_id.node_name,
+			ps->port_id.port_num);
 	}
 }
 
@@ -148,9 +148,9 @@ handle_trap_event(_log_events_t *log, osm_epi_trap_event_t *trap)
 	fprintf(log->log_file,
 		"Trap event %d from 0x%"PRIx64" (%s) port %d\n",
 		trap->trap_num,
-		trap->node_id.node_guid,
-		trap->node_id.node_name,
-		trap->node_id.port_num);
+		trap->port_id.node_guid,
+		trap->port_id.node_name,
+		trap->port_id.port_num);
 }
 
 /** =========================================================================
-- 
1.5.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-the-osm_epi_node_id_t-structure-name.patch
Type: application/octet-stream
Size: 5856 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20070814/69525115/attachment.obj>


More information about the general mailing list