From patchwork Thu Jan 6 16:39:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eli Dorfman (Voltaire)" X-Patchwork-Id: 459461 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p06GZDNi017155 for ; Thu, 6 Jan 2011 16:35:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751925Ab1AFQfM (ORCPT ); Thu, 6 Jan 2011 11:35:12 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:10943 "EHLO Exil2010.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751545Ab1AFQfL (ORCPT ); Thu, 6 Jan 2011 11:35:11 -0500 Received: from exil.voltaire.com (172.25.0.55) by Exil2010.voltaire.com (172.25.0.11) with Microsoft SMTP Server id 14.1.255.0; Thu, 6 Jan 2011 18:35:08 +0200 Received: from [172.25.1.69] ([172.25.1.69]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 6 Jan 2011 18:35:08 +0200 Message-ID: <4D25F029.1080005@gmail.com> Date: Thu, 6 Jan 2011 18:39:05 +0200 From: "Eli Dorfman (Voltaire)" User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Sasha Khapyorsky CC: linux-rdma , Vladimir Koushnir Subject: [PATCH] opensm: configure multicast only once during sweep X-OriginalArrivalTime: 06 Jan 2011 16:35:08.0136 (UTC) FILETIME=[AE180680:01CBADBF] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 06 Jan 2011 16:35:13 +0000 (UTC) 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); } }