From patchwork Fri Aug 16 19:11:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2845957 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 D622A9F239 for ; Sat, 17 Aug 2013 00:36:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0424C205B0 for ; Sat, 17 Aug 2013 00:36:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B1F6205AD for ; Sat, 17 Aug 2013 00:36:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751259Ab3HQAgh (ORCPT ); Fri, 16 Aug 2013 20:36:37 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:51684 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751214Ab3HQAgg (ORCPT ); Fri, 16 Aug 2013 20:36:36 -0400 Received: by mail-wg0-f42.google.com with SMTP id j13so1730501wgh.5 for ; Fri, 16 Aug 2013 17:36:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=2+JsQp57BkQjgGUaHZpyspiFe5X3Z/SHAliHLLw3bc0=; b=DxNbuhVKm/LiiwaEBHzA/KNLGmCov/4lReUC7QQJ/APBd5EhEmtFKfgzRkXLVvNkhN alV+koPrhd6s1461xrQ9GGt0LKyi+UAviI5GXNURPvPhPOAFyvo0NsgMo4fVneCbMzNs 8wCGhjdNU8ncPYuq0oYtslCEIPCMyuSq81C5TN2f6BB8MDmKrHNM7YI+5QvhRp8p5yad ZclKEKMHMclc+xhBNDTLlfS6U+LX53AfMuO2XX3a56ghmnZYeLbvdc2uON7YyjrOac5s toJPgCRYONP4IgMxqPTsFcBt/aCskaGTZjZ11ZpA2sOrErLxjZCA5yjBlzDqiAgeBhtb 1Z0A== X-Gm-Message-State: ALoCoQnSs+m12olkgWfqF47Ir4X82MTp5LtZxYQkdparV2D/cy/hM0dUm+I5cMqFIQ20GjVP3fK3 X-Received: by 10.180.84.196 with SMTP id b4mr346003wiz.19.1376680303356; Fri, 16 Aug 2013 12:11:43 -0700 (PDT) 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 l7sm263923wiw.4.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 12:11:42 -0700 (PDT) Message-ID: <520E796C.8030704@dev.mellanox.co.il> Date: Fri, 16 Aug 2013 15:11:40 -0400 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: Alex Netes Subject: [PATCH opensm] osm_lid_mgr.c: Don't configure MTU and LMC for base SP0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-9.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 From: Alex Netes For base switch port 0, these values aren't defined/used. Signed-off-by: Alex Netes Signed-off-by: Hal Rosenstock --- opensm/osm_lid_mgr.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/opensm/osm_lid_mgr.c b/opensm/osm_lid_mgr.c index d881b5e..85fb44f 100644 --- a/opensm/osm_lid_mgr.c +++ b/opensm/osm_lid_mgr.c @@ -988,10 +988,11 @@ static int lid_mgr_set_physp_pi(IN osm_lid_mgr_t * p_mgr, ib_port_info_get_port_state(p_old_pi)) send_set = TRUE; } - } else { + } else if (ib_switch_info_is_enhanced_port0(&p_node->sw->switch_info)) { /* - For Port 0, NeighborMTU is relevant only for Enh. SP0. - In this case, we'll set the MTU according to the mtu_cap + * Configure Enh. SP0: + * Set MTU according to the mtu_cap. + * Set LMC if lmc_esp0 is defined. */ ib_port_info_set_neighbor_mtu(p_pi, ib_port_info_get_mtu_cap @@ -1006,8 +1007,8 @@ static int lid_mgr_set_physp_pi(IN osm_lid_mgr_t * p_mgr, cl_ntoh64(osm_physp_get_port_guid(p_physp)), ib_port_info_get_neighbor_mtu(p_pi)); - /* Determine if enhanced switch port 0 and if so set LMC */ - if (osm_switch_sp0_is_lmc_capable(p_node->sw, p_mgr->p_subn)) { + /* Configure LMC on enhanced SP0 */ + if (p_mgr->p_subn->opt.lmc_esp0) { /* p_pi->mkey_lmc is initialized earlier */ ib_port_info_set_lmc(p_pi, p_mgr->p_subn->opt.lmc); if (ib_port_info_get_lmc(p_pi) !=