From patchwork Thu Feb 27 12:21:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3732401 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 280769F2ED for ; Thu, 27 Feb 2014 12:21:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 521FC201FE for ; Thu, 27 Feb 2014 12:21:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6F7020203 for ; Thu, 27 Feb 2014 12:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752205AbaB0MV1 (ORCPT ); Thu, 27 Feb 2014 07:21:27 -0500 Received: from mail-wg0-f52.google.com ([74.125.82.52]:63601 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129AbaB0MVZ (ORCPT ); Thu, 27 Feb 2014 07:21:25 -0500 Received: by mail-wg0-f52.google.com with SMTP id k14so2786054wgh.23 for ; Thu, 27 Feb 2014 04:21:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=6PQXvDj7SjDMtzMXD5ipcN5ZplUm4hFvJUdmLLEHxk4=; b=X1SP75h15Fjc7/m+lNA1M6QzYS3G65soDUuExC2rQDNxlOa0i053d4olQiZQ3aOtPG bNeHdKhrZzy21HusrYMz7cSVVLzeh9zJVb/KJOdixr8pb123BDC3gM9/fTAIFnwUDVBS waRYL0IodsbLiVw/bgExluFGQmXM4wH17cgs4d9omvWBIdz6I7DfdJhyGo+cqWfMkf20 2IcGmwdTkohD54vQAG+2RPNhMYEgooZ47TjAomJ5e7HxqK8mLT7VfUd4arijHSrKOZNV cTWHCaBWozFT3lY44IokFvH/JuSTCvCWoraMBHpDgoBw9h9QUQJT3MgbKLdaAEgTP9mx pdHQ== X-Gm-Message-State: ALoCoQm8adfVnk4RKKtMczWJph88a3Yv1wlMUZFSChm/zDg7gOt+48uG9TFis15bvICoBKn6XZ69 X-Received: by 10.194.63.103 with SMTP id f7mr2539817wjs.38.1393503683983; Thu, 27 Feb 2014 04:21:23 -0800 (PST) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id fb6sm19564466wib.2.2014.02.27.04.21.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Feb 2014 04:21:23 -0800 (PST) Message-ID: <530F2DC0.8000204@dev.mellanox.co.il> Date: Thu, 27 Feb 2014 07:21:20 -0500 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Ilya Nelkenbaum Subject: [PATCH opensm] osm_sw_info_rcv.c: Add check of switch mcast_cap Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Ilya Nelkenbaum Signed-off-by: Ilya Nelkenbaum --- opensm/osm_sw_info_rcv.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/opensm/osm_sw_info_rcv.c b/opensm/osm_sw_info_rcv.c index 77c5be7..ce747a9 100644 --- a/opensm/osm_sw_info_rcv.c +++ b/opensm/osm_sw_info_rcv.c @@ -222,7 +222,8 @@ static void si_rcv_process_new(IN osm_sm_t * sm, IN osm_node_t * p_node, } /* set subnet max mlid to the minimum MulticastFDBCap of all switches */ - if (cl_ntoh16(p_si->mcast_cap) + IB_LID_MCAST_START_HO - 1 < + if (p_si->mcast_cap && + cl_ntoh16(p_si->mcast_cap) + IB_LID_MCAST_START_HO - 1 < sm->p_subn->max_mcast_lid_ho) { sm->p_subn->max_mcast_lid_ho = cl_ntoh16(p_si->mcast_cap) + IB_LID_MCAST_START_HO - 1;