[ofa-general] [PATCH] opensm/multicast: remove change id tracking

Sasha Khapyorsky sashak at voltaire.com
Sun Sep 6 10:45:48 PDT 2009


Following previous patch 'opensm: improve multicast re-routing requests
processing' remove multicast change id (last_change_id, last_tree_id),
we don't need to track it anymore i- all requests are processed only
once per mlid.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/include/opensm/osm_multicast.h |   10 ----------
 opensm/opensm/osm_mcast_mgr.c         |   21 ++-------------------
 opensm/opensm/osm_multicast.c         |    7 -------
 3 files changed, 2 insertions(+), 36 deletions(-)

diff --git a/opensm/include/opensm/osm_multicast.h b/opensm/include/opensm/osm_multicast.h
index eda447e..ce3d310 100644
--- a/opensm/include/opensm/osm_multicast.h
+++ b/opensm/include/opensm/osm_multicast.h
@@ -128,8 +128,6 @@ typedef struct osm_mgrp {
 	ib_member_rec_t mcmember_rec;
 	boolean_t well_known;
 	boolean_t to_be_deleted;
-	uint32_t last_change_id;
-	uint32_t last_tree_id;
 	unsigned full_members;
 } osm_mgrp_t;
 /*
@@ -163,14 +161,6 @@ typedef struct osm_mgrp {
 *		track the fact the group is about to be deleted so we can
 *		track the fact a new join is actually a create request.
 *
-*	last_change_id
-*		a counter for the number of changes applied to the group.
-*		This counter shuold be incremented on any modification
-*		to the group: joining or leaving of ports.
-*
-*	last_tree_id
-*		the last change id used for building the current tree.
-*
 * SEE ALSO
 *********/
 
diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c
index dd504ef..0553277 100644
--- a/opensm/opensm/osm_mcast_mgr.c
+++ b/opensm/opensm/osm_mcast_mgr.c
@@ -1039,12 +1039,10 @@ static ib_api_status_t mcast_mgr_process_mgrp(osm_sm_t * sm,
 
 	if (p_mgrp->full_members) {
 		status = mcast_mgr_build_spanning_tree(sm, p_mgrp);
-		if (status != IB_SUCCESS) {
+		if (status != IB_SUCCESS)
 			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A17: "
 				"Unable to create spanning tree (%s)\n",
 				ib_get_err_str(status));
-			goto Exit;
-		}
 	} else  if (p_mgrp->to_be_deleted) {
 		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Destroying mgrp with lid:0x%x\n",
@@ -1054,12 +1052,8 @@ static ib_api_status_t mcast_mgr_process_mgrp(osm_sm_t * sm,
 		cl_fmap_remove_item(&sm->p_subn->mgrp_mgid_tbl,
 				    &p_mgrp->map_item);
 		osm_mgrp_delete(p_mgrp);
-		goto Exit;
 	}
 
-	p_mgrp->last_tree_id = p_mgrp->last_change_id;
-
-Exit:
 	OSM_LOG_EXIT(sm->p_log);
 	return status;
 }
@@ -1201,19 +1195,8 @@ int osm_mcast_mgr_process_mgroups(osm_sm_t * sm)
 		if (!p_mgrp)
 			continue;
 
-		/* if there was no change from the last time
-		 * we processed the group we can skip doing anything
-		 */
-		if (p_mgrp->last_change_id == p_mgrp->last_tree_id) {
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Skip processing mgrp with lid:0x%X change id:%u\n",
-				cl_ntoh16(mlid), p_mgrp->last_change_id);
-			continue;
-		}
-
 		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Processing mgrp with lid:0x%X change id:%u\n",
-			cl_ntoh16(mlid), p_mgrp->last_change_id);
+			"Processing mgrp with lid:0x%x\n", cl_ntoh16(mlid));
 		mcast_mgr_process_mgrp(sm, p_mgrp);
 	}
 
diff --git a/opensm/opensm/osm_multicast.c b/opensm/opensm/osm_multicast.c
index 4b4a6b0..1326161 100644
--- a/opensm/opensm/osm_multicast.c
+++ b/opensm/opensm/osm_multicast.c
@@ -86,8 +86,6 @@ osm_mgrp_t *osm_mgrp_new(IN const ib_net16_t mlid)
 	memset(p_mgrp, 0, sizeof(*p_mgrp));
 	cl_qmap_init(&p_mgrp->mcm_port_tbl);
 	p_mgrp->mlid = mlid;
-	p_mgrp->last_change_id = 0;
-	p_mgrp->last_tree_id = 0;
 	p_mgrp->to_be_deleted = FALSE;
 
 	return p_mgrp;
@@ -167,9 +165,6 @@ osm_mcm_port_t *osm_mgrp_add_port(IN osm_subn_t * subn, osm_log_t * log,
 		p_mcm_port->scope_state =
 		    ib_member_set_scope_state(prev_scope,
 					      prev_join_state | join_state);
-	} else {
-		/* track the fact we modified the group ports */
-		p_mgrp->last_change_id++;
 	}
 
 	if ((join_state & IB_JOIN_STATE_FULL) &&
@@ -211,8 +206,6 @@ int osm_mgrp_remove_port(osm_subn_t * subn, osm_log_t * log, osm_mgrp_t * mgrp,
 		OSM_LOG(log, OSM_LOG_DEBUG, "removing port 0x%" PRIx64 "\n",
 			cl_ntoh64(mcm->port_gid.unicast.interface_id));
 		osm_mcm_port_delete(mcm);
-		/* track the fact we modified the group */
-		mgrp->last_change_id++;
 		ret = 1;
 	}
 
-- 
1.6.4.2




More information about the general mailing list