From patchwork Sat May 3 05:40:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 4105601 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 048939F467 for ; Sat, 3 May 2014 05:41:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F5FA20386 for ; Sat, 3 May 2014 05:40:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A372520375 for ; Sat, 3 May 2014 05:40:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750770AbaECFkw (ORCPT ); Sat, 3 May 2014 01:40:52 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:32897 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750768AbaECFkv (ORCPT ); Sat, 3 May 2014 01:40:51 -0400 Received: by mail-wi0-f180.google.com with SMTP id hi5so2372709wib.7 for ; Fri, 02 May 2014 22:40:50 -0700 (PDT) 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=X3jWjhZpMrvlkmxsg4iC1FkZQWVJvyF+2RZkCKUyA4I=; b=a+WTQIbPQciT/gLBO3DeUVlUKXnuc44sUDjfBsPTzafiogxVl7CGaPAqmqhVfxDE/v v513licCP/YrnRFhCC6wcePkgpKVeOhyOKMI/6o6kMZ100N9U30//qTKM59ICYJs1bzo dUeSD54gWpjafDKZhvxM9OaBMVn3w+A/nCKEYoJzYAbtMIYXAU+EVokfidLHYAimDnuM kE3Vv+mqYP5hOYBF+gf2bpcXeWlpZlDQZC/cKnsFNobAqAZBFNIJhVWLERs+F/xytiwp uYgDH3awKYieUZORNpu4V9r8UjrqHSv7JicgPqfHrCnAisSxd50voW/4iilBOkBd0Xuz 4zJQ== X-Gm-Message-State: ALoCoQmgAbNyzLgU0mIqkspFWpcEs31qKjAR0jsYAthzBfFpawiBV6AD6f5nl4nL6D1QgNis0jbj X-Received: by 10.194.57.38 with SMTP id f6mr126777wjq.59.1399095650187; Fri, 02 May 2014 22:40:50 -0700 (PDT) Received: from [10.70.1.87] (bzq-218-90-50.red.bezeqint.net. [81.218.90.50]) by mx.google.com with ESMTPSA id k19sm1955309wic.10.2014.05.02.22.40.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 May 2014 22:40:49 -0700 (PDT) Message-ID: <5364815F.6040605@dev.mellanox.co.il> Date: Sat, 03 May 2014 01:40:47 -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)" CC: Ira Weiny , "Susan Coulter (skc@lanl.gov)" , Florent Parent Subject: [PATCH 2/3 opensm] perfmgr: Add xmit_wait to event plugin error counters data structure 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.5 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: Ira Weiny Date: Fri, 4 Apr 2014 20:07:04 -0400 NOTE: This changes the plugin interface. However, OpenSM plugins must be compiled for the specific version of OpenSM used. So this should not be an issue. Signed-off-by: Ira Weiny Signed-off-by: Hal Rosenstock --- include/opensm/osm_event_plugin.h | 1 + opensm/osm_perfmgr_db.c | 5 ++--- osmeventplugin/src/osmeventplugin.c | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/opensm/osm_event_plugin.h b/include/opensm/osm_event_plugin.h index ca5a719..db5ebca 100644 --- a/include/opensm/osm_event_plugin.h +++ b/include/opensm/osm_event_plugin.h @@ -126,6 +126,7 @@ typedef struct osm_epi_pe_event { uint64_t link_integrity; uint64_t buffer_overrun; uint64_t vl15_dropped; + uint64_t xmit_wait; time_t time_diff_s; } osm_epi_pe_event_t; diff --git a/opensm/osm_perfmgr_db.c b/opensm/osm_perfmgr_db.c index 5b476bd..1b78942 100644 --- a/opensm/osm_perfmgr_db.c +++ b/opensm/osm_perfmgr_db.c @@ -359,7 +359,6 @@ perfmgr_db_add_err_reading(perfmgr_db_t * db, uint64_t guid, uint8_t port, perfmgr_db_err_reading_t *previous = NULL; perfmgr_db_err_t rc = PERFMGR_EVENT_DB_SUCCESS; osm_epi_pe_event_t epi_pe_data; - uint64_t xmit_wait_diff; cl_plock_excl_acquire(&db->lock); node = get(db, guid); @@ -415,9 +414,9 @@ perfmgr_db_add_err_reading(perfmgr_db_t * db, uint64_t guid, uint8_t port, epi_pe_data.vl15_dropped = (reading->vl15_dropped - previous->vl15_dropped); p_port->err_total.vl15_dropped += epi_pe_data.vl15_dropped; - xmit_wait_diff = + epi_pe_data.xmit_wait = (reading->xmit_wait - previous->xmit_wait); - p_port->err_total.xmit_wait += xmit_wait_diff; + p_port->err_total.xmit_wait += epi_pe_data.xmit_wait; p_port->err_previous = *reading; diff --git a/osmeventplugin/src/osmeventplugin.c b/osmeventplugin/src/osmeventplugin.c index 0f3f9fb..23986db 100644 --- a/osmeventplugin/src/osmeventplugin.c +++ b/osmeventplugin/src/osmeventplugin.c @@ -105,7 +105,9 @@ static void handle_port_counter(_log_events_t * log, osm_epi_pe_event_t * pc) || pc->xmit_constraint_err > 0 || pc->rcv_constraint_err > 0 || pc->link_integrity > 0 - || pc->buffer_overrun > 0 || pc->vl15_dropped > 0) { + || pc->buffer_overrun > 0 + || pc->vl15_dropped > 0 + || pc->xmit_wait > 0) { fprintf(log->log_file, "Port counter errors for node 0x%" PRIx64 " (%s) port %d\n", pc->port_id.node_guid,