All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] OpenSM: dfsssp - send multicast forwarding tables to switches
@ 2013-10-03 15:03 Jens Domke
  2013-10-03 15:03 ` [PATCH 2/5] " Jens Domke
  2013-10-07 12:42 ` [PATCH 1/5] " Hal Rosenstock
  0 siblings, 2 replies; 4+ messages in thread
From: Jens Domke @ 2013-10-03 15:03 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Hal Rosenstock, Torsten Hoefler

Issue: dfsssp calculates mcast forwarding tables but doesn't
distribute them to the switches, because is_mc_member/num_of_mcm
for each switch was reset to 0 in osm_mcast_mgr.c.
dfsssp relies on this data to figure out with switch is involved
in the mcast group.

Fix: recalculate is_mc_member/num_of_mcm similar to the code
of create_mgrp_switch_map(...) in osm_mcast_mgr.c right before
the update_mcft function and reset to 0 afterwards.

Signed-off-by: Jens Domke <domke.j.aa@m.titech.ac.jp>
---
 opensm/osm_ucast_dfsssp.c |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/opensm/osm_ucast_dfsssp.c b/opensm/osm_ucast_dfsssp.c
index ef7de59..9c34795 100644
--- a/opensm/osm_ucast_dfsssp.c
+++ b/opensm/osm_ucast_dfsssp.c
@@ -1544,6 +1544,43 @@ static int update_lft(osm_ucast_mgr_t * p_mgr, vertex_t * adj_list,
 	return 0;
 }
 
+/* the function updates the multicast group membership information
+   similar to create_mgrp_switch_map (osm_mcast_mgr.c)
+   => with it we can identify if a switch needs to be processed
+   or not in update_mcft
+*/
+static void update_mgrp_membership(cl_qlist_t * port_list)
+{
+	osm_mcast_work_obj_t *wobj = NULL;
+	osm_port_t *port = NULL;
+	osm_switch_t *sw = NULL;
+	cl_list_item_t *i = NULL;
+
+	for (i = cl_qlist_head(port_list); i != cl_qlist_end(port_list);
+	     i = cl_qlist_next(i)) {
+		wobj = cl_item_obj(i, wobj, list_item);
+		port = wobj->p_port;
+		if (port->p_node->sw) {
+			sw = port->p_node->sw;
+			sw->is_mc_member = 1;
+		} else {
+			sw = port->p_physp->p_remote_physp->p_node->sw;
+			sw->num_of_mcm++;
+		}
+	}
+}
+
+/* reset is_mc_member and num_of_mcm for future computations */
+static void reset_mgrp_membership(vertex_t * adj_list, uint32_t adj_list_size)
+{
+	uint32_t i = 0;
+
+	for (i = 1; i < adj_list_size; i++) {
+		adj_list[i].sw->is_mc_member = 0;
+		adj_list[i].sw->num_of_mcm = 0;
+	}
+}
+
 /* update the multicast forwarding tables of all switches with the informations
    from the previous dijsktra step for the current mlid
 */
@@ -2386,6 +2423,11 @@ static ib_api_status_t dfsssp_do_mcast_routing(void * context,
 		goto Exit;
 	}
 
+	/* set mcast group membership again for update_mcft
+	   (unfortunately: osm_mcast_mgr_find_root_switch resets it)
+	 */
+	update_mgrp_membership(&mcastgrp_port_list);
+
 	/* update the mcast forwarding tables of the switches */
 	err = update_mcft(sm, adj_list, adj_list_size, mbox->mlid,
 			  &mcastgrp_port_map, root_sw);
@@ -2398,6 +2440,7 @@ static ib_api_status_t dfsssp_do_mcast_routing(void * context,
 	}
 
 Exit:
+	reset_mgrp_membership(adj_list, adj_list_size);
 	osm_mcast_drop_port_list(&mcastgrp_port_list);
 	OSM_LOG_EXIT(sm->p_log);
 	return status;
-- 
1.7.1

--
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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/5] OpenSM: dfsssp - send multicast forwarding tables to switches
  2013-10-03 15:03 [PATCH 1/5] OpenSM: dfsssp - send multicast forwarding tables to switches Jens Domke
@ 2013-10-03 15:03 ` Jens Domke
  2013-10-07 12:42   ` Hal Rosenstock
  2013-10-07 12:42 ` [PATCH 1/5] " Hal Rosenstock
  1 sibling, 1 reply; 4+ messages in thread
From: Jens Domke @ 2013-10-03 15:03 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Hal Rosenstock, Torsten Hoefler

Issue: root switch of the mcast spanning tree was ignored.
When a port of the root switch is part of the mcast group, then
it won't be processed and non of its ports will be part of
the resulting mcast forwarding table.

Fix: remove the test for used_link==NULL, because all switches in
adj_list should have a used_link set by the prior dijkstra step
(except the root switch) => test not needed and root switch will
be included in mcast update.

Signed-off-by: Jens Domke <domke.j.aa@m.titech.ac.jp>
---
 opensm/osm_ucast_dfsssp.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/opensm/osm_ucast_dfsssp.c b/opensm/osm_ucast_dfsssp.c
index 9c34795..219f8bb 100644
--- a/opensm/osm_ucast_dfsssp.c
+++ b/opensm/osm_ucast_dfsssp.c
@@ -1607,13 +1607,11 @@ static int update_mcft(osm_sm_t * p_sm, vertex_t * adj_list,
 			" (%s) for MLID 0x%X\n", cl_ntoh64(adj_list[i].guid),
 			p_sw->p_node->print_desc, mlid_ho);
 
-		/* if a) no route goes thru this switch  or
-		      b) the switch does not support mcast  or
-		      c) no ports of this switch are part or the mcast group
+		/* if a) the switch does not support mcast  or
+		      b) no ports of this switch are part or the mcast group
 		   then cycle
 		 */
-		if (!(adj_list[i].used_link) ||
-		    osm_switch_supports_mcast(p_sw) == FALSE ||
+		if (osm_switch_supports_mcast(p_sw) == FALSE ||
 		    (p_sw->num_of_mcm == 0 && !(p_sw->is_mc_member)))
 			continue;
 
-- 
1.7.1

--
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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/5] OpenSM: dfsssp - send multicast forwarding tables to switches
  2013-10-03 15:03 [PATCH 1/5] OpenSM: dfsssp - send multicast forwarding tables to switches Jens Domke
  2013-10-03 15:03 ` [PATCH 2/5] " Jens Domke
@ 2013-10-07 12:42 ` Hal Rosenstock
  1 sibling, 0 replies; 4+ messages in thread
From: Hal Rosenstock @ 2013-10-07 12:42 UTC (permalink / raw)
  To: Jens Domke; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Torsten Hoefler

On 10/3/2013 11:03 AM, Jens Domke wrote:
> Issue: dfsssp calculates mcast forwarding tables but doesn't
> distribute them to the switches, because is_mc_member/num_of_mcm
> for each switch was reset to 0 in osm_mcast_mgr.c.
> dfsssp relies on this data to figure out with switch is involved
> in the mcast group.
> 
> Fix: recalculate is_mc_member/num_of_mcm similar to the code
> of create_mgrp_switch_map(...) in osm_mcast_mgr.c right before
> the update_mcft function and reset to 0 afterwards.
> 
> Signed-off-by: Jens Domke <domke.j.aa@m.titech.ac.jp>

Thanks. Applied.

-- Hal
--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/5] OpenSM: dfsssp - send multicast forwarding tables to switches
  2013-10-03 15:03 ` [PATCH 2/5] " Jens Domke
@ 2013-10-07 12:42   ` Hal Rosenstock
  0 siblings, 0 replies; 4+ messages in thread
From: Hal Rosenstock @ 2013-10-07 12:42 UTC (permalink / raw)
  To: Jens Domke; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Torsten Hoefler

On 10/3/2013 11:03 AM, Jens Domke wrote:
> Issue: root switch of the mcast spanning tree was ignored.
> When a port of the root switch is part of the mcast group, then
> it won't be processed and non of its ports will be part of
> the resulting mcast forwarding table.
> 
> Fix: remove the test for used_link==NULL, because all switches in
> adj_list should have a used_link set by the prior dijkstra step
> (except the root switch) => test not needed and root switch will
> be included in mcast update.
> 
> Signed-off-by: Jens Domke <domke.j.aa@m.titech.ac.jp>

Thanks. Applied.

-- Hal
--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-07 12:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-03 15:03 [PATCH 1/5] OpenSM: dfsssp - send multicast forwarding tables to switches Jens Domke
2013-10-03 15:03 ` [PATCH 2/5] " Jens Domke
2013-10-07 12:42   ` Hal Rosenstock
2013-10-07 12:42 ` [PATCH 1/5] " Hal Rosenstock

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.