From patchwork Fri Apr 22 21:21:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 728221 X-Patchwork-Delegate: alexne@voltaire.com 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 p3MLLt4R004602 for ; Fri, 22 Apr 2011 21:21:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756476Ab1DVVVy (ORCPT ); Fri, 22 Apr 2011 17:21:54 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:33839 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756459Ab1DVVVy (ORCPT ); Fri, 22 Apr 2011 17:21:54 -0400 Received: by wya21 with SMTP id 21so625892wya.19 for ; Fri, 22 Apr 2011 14:21:52 -0700 (PDT) Received: by 10.227.149.73 with SMTP id s9mr1477679wbv.156.1303507312116; Fri, 22 Apr 2011 14:21:52 -0700 (PDT) Received: from [192.168.1.100] (c-71-192-10-85.hsd1.ma.comcast.net [71.192.10.85]) by mx.google.com with ESMTPS id w25sm1942402wbd.56.2011.04.22.14.21.49 (version=SSLv3 cipher=OTHER); Fri, 22 Apr 2011 14:21:51 -0700 (PDT) Message-ID: <4DB1F16C.6090907@dev.mellanox.co.il> Date: Fri, 22 Apr 2011 17:21:48 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Alex Netes CC: "linux-rdma@vger.kernel.org" , Jim Schutt Subject: [PATCH] opensm: Provide option to disable use of MulticastFDBTop even if advertised 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]); Fri, 22 Apr 2011 21:21:59 +0000 (UTC) Default is on; as this is a workaround for non compliance: this feature is advertised but the SMA rejects sets of SwitchInfo that actually set MFTTop. Signed-off-by: Hal Rosenstock --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/opensm/osm_subnet.h b/include/opensm/osm_subnet.h index a9499dd..4bab8ee 100644 --- a/include/opensm/osm_subnet.h +++ b/include/opensm/osm_subnet.h @@ -171,6 +171,7 @@ typedef struct osm_subn_opt { uint8_t leaf_head_of_queue_lifetime; uint8_t local_phy_errors_threshold; uint8_t overrun_errors_threshold; + boolean_t use_mfttop; uint32_t sminfo_polling_timeout; uint32_t polling_retry_number; uint32_t max_msg_fifo_timeout; diff --git a/opensm/osm_mcast_mgr.c b/opensm/osm_mcast_mgr.c index ea52bfe..e33c716 100644 --- a/opensm/osm_mcast_mgr.c +++ b/opensm/osm_mcast_mgr.c @@ -1041,7 +1041,8 @@ static void mcast_mgr_set_mfttop(IN osm_sm_t * sm, IN osm_switch_t * p_sw) p_path = osm_physp_get_dr_path_ptr(p_physp); p_tbl = osm_switch_get_mcast_tbl_ptr(p_sw); - if (p_physp->port_info.capability_mask & IB_PORT_CAP_HAS_MCAST_FDB_TOP) { + if (sm->p_subn->opt.use_mfttop && + p_physp->port_info.capability_mask & IB_PORT_CAP_HAS_MCAST_FDB_TOP) { /* Set the top of the multicast forwarding table. */ diff --git a/opensm/osm_subnet.c b/opensm/osm_subnet.c index 84ac6ed..e4ea841 100644 --- a/opensm/osm_subnet.c +++ b/opensm/osm_subnet.c @@ -322,6 +322,7 @@ static const opt_rec_t opt_tbl[] = { { "leaf_head_of_queue_lifetime", OPT_OFFSET(leaf_head_of_queue_lifetime), opts_parse_uint8, NULL, 1 }, { "local_phy_errors_threshold", OPT_OFFSET(local_phy_errors_threshold), opts_parse_uint8, NULL, 1 }, { "overrun_errors_threshold", OPT_OFFSET(overrun_errors_threshold), opts_parse_uint8, NULL, 1 }, + { "use_mfttop", OPT_OFFSET(use_mfttop), opts_parse_boolean, NULL, 1}, { "sminfo_polling_timeout", OPT_OFFSET(sminfo_polling_timeout), opts_parse_uint32, opts_setup_sminfo_polling_timeout, 1 }, { "polling_retry_number", OPT_OFFSET(polling_retry_number), opts_parse_uint32, NULL, 1 }, { "force_heavy_sweep", OPT_OFFSET(force_heavy_sweep), opts_parse_boolean, NULL, 1 }, @@ -703,6 +704,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * p_opt) OSM_DEFAULT_LEAF_HEAD_OF_QUEUE_LIFE; p_opt->local_phy_errors_threshold = OSM_DEFAULT_ERROR_THRESHOLD; p_opt->overrun_errors_threshold = OSM_DEFAULT_ERROR_THRESHOLD; + p_opt->use_mfttop = TRUE; p_opt->sminfo_polling_timeout = OSM_SM_DEFAULT_POLLING_TIMEOUT_MILLISECS; p_opt->polling_retry_number = OSM_SM_DEFAULT_POLLING_RETRY_NUMBER; @@ -1313,7 +1315,9 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t * p_opts) "# Threshold of local phy errors for sending Trap 129\n" "local_phy_errors_threshold 0x%02x\n\n" "# Threshold of credit overrun errors for sending Trap 130\n" - "overrun_errors_threshold 0x%02x\n\n", + "overrun_errors_threshold 0x%02x\n\n" + "# Use SwitchInfo:MulticastFDBTop if advertised in PortInfo:CapabilityMask\n" + "use_mfttop %s\n\n", cl_ntoh64(p_opts->guid), cl_ntoh64(p_opts->m_key), cl_ntoh16(p_opts->m_key_lease_period), @@ -1332,7 +1336,8 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t * p_opts) p_opts->force_link_speed, p_opts->subnet_timeout, p_opts->local_phy_errors_threshold, - p_opts->overrun_errors_threshold); + p_opts->overrun_errors_threshold, + p_opts->use_mfttop ? "TRUE" : "FALSE"); fprintf(out, "#\n# PARTITIONING OPTIONS\n#\n"