From patchwork Fri Aug 10 18:22:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Perry" X-Patchwork-Id: 1306321 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9489DDF266 for ; Fri, 10 Aug 2012 18:32:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754786Ab2HJScI (ORCPT ); Fri, 10 Aug 2012 14:32:08 -0400 Received: from prdiron-1.llnl.gov ([128.15.143.171]:51552 "EHLO prdiron-1.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759894Ab2HJScE convert rfc822-to-8bit (ORCPT ); Fri, 10 Aug 2012 14:32:04 -0400 X-Greylist: delayed 574 seconds by postgrey-1.27 at vger.kernel.org; Fri, 10 Aug 2012 14:32:04 EDT X-Attachments: Received: from nspexhub-2.llnl.gov (HELO nspexhub-2.the-lab.llnl.gov) ([128.115.54.114]) by prdiron-1.llnl.gov with ESMTP; 10 Aug 2012 11:22:28 -0700 Received: from NSPEXMBX-D.the-lab.llnl.gov ([128.115.54.104]) by nspexhub-2.the-lab.llnl.gov ([172.16.54.114]) with mapi; Fri, 10 Aug 2012 11:22:28 -0700 From: "Huang, Perry" To: "linux-rdma@vger.kernel.org" CC: "Chu, Al" , "Foraker, Jim" , "Weiny, Ira K." , "alexne@mellanox.com" Date: Fri, 10 Aug 2012 11:22:28 -0700 Subject: [PATCH 1/2] ibsim/sim.h: Add support for optional performance attributes. Thread-Topic: [PATCH 1/2] ibsim/sim.h: Add support for optional performance attributes. Thread-Index: Ac13JRlYkkSW2pV4RnWsOSXKIDIezA== Message-ID: <0F3DDD57-C1A9-4304-A20F-7027BF8F590B@llnl.gov> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Add support for optional performance counters detailed in IB Arch Release 1.2.1 16.1.4.[1-8]. Does not include congestion attributes. Signed-off-by: Perry Huang --- ibsim/sim.h | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 89 insertions(+), 0 deletions(-) diff --git a/ibsim/sim.h b/ibsim/sim.h index 5a8a92f..a28e8b0 100644 --- a/ibsim/sim.h +++ b/ibsim/sim.h @@ -125,6 +125,35 @@ enum GS_PC_EXT_SELECT_MASK { GS_PC_EXT_MCAST_RECV = 1 << 7, }; +enum RCV_ERROR_DETAILS_COUNTER_SELECT_MASK { + GS_PERF_LOCAL_PHYSICAL_ERRORS_MASK = (1UL << 0), // PortLocalPhysicalErrors + GS_PERF_MALFORMED_PACKET_ERRORS_MASK = (1UL << 1), // PortMalformedPacketErrors + GS_PERF_BUFFER_OVERRUN_ERRORS_MASK = (1UL << 2), // PortBufferOverrunErrors + GS_PERF_DLID_MAPPING_ERRORS_MASK = (1UL << 3), // PortDLIDMappingErrors + GS_PERF_VL_MAPPING_ERRORS_MASK = (1UL << 4), // PortVLMappingErrors + GS_PERF_LOOPING_ERRORS_MASK = (1UL << 5), // PortLoopingErrors +}; + +enum XMIT_DISCARD_DETAILS_SELECT_MASK { + GS_PERF_INACTIVE_DISCARDS_MASK = (1UL << 0), // PortInactiveDiscards + GS_PERF_NEIGHBOR_MTU_DISCARDS_MASK = (1UL << 1), // PortNeighborMTUDiscards + GS_PERF_SW_LIFETIME_LIMIT_DISCARDS_MASK = (1UL << 2), // PortSwLifetimeLimitDiscards + GS_PERF_SW_HOQ_LIFETIME_LIMIT_DISCARDS_MASK = (1UL << 3), // PortSwHOQLifetimeLimitDiscards +}; + +enum OP_RCV_COUNTERS_SELECT_MASK { + GS_PERF_OP_RCV_PKTS_MASK = (1UL << 0), // PortOpRcvPkts + GS_PERF_OP_RCV_DATA_MASK = (1UL << 1), // PortOpRcvData +}; + +enum FLOW_CTL_COUNTERS_SELECT_MASK { + GS_PERF_XMIT_FLOW_PKTS_MASK = (1UL << 0), // PortXmitFlowPkts + GS_PERF_RCV_FLOW_PKTS_MASK = (1UL << 1), // PortRcvFlowPkts +}; + +/* Counter select bit masks for PortVLOpPackets[0-15], PortVLOpData[0-15], +and PortVLXmitWaitCounters[0-15] are ommitted due to redundency. */ + enum GS_PERF_COUNTER_SELECT_LIMIT { GS_PERF_ERR_SYM_LIMIT = 0xffff, GS_PERF_LINK_RECOVERS_LIMIT = 0xff, @@ -143,6 +172,24 @@ enum GS_PERF_COUNTER_SELECT_LIMIT { GS_PERF_XMT_PKTS_LIMIT = 0xffffffff, GS_PERF_RCV_PKTS_LIMIT = 0xffffffff, GS_PERF_XMT_WAIT_LIMIT = 0xffffffff, + GS_PERF_LOCAL_PHYSICAL_ERRORS_LIMIT = 0xffff, // PortLocalPhysicalErrors + GS_PERF_MALFORMED_PACKET_ERRORS_LIMIT = 0xffff, // PortMalformedPacketErrors + GS_PERF_BUFFER_OVERRUN_ERRORS_LIMIT = 0xffff, // PortBufferOverrunErrors + GS_PERF_DLID_MAPPING_ERRORS_LIMIT = 0xffff, // PortDLIDMappingErrors + GS_PERF_VL_MAPPING_ERRORS_LIMIT = 0xffff, // PortVLMappingErrors + GS_PERF_LOOPING_ERRORS_LIMIT = 0xffff, // PortLoopingErrors + GS_PERF_INACTIVE_DISCARDS_LIMIT = 0xffff, // PortInactiveDiscards + GS_PERF_NEIGHBOR_MTU_DISCARDS_LIMIT = 0xffff, // PortNeighborMTUDiscards + GS_PERF_SW_LIFETIME_LIMIT_DISCARDS_LIMIT = 0xffff, // PortSwLifetimeLimitDiscards + GS_PERF_SW_HOQ_LIFETIME_LIMIT_DISCARDS_LIMIT = 0xffff, // PortSwHOQLifetimeLimitDiscards + GS_PERF_OP_RCV_PKTS_LIMIT = 0xffffffff, // PortOpRcvPkts + GS_PERF_OP_RCV_DATA_LIMIT = 0xffffffff, // PortOpRcvData + GS_PERF_XMIT_FLOW_PKTS_LIMIT = 0xffffffff, // PortXmitFlowPkts + GS_PERF_RCV_FLOW_PKTS_LIMIT = 0xffffffff, // PortRcvFlowPkts + GS_PERF_VL_OP_PACKETS_LIMIT = 0xffff, // PortVLOpPackets[0-15] + GS_PERF_VL_OP_DATA_LIMIT = 0xffffffff, // PortVLOpData[0-15] + GS_PERF_VL_XMIT_FLOW_CTL_UPDATE_ERRORS = 0x3, // PortVLXmitFlowCtlUpdateErrors[0-15] + GS_PERF_VL_XMIT_WAIT_COUNTERS_LIMIT = 0xffff, // PortVLXmitWaitCounters[0-15] }; typedef struct Port Port; @@ -185,6 +232,48 @@ struct Portcounters { uint16_t errs_rcvswitchrelay; uint8_t errs_excessbufovrrun; uint32_t xmt_wait; + + struct PortRcvErrorDetails { + uint16_t PortLocalPhysicalErrors; + uint16_t PortMalformedPacketErrors; + uint16_t PortBufferOverrunErrors; + uint16_t PortDLIDMappingErrors; + uint16_t PortVLMappingErrors; + uint16_t PortLoopingErrors; + } rcv_error_details; + + struct PortXmitDiscardDetails { + uint16_t PortInactiveDiscards; + uint16_t PortNeighborMTUDiscards; + uint16_t PortSwLifetimeLimitDiscards; + uint16_t PortSwHOQLifetimeLimitDiscards; + } xmit_discard_details; + + struct PortOpRcvCounters { + uint32_t PortOpRcvPkts; + uint32_t PortOpRcvData; + } op_rcv_counters; + + struct PortFlowCtlCounters { + uint32_t PortXmitFlowPkts; + uint32_t PortRcvFlowPkts; + } flow_ctl_counters; + + struct PortVLOpPackets { + uint16_t PortVLOpPackets[16]; + } vl_op_packets; + + struct PortVLOpData { + uint32_t PortVLOpData[16]; + } vl_op_data; + + struct PortVLXmitFlowCtlUpdateErrors { + uint8_t PortVLXmitFlowCtlUpdateErrors[16]; + } vl_xmit_flow_ctl_update_errors; + + struct PortVLXmitWaitCounters { + uint16_t PortVLXmitWait[16]; + } vl_xmit_wait_counters; }; struct Port {