From patchwork Thu Apr 8 13:29:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 91270 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o38DT3N8009273 for ; Thu, 8 Apr 2010 13:29:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758609Ab0DHN30 (ORCPT ); Thu, 8 Apr 2010 09:29:26 -0400 Received: from mail.mellanox.co.il ([194.90.237.43]:51479 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750771Ab0DHN30 (ORCPT ); Thu, 8 Apr 2010 09:29:26 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 8 Apr 2010 16:29:21 +0300 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Apr 2010 16:29:20 +0300 Message-ID: <4BBDDA30.6090302@dev.mellanox.co.il> Date: Thu, 08 Apr 2010 16:29:20 +0300 From: Yevgeny Kliteynik User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky CC: Linux RDMA , Jim Schut Subject: [PATCH 2/4] opensm: added 2 options: dump PRs and filename X-OriginalArrivalTime: 08 Apr 2010 13:29:21.0003 (UTC) FILETIME=[7F1CC3B0:01CAD71F] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17306.007 X-TM-AS-Result: No--0.279300-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No 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.3 (demeter.kernel.org [140.211.167.41]); Thu, 08 Apr 2010 13:29:29 +0000 (UTC) diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h index 3970e98..8d7182b 100644 --- a/opensm/include/opensm/osm_subnet.h +++ b/opensm/include/opensm/osm_subnet.h @@ -201,6 +201,8 @@ typedef struct osm_subn_opt { char *guid_routing_order_file; char *sa_db_file; boolean_t sa_db_dump; + boolean_t path_rec_dump; + char *path_rec_file; boolean_t do_mesh_analysis; boolean_t exit_on_fatal; boolean_t honor_guid2lid_file; @@ -418,6 +420,14 @@ typedef struct osm_subn_opt { * When TRUE causes OpenSM to dump SA DB at the end of every * light sweep regardless the current verbosity level. * +* path_rec_file +* Name of the PathRecords dump file. +* +* path_rec_dump +* When TRUE causes OpenSM to dump PathRecords for all the +* CA-2-CA paths at the end of every heavy sweep, regardless +* of the verbosity level. +* * exit_on_fatal * If TRUE (default) - SM will exit on fatal subnet initialization * issues. diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c index e4126bc..c87ed2a 100644 --- a/opensm/opensm/osm_subnet.c +++ b/opensm/opensm/osm_subnet.c @@ -757,6 +757,8 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * p_opt) p_opt->guid_routing_order_file = NULL; p_opt->sa_db_file = NULL; p_opt->sa_db_dump = FALSE; + p_opt->path_rec_file = NULL; + p_opt->path_rec_dump = FALSE; p_opt->do_mesh_analysis = FALSE; p_opt->exit_on_fatal = TRUE; p_opt->enable_quirks = FALSE; @@ -1464,6 +1466,18 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t * p_opts) p_opts->sa_db_dump ? "TRUE" : "FALSE"); fprintf(out, + "# PathRecords dump file name\n" + "path_rec_file %s\n\n", + p_opts->path_rec_file ? p_opts->path_rec_file : null_str); + + fprintf(out, + "# If TRUE causes OpenSM to dump PathRecords for all the\n" + "# CA-2-CA paths at the end of every heavy sweep, regardless\n" + "# of the verbosity level\n" + "path_rec_dump %s\n\n", + p_opts->path_rec_dump ? "TRUE" : "FALSE"); + + fprintf(out, "#\n# HANDOVER - MULTIPLE SMs OPTIONS\n#\n" "# SM priority used for deciding who is the master\n" "# Range goes from 0 (lowest priority) to 15 (highest).\n"