* [PATCH] opensm: configure multicast only once during sweep
@ 2011-01-06 16:39 Eli Dorfman (Voltaire)
[not found] ` <4D25F029.1080005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Eli Dorfman (Voltaire) @ 2011-01-06 16:39 UTC (permalink / raw)
To: Sasha Khapyorsky; +Cc: linux-rdma, Vladimir Koushnir
[PATCH] configure multicast only once during sweep
opensm performed multicast configuration twice during sweep by calling
two different function that are very similar.
remove osm_mcast_mgr_process() which had a bug and didn't clear mlid bit
after configuration and rename osm_mcast_mgr_process_mgroups()
to osm_mcast_mgr_process()
Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org>
---
opensm/opensm/osm_mcast_mgr.c | 46 +----------------------------------------
opensm/opensm/osm_state_mgr.c | 3 +-
2 files changed, 2 insertions(+), 47 deletions(-)
diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c
index e42070d..9e15f2c 100644
--- a/opensm/opensm/osm_mcast_mgr.c
+++ b/opensm/opensm/osm_mcast_mgr.c
@@ -1081,54 +1081,11 @@ static int alloc_mfts(osm_sm_t * sm)
return 0;
}
-int osm_mcast_mgr_process(osm_sm_t * sm)
-{
- int i, ret = 0;
-
- OSM_LOG_ENTER(sm->p_log);
-
- /* While holding the lock, iterate over all the established
- multicast groups, servicing each in turn.
- Then, download the multicast tables to the switches. */
- CL_PLOCK_EXCL_ACQUIRE(sm->p_lock);
-
- /* If there are no switches in the subnet we have nothing to do. */
- if (cl_qmap_count(&sm->p_subn->sw_guid_tbl) == 0) {
- OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
- "No switches in subnet. Nothing to do\n");
- goto exit;
- }
-
- if (alloc_mfts(sm)) {
- OSM_LOG(sm->p_log, OSM_LOG_ERROR,
- "ERR 0A07: alloc_mfts failed\n");
- ret = -1;
- goto exit;
- }
-
- for (i = 0; i <= sm->p_subn->max_mcast_lid_ho - IB_LID_MCAST_START_HO;
- i++)
- if (sm->p_subn->mboxes[i] || sm->mlids_req[i])
- mcast_mgr_process_mlid(sm, i + IB_LID_MCAST_START_HO);
-
- memset(sm->mlids_req, 0, sm->mlids_req_max);
- sm->mlids_req_max = 0;
-
- ret = mcast_mgr_set_mftables(sm);
-
-exit:
- CL_PLOCK_RELEASE(sm->p_lock);
-
- OSM_LOG_EXIT(sm->p_log);
-
- return ret;
-}
-
/**********************************************************************
This is the function that is invoked during idle time to handle the
process request for mcast groups where join/leave/delete was required.
**********************************************************************/
-int osm_mcast_mgr_process_mgroups(osm_sm_t * sm)
+int osm_mcast_mgr_process(osm_sm_t * sm)
{
int ret = 0;
unsigned i;
@@ -1158,7 +1115,6 @@ int osm_mcast_mgr_process_mgroups(osm_sm_t * sm)
mcast_mgr_process_mlid(sm, i + IB_LID_MCAST_START_HO);
}
- memset(sm->mlids_req, 0, sm->mlids_req_max);
sm->mlids_req_max = 0;
ret = mcast_mgr_set_mftables(sm);
diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index 68841f8..ff94cfe 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -69,7 +69,6 @@ extern void osm_drop_mgr_process(IN osm_sm_t * sm);
extern int osm_qos_setup(IN osm_opensm_t * p_osm);
extern int osm_pkey_mgr_process(IN osm_opensm_t * p_osm);
extern int osm_mcast_mgr_process(IN osm_sm_t * sm);
-extern int osm_mcast_mgr_process_mgroups(IN osm_sm_t * sm);
extern int osm_link_mgr_process(IN osm_sm_t * sm, IN uint8_t state);
static void state_mgr_up_msg(IN const osm_sm_t * sm)
@@ -1415,7 +1414,7 @@ static void do_process_mgrp_queue(osm_sm_t * sm)
if (sm->p_subn->sm_state != IB_SMINFO_STATE_MASTER)
return;
if (!sm->p_subn->opt.disable_multicast) {
- osm_mcast_mgr_process_mgroups(sm);
+ osm_mcast_mgr_process(sm);
wait_for_pending_transactions(&sm->p_subn->p_osm->stats);
}
}
--
1.5.5
--
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] 2+ messages in thread
* Re: [PATCH] opensm: configure multicast only once during sweep
[not found] ` <4D25F029.1080005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2011-03-13 17:23 ` Alex Netes
0 siblings, 0 replies; 2+ messages in thread
From: Alex Netes @ 2011-03-13 17:23 UTC (permalink / raw)
To: Eli Dorfman; +Cc: Sasha Khapyorsky, linux-rdma, Vladimir Koushnir
On 18:39 Thu 06 Jan , Eli Dorfman (Voltaire) wrote:
> [PATCH] configure multicast only once during sweep
>
> opensm performed multicast configuration twice during sweep by calling
> two different function that are very similar.
> remove osm_mcast_mgr_process() which had a bug and didn't clear mlid bit
> after configuration and rename osm_mcast_mgr_process_mgroups()
> to osm_mcast_mgr_process()
>
> Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org>
Applied. Thanks.
--
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] 2+ messages in thread
end of thread, other threads:[~2011-03-13 17:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-06 16:39 [PATCH] opensm: configure multicast only once during sweep Eli Dorfman (Voltaire)
[not found] ` <4D25F029.1080005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-03-13 17:23 ` Alex Netes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox