From patchwork Tue Apr 13 10:43:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 92156 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 o3DAgLRc009465 for ; Tue, 13 Apr 2010 10:43:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752840Ab0DMKn2 (ORCPT ); Tue, 13 Apr 2010 06:43:28 -0400 Received: from mail.mellanox.co.il ([194.90.237.43]:34960 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752789Ab0DMKn2 (ORCPT ); Tue, 13 Apr 2010 06:43:28 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 13 Apr 2010 13:43:25 +0300 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 13 Apr 2010 13:43:25 +0300 Message-ID: <4BC44AC2.8010403@dev.mellanox.co.il> Date: Tue, 13 Apr 2010 13:43:14 +0300 From: Yevgeny Kliteynik User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky , Linux RDMA Subject: [PATCH] opensm/osm_subnet.{c,h}: passing options to the event plugins X-OriginalArrivalTime: 13 Apr 2010 10:43:25.0151 (UTC) FILETIME=[25070EF0:01CADAF6] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17316.006 X-TM-AS-Result: No--9.293100-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]); Tue, 13 Apr 2010 10:43:29 +0000 (UTC) diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h index 83705a5..c609723 100644 --- a/opensm/include/opensm/osm_subnet.h +++ b/opensm/include/opensm/osm_subnet.h @@ -223,6 +223,7 @@ typedef struct osm_subn_opt { char *event_db_dump_file; #endif /* ENABLE_OSM_PERF_MGR */ char *event_plugin_name; + char *event_plugin_options; char *node_name_map_name; char *prefix_routes_file; char *log_prefix; @@ -459,6 +460,9 @@ typedef struct osm_subn_opt { * event_plugin_name * Specify the name(s) of the event plugin(s) * +* event_plugin_options +* Options string that would be passed to the plugin(s) +* * qos_options * Default set of QoS options * diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c index e4126bc..9132c82 100644 --- a/opensm/opensm/osm_subnet.c +++ b/opensm/opensm/osm_subnet.c @@ -364,6 +364,7 @@ static const opt_rec_t opt_tbl[] = { { "event_db_dump_file", OPT_OFFSET(event_db_dump_file), opts_parse_charp, NULL, 0 }, #endif /* ENABLE_OSM_PERF_MGR */ { "event_plugin_name", OPT_OFFSET(event_plugin_name), opts_parse_charp, NULL, 0 }, + { "event_plugin_options", OPT_OFFSET(event_plugin_options), opts_parse_charp, NULL, 0 }, { "node_name_map_name", OPT_OFFSET(node_name_map_name), opts_parse_charp, NULL, 0 }, { "qos_max_vls", OPT_OFFSET(qos_options.max_vls), opts_parse_uint32, NULL, 1 }, { "qos_high_limit", OPT_OFFSET(qos_options.high_limit), opts_parse_int32, NULL, 1 }, @@ -727,6 +728,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * p_opt) #endif /* ENABLE_OSM_PERF_MGR */ p_opt->event_plugin_name = NULL; + p_opt->event_plugin_options = NULL; p_opt->node_name_map_name = NULL; p_opt->dump_files_dir = getenv("OSM_TMP_DIR"); @@ -1544,8 +1546,14 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t * p_opts) fprintf(out, "#\n# Event Plugin Options\n#\n" - "event_plugin_name %s\n\n", p_opts->event_plugin_name ? - p_opts->event_plugin_name : null_str); + "# Event plugin name(s)\n" + "event_plugin_name %s\n\n" + "# Options string that would be passed to the plugin(s)\n" + "event_plugin_options %s\n\n", + p_opts->event_plugin_name ? + p_opts->event_plugin_name : null_str, + p_opts->event_plugin_options ? + p_opts->event_plugin_options : null_str); fprintf(out, "#\n# Node name map for mapping node's to more descriptive node descriptions\n"