From patchwork Mon Jan 13 18:45:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3479871 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 79F61C02DC for ; Mon, 13 Jan 2014 18:45:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D9212013A for ; Mon, 13 Jan 2014 18:45:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9738220136 for ; Mon, 13 Jan 2014 18:45:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751317AbaAMSpN (ORCPT ); Mon, 13 Jan 2014 13:45:13 -0500 Received: from mail-ea0-f182.google.com ([209.85.215.182]:55995 "EHLO mail-ea0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751024AbaAMSpM (ORCPT ); Mon, 13 Jan 2014 13:45:12 -0500 Received: by mail-ea0-f182.google.com with SMTP id a15so3534949eae.27 for ; Mon, 13 Jan 2014 10:45:11 -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=xbz0M/WCtzRxM5JonKvNSgVoPZoi2Aq13S5NndTUHWo=; b=cOfs/YHyJRSx8b944Xh/BDcP2dInqSbvmsdM+26cvbDA7e5HPf0QRhvBtNp/SvdUyw 5u5OXvP2hb5SSZRdMcIXVsV423kUNAPTBH9s+ZV8HcvHRDFpbRioVwHtU5PDMKzqCi5q TyHiiwmnRA9hxfqouR0Xl7dcAX/HBrQkQEqaFZ6lFg9GQzWDQCe9mCfxGrbA7NfzTjPo ZHLAYnq/VuO/JW0m8LVhUfDngy3gBuQkXtGumWcdQ7TVXuO9c86z4IRYdatrotelqrZ3 7PnPhSTTDXKwOj0wir+Quq2Mnjd7kQ4d6FsWY03HITyBiKDK0j764U7m5RLBPzIPZ6bJ 808Q== X-Gm-Message-State: ALoCoQlqwOPUKdMoe/wVVMFkeXI2iMzXVDAau/d/EgGvpQ8BU7yxJ9r7ompYNObvws06iMluXlgA X-Received: by 10.15.75.200 with SMTP id l48mr5130942eey.109.1389638711595; Mon, 13 Jan 2014 10:45:11 -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 v1sm42082801eef.9.2014.01.13.10.45.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Jan 2014 10:45:11 -0800 (PST) Message-ID: <52D43435.9030807@dev.mellanox.co.il> Date: Mon, 13 Jan 2014 13:45:09 -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: Vladimir Koushnir Subject: [PATCH opensm] Add new option for guid_routing_order_no_scatter 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.0 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: Vladimir Koushnir It avoids using scatter option for guids defined in guid_routing_order file Signed-off-by: Vladimir Koushnir Signed-off-by: Alex Netes Signed-off-by: Hal Rosenstock --- include/opensm/osm_port.h | 1 + include/opensm/osm_subnet.h | 1 + opensm/main.c | 6 ++++++ opensm/osm_subnet.c | 2 ++ opensm/osm_ucast_mgr.c | 5 ++++- 5 files changed, 14 insertions(+), 1 deletions(-) -- 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_port.h b/include/opensm/osm_port.h index 73f7663..206c4a9 100644 --- a/include/opensm/osm_port.h +++ b/include/opensm/osm_port.h @@ -1194,6 +1194,7 @@ typedef struct osm_port { osm_physp_t *p_physp; cl_qlist_t mcm_list; int flag; + int use_scatter; unsigned int cc_timeout_count; int cc_unavailable_flag; void *priv; diff --git a/include/opensm/osm_subnet.h b/include/opensm/osm_subnet.h index 606c63e..03f116e 100644 --- a/include/opensm/osm_subnet.h +++ b/include/opensm/osm_subnet.h @@ -317,6 +317,7 @@ typedef struct osm_subn_opt { uint16_t max_reverse_hops; char *ids_guid_file; char *guid_routing_order_file; + boolean_t guid_routing_order_no_scatter; char *sa_db_file; boolean_t sa_db_dump; char *torus_conf_file; diff --git a/opensm/main.c b/opensm/main.c index e92a6c2..6b5cae7 100644 --- a/opensm/main.c +++ b/opensm/main.c @@ -369,6 +369,8 @@ static void show_usage(void) printf("--consolidate_ipv6_snm_req\n" " Use shared MLID for IPv6 Solicited Node Multicast groups\n" " per MGID scope and P_Key.\n\n"); + printf("--guid_routing_order_no_scatter\n" + " Don't use scatter for ports defined in guid_routing_order file\n\n"); printf("--log_prefix \n" " Prefix to syslog messages from OpenSM.\n\n"); printf("--verbose, -v\n" @@ -687,6 +689,7 @@ int main(int argc, char *argv[]) {"retries", 1, NULL, 8}, {"log_prefix", 1, NULL, 9}, {"torus_config", 1, NULL, 10}, + {"guid_routing_order_no_scatter", 0, NULL, 13}, {NULL, 0, NULL, 0} /* Required at the end of the array */ }; @@ -1133,6 +1136,9 @@ int main(int argc, char *argv[]) SET_STR_OPT(opt.torus_conf_file, optarg); printf("Torus-2QoS config file = %s\n", opt.torus_conf_file); break; + case 13: + opt.guid_routing_order_no_scatter = TRUE; + break; case 'h': case '?': case ':': diff --git a/opensm/osm_subnet.c b/opensm/osm_subnet.c index 59a988f..7bc9676 100644 --- a/opensm/osm_subnet.c +++ b/opensm/osm_subnet.c @@ -767,6 +767,7 @@ static const opt_rec_t opt_tbl[] = { { "max_reverse_hops", OPT_OFFSET(max_reverse_hops), opts_parse_uint16, NULL, 0 }, { "ids_guid_file", OPT_OFFSET(ids_guid_file), opts_parse_charp, NULL, 0 }, { "guid_routing_order_file", OPT_OFFSET(guid_routing_order_file), opts_parse_charp, NULL, 0 }, + { "guid_routing_order_no_scatter", OPT_OFFSET(guid_routing_order_no_scatter), opts_parse_boolean, NULL, 0 }, { "sa_db_file", OPT_OFFSET(sa_db_file), opts_parse_charp, NULL, 0 }, { "sa_db_dump", OPT_OFFSET(sa_db_dump), opts_parse_boolean, NULL, 1 }, { "torus_config", OPT_OFFSET(torus_conf_file), opts_parse_charp, NULL, 1 }, @@ -1535,6 +1536,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * p_opt) p_opt->max_reverse_hops = 0; p_opt->ids_guid_file = NULL; p_opt->guid_routing_order_file = NULL; + p_opt->guid_routing_order_no_scatter = FALSE; p_opt->sa_db_file = NULL; p_opt->sa_db_dump = FALSE; p_opt->torus_conf_file = strdup(OSM_DEFAULT_TORUS_CONF_FILE); diff --git a/opensm/osm_ucast_mgr.c b/opensm/osm_ucast_mgr.c index 4950edc..f53e288 100644 --- a/opensm/osm_ucast_mgr.c +++ b/opensm/osm_ucast_mgr.c @@ -259,7 +259,7 @@ static void ucast_mgr_process_port(IN osm_ucast_mgr_t * p_mgr, p_mgr->p_subn->opt.lmc, p_mgr->is_dor, p_mgr->p_subn->opt.port_shifting, - p_mgr->p_subn->opt.scatter_ports); + p_port->use_scatter); if (port == OSM_NO_PATH) { /* do not try to overwrite the ppro of non existing port ... */ @@ -729,6 +729,7 @@ static int add_guid_to_order_list(void *ctx, uint64_t guid, char *p) cl_qlist_insert_tail(&m->port_order_list, &port->list_item); port->flag = 1; + port->use_scatter = (m->p_subn->opt.guid_routing_order_no_scatter == TRUE) ? 0 : m->p_subn->opt.scatter_ports; return 0; } @@ -738,9 +739,10 @@ static void add_port_to_order_list(cl_map_item_t * p_map_item, void *ctx) osm_port_t *port = (osm_port_t *) p_map_item; osm_ucast_mgr_t *m = ctx; - if (!port->flag) + if (!port->flag) { + port->use_scatter = m->p_subn->opt.scatter_ports; cl_qlist_insert_tail(&m->port_order_list, &port->list_item); - else + } else port->flag = 0; } @@ -804,6 +806,7 @@ static void add_sw_endports_to_order_list(osm_switch_t * sw, cl_qlist_insert_tail(&m->port_order_list, &port->list_item); port->flag = 1; + port->use_scatter = m->p_subn->opt.scatter_ports; } } }