From patchwork Wed Jul 6 14:40:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Christoph Lameter (Ampere)" X-Patchwork-Id: 9216449 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E3339607D9 for ; Wed, 6 Jul 2016 14:41:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D54E322638 for ; Wed, 6 Jul 2016 14:41:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8A4122A63; Wed, 6 Jul 2016 14:41:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4935922638 for ; Wed, 6 Jul 2016 14:41:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753651AbcGFOlE (ORCPT ); Wed, 6 Jul 2016 10:41:04 -0400 Received: from resqmta-po-12v.sys.comcast.net ([96.114.154.171]:43308 "EHLO resqmta-po-12v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130AbcGFOlD (ORCPT ); Wed, 6 Jul 2016 10:41:03 -0400 Received: from resomta-po-10v.sys.comcast.net ([96.114.154.234]) by resqmta-po-12v.sys.comcast.net with SMTP id Ko05bzVVSGpVBKo0XbD0Ve; Wed, 06 Jul 2016 14:40:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1467816057; bh=5fM46zEjT+bkmFdxNfJ6XnWBRbweHIoVBRWQkEQ8yCc=; h=Received:Received:Received:Received:Date:From:To:Subject: Message-ID:Content-Type; b=ItGRQjxlK5k6AZl1LqquXP7drHwgiUYF58TNZzh/dmuU9rH/GaxFFrPe5aPouY0uM ym1Pil6EQFZQ6ReG5v3qXsamPep9ygFPlz+ml7XD++GVwMhXD7KF54uKSgoywRPkK4 m+8DzqBSwNNi4LpNMUkqtP0wh4ZBgdGqbJHAfsaik7WCMnooQYM1cpEQrNzLDojmwW 6OHTpU5/7U8DFNHYfX1tWl6SWbuzQNFHbhAynCJWgdA0XLT1HykDKRrAl1BkozT1ke IYK2rHRdX1obxsHd5vXi18nGfSmifD9kXRJUFI/2z4/suz89OOVSBTL/ysZUlrFjMT BO5ihw0OEQ+MA== Received: from gentwo.org ([98.222.162.64]) by resomta-po-10v.sys.comcast.net with comcast id FSgw1t0041PgSZ601Sgwhq; Wed, 06 Jul 2016 14:40:56 +0000 Received: by gentwo.org (Postfix, from userid 1001) id DAE9D12D7; Wed, 6 Jul 2016 09:40:55 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id D8FEE386; Wed, 6 Jul 2016 09:40:55 -0500 (CDT) Date: Wed, 6 Jul 2016 09:40:55 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: dled@redhat.com cc: linux-rdma@vger.kernel.org Subject: [PATCH] IB core: Add port_xmit_wait counter display Message-ID: Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the missing port_xmit_wait counter. This counter is displayed through some tools like perfquery but is not available via sysfs. For the PORT_PMA_ATTR macro the _counter field is set to zero allowing us to specify the offset directly like with PORT_PMA_ATTR_EXT See also the earlier work in 2008 by Vladimir Skolovsky https://www.mail-archive.com/general@lists.openfabrics.org/msg20313.html Signed-off-by: Christoph Lameter --- 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 Index: linux/drivers/infiniband/core/sysfs.c =================================================================== --- linux.orig/drivers/infiniband/core/sysfs.c +++ linux/drivers/infiniband/core/sysfs.c @@ -530,6 +530,7 @@ static PORT_PMA_ATTR(port_xmit_data static PORT_PMA_ATTR(port_rcv_data , 13, 32, 224); static PORT_PMA_ATTR(port_xmit_packets , 14, 32, 256); static PORT_PMA_ATTR(port_rcv_packets , 15, 32, 288); +static PORT_PMA_ATTR(port_xmit_wait , 0, 32, 320); /* * Counters added by extended set @@ -560,6 +561,7 @@ static struct attribute *pma_attrs[] = { &port_pma_attr_port_rcv_data.attr.attr, &port_pma_attr_port_xmit_packets.attr.attr, &port_pma_attr_port_rcv_packets.attr.attr, + &port_pma_attr_port_xmit_wait.attr.attr, NULL }; @@ -604,6 +606,7 @@ static struct attribute *pma_attrs_noiet &port_pma_attr_ext_port_rcv_data.attr.attr, &port_pma_attr_ext_port_xmit_packets.attr.attr, &port_pma_attr_ext_port_rcv_packets.attr.attr, + &port_pma_attr_port_xmit_wait.attr.attr, NULL };