From patchwork Wed Jul 3 17:05:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2818131 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 1F4C6BF4A1 for ; Wed, 3 Jul 2013 17:05:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C26D120123 for ; Wed, 3 Jul 2013 17:05:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 132A920129 for ; Wed, 3 Jul 2013 17:05:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169Ab3GCRFp (ORCPT ); Wed, 3 Jul 2013 13:05:45 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:45248 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752578Ab3GCRFp (ORCPT ); Wed, 3 Jul 2013 13:05:45 -0400 Received: by mail-wi0-f176.google.com with SMTP id ey16so5467576wid.15 for ; Wed, 03 Jul 2013 10:05:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=tU3PFBXNMXxKCeHxCQq3rVF7xeckJoqBQNmvHa2fpjk=; b=AO8ckiFSXeBRKFeXjxGOKS+4jZuPpvBC7bBvcXfxy40lU2qOv/JW7O+QV4OHVggklv wp9rhfLjCWgpy6qatkXc+z52WmvaHYmAHRBkMid6XRcWz1DLUWuk5fA14+3goxqxzR9W Q+21A+Dm9bRy7zr7CL35xKx3dwK82VD8p1eFyiQgOJiqojjwZkot1ZEl/jaWJCuVzFFo Htpg1DHPHanQtW8irF6ub/MeEahWOk40xPCygHlDEoDU4rK47sKiSoYV19jrMRVMamUM v9+9JHk3gbB34AF1ddzabQ+HNWplpnrbB1+t/d4WRZrgTzU/c0iRR7SjjH6dK0bcvWui BpHg== X-Received: by 10.180.77.231 with SMTP id v7mr1090760wiw.49.1372871143493; Wed, 03 Jul 2013 10:05:43 -0700 (PDT) Received: from [192.168.1.102] (c-71-234-225-85.hsd1.ct.comcast.net. [71.234.225.85]) by mx.google.com with ESMTPSA id fb9sm30012253wid.2.2013.07.03.10.05.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Jul 2013 10:05:42 -0700 (PDT) Message-ID: <51D459E5.5020709@dev.mellanox.co.il> Date: Wed, 03 Jul 2013 13:05:41 -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)" Subject: [PATCH opensm] Add flags to OSM_EVENT_ID_UCAST_ROUTING_DONE X-Gm-Message-State: ALoCoQk1N1LlU4vj72l8jnvfyqg4Yj1kOKQnK2YIWw+zgC0mUALBeztmXOjZWpOj8gG3bupUi2uX Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 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 to be able to discern between ucast routing done when rerouting versus heavy sweep. 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_event_plugin.h b/include/opensm/osm_event_plugin.h index 6b060e7..ca5a719 100644 --- a/include/opensm/osm_event_plugin.h +++ b/include/opensm/osm_event_plugin.h @@ -94,6 +94,12 @@ typedef enum { LFT_CHANGED_BLOCK = (1 << 1) } osm_epi_lft_change_flags_t; +typedef enum { + UCAST_ROUTING_NONE, + UCAST_ROUTING_HEAVY_SWEEP, + UCAST_ROUTING_REROUTE +} osm_epi_ucast_routing_flags_t; + typedef struct osm_epi_lft_change_event { osm_switch_t *p_sw; osm_epi_lft_change_flags_t flags; diff --git a/opensm/osm_state_mgr.c b/opensm/osm_state_mgr.c index 1b73834..0cc8162 100644 --- a/opensm/osm_state_mgr.c +++ b/opensm/osm_state_mgr.c @@ -1190,7 +1190,7 @@ static void do_sweep(osm_sm_t * sm) "REROUTE COMPLETE"); osm_opensm_report_event(sm->p_subn->p_osm, OSM_EVENT_ID_UCAST_ROUTING_DONE, - NULL); + (void *) UCAST_ROUTING_REROUTE); return; } } @@ -1387,7 +1387,8 @@ repeat_discovery: OSM_LOG_MSG_BOX(sm->p_log, OSM_LOG_VERBOSE, "SWITCHES CONFIGURED FOR UNICAST"); osm_opensm_report_event(sm->p_subn->p_osm, - OSM_EVENT_ID_UCAST_ROUTING_DONE, NULL); + OSM_EVENT_ID_UCAST_ROUTING_DONE, + (void *) UCAST_ROUTING_HEAVY_SWEEP); if (!sm->p_subn->opt.disable_multicast) { osm_mcast_mgr_process(sm, TRUE); diff --git a/osmeventplugin/src/osmeventplugin.c b/osmeventplugin/src/osmeventplugin.c index c5655fe..1eaf7ea 100644 --- a/osmeventplugin/src/osmeventplugin.c +++ b/osmeventplugin/src/osmeventplugin.c @@ -195,7 +195,7 @@ static void report(void *_log, osm_epi_event_id_t event_id, void *event_data) fprintf(log->log_file, "Heavy sweep completed\n"); break; case OSM_EVENT_ID_UCAST_ROUTING_DONE: - fprintf(log->log_file, "Unicast routing completed\n"); + fprintf(log->log_file, "Unicast routing completed %d\n", event_data); break; case OSM_EVENT_ID_STATE_CHANGE: fprintf(log->log_file, "SM state changed\n");