From patchwork Wed Dec 23 14:44:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 69555 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBNEXwWk008245 for ; Wed, 23 Dec 2009 14:33:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756048AbZLWOd6 (ORCPT ); Wed, 23 Dec 2009 09:33:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756060AbZLWOd6 (ORCPT ); Wed, 23 Dec 2009 09:33:58 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:58232 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756048AbZLWOd5 (ORCPT ); Wed, 23 Dec 2009 09:33:57 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 23 Dec 2009 16:34:29 +0200 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 23 Dec 2009 16:33:54 +0200 Message-ID: <4B322CBC.1070805@dev.mellanox.co.il> Date: Wed, 23 Dec 2009 16:44:12 +0200 From: Yevgeny Kliteynik Reply-To: kliteyn@dev.mellanox.co.il User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky CC: Linux RDMA Subject: [PATCH v2] opensm/osm_mcast_mgr.c: fix osm_mcast_mgr_compute_max_hops for managed switch X-OriginalArrivalTime: 23 Dec 2009 14:33:54.0618 (UTC) FILETIME=[F42E01A0:01CA83DC] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17086.007 X-TM-AS-Result: No--1.115800-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c index 697fb58..6bcbec4 100644 --- a/opensm/opensm/osm_mcast_mgr.c +++ b/opensm/opensm/osm_mcast_mgr.c @@ -215,11 +215,9 @@ static float osm_mcast_mgr_compute_max_hops(osm_sm_t * sm, cl_qlist_t * l, max_hops = hops; } - if (max_hops == 0) - /* - We should be here if there aren't any ports in the group. - */ - max_hops = 10001; /* see later - we use it to realize no hops */ + /* Note that at this point we might get (max_hops == 0), + which means that there's only one member in the mcast + group, and it's the current switch */ OSM_LOG_EXIT(sm->p_log); return (float)max_hops;