From patchwork Thu Oct 3 15:03:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Domke X-Patchwork-Id: 2984321 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5AAB09F288 for ; Thu, 3 Oct 2013 15:18:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFE1620395 for ; Thu, 3 Oct 2013 15:18:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C66B720164 for ; Thu, 3 Oct 2013 15:18:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754341Ab3JCPSN (ORCPT ); Thu, 3 Oct 2013 11:18:13 -0400 Received: from mail03.nap.gsic.titech.ac.jp ([131.112.13.22]:43502 "HELO mail03.nap.gsic.titech.ac.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754107Ab3JCPSN (ORCPT ); Thu, 3 Oct 2013 11:18:13 -0400 X-Greylist: delayed 888 seconds by postgrey-1.27 at vger.kernel.org; Thu, 03 Oct 2013 11:18:12 EDT Received: from 131.112.13.36 by mail03.nap.gsic.titech.ac.jp with Mail2000 ESMTP Server V6.00S(9150:1:AUTH_RELAY) (envelope-from ); Fri, 04 Oct 2013 00:03:21 +0900 (JST) Received: from [131.112.13.21] (mail02.nap.gsic.titech.ac.jp) by drweb1.nap.gsic.titech.ac.jp (Dr.Web MailD 6.0.2.0) with SMTP id 0341381F; Fri, 04 Oct 2013 00:03:20 Received: from 131.112.29.200 by mail02.nap.gsic.titech.ac.jp with Mail2000 ESMTP Server V6.00S(7810:0:AUTH_LOGIN) (envelope-from ); Fri, 04 Oct 2013 00:03:18 +0900 (JST) From: Jens Domke To: linux-rdma@vger.kernel.org Cc: Hal Rosenstock , Torsten Hoefler Subject: [PATCH 2/5] OpenSM: dfsssp - send multicast forwarding tables to switches Date: Fri, 4 Oct 2013 00:03:06 +0900 Message-Id: <1380812586-1583-2-git-send-email-domke.j.aa@m.titech.ac.jp> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1380812586-1583-1-git-send-email-domke.j.aa@m.titech.ac.jp> References: <1380812586-1583-1-git-send-email-domke.j.aa@m.titech.ac.jp> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;