1 /* 2 * Broadcom NetXtreme-E RoCE driver. 3 * 4 * Copyright (c) 2016 - 2017, Broadcom. All rights reserved. The term 5 * Broadcom refers to Broadcom Limited and/or its subsidiaries. 6 * 7 * This software is available to you under a choice of one of two 8 * licenses. You may choose to be licensed under the terms of the GNU 9 * General Public License (GPL) Version 2, available from the file 10 * COPYING in the main directory of this source tree, or the 11 * BSD license below: 12 * 13 * Redistribution and use in source and binary forms, with or without 14 * modification, are permitted provided that the following conditions 15 * are met: 16 * 17 * 1. Redistributions of source code must retain the above copyright 18 * notice, this list of conditions and the following disclaimer. 19 * 2. Redistributions in binary form must reproduce the above copyright 20 * notice, this list of conditions and the following disclaimer in 21 * the documentation and/or other materials provided with the 22 * distribution. 23 * 24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 26 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 27 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 28 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 31 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 32 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 33 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 34 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 * 36 * Description: Statistics (header) 37 * 38 */ 39 40 #ifndef __BNXT_RE_HW_STATS_H__ 41 #define __BNXT_RE_HW_STATS_H__ 42 43 enum bnxt_re_hw_stats { 44 BNXT_RE_ACTIVE_QP, 45 BNXT_RE_ACTIVE_SRQ, 46 BNXT_RE_ACTIVE_CQ, 47 BNXT_RE_ACTIVE_MR, 48 BNXT_RE_ACTIVE_MW, 49 BNXT_RE_RX_PKTS, 50 BNXT_RE_RX_BYTES, 51 BNXT_RE_TX_PKTS, 52 BNXT_RE_TX_BYTES, 53 BNXT_RE_RECOVERABLE_ERRORS, 54 BNXT_RE_NUM_COUNTERS 55 }; 56 57 struct rdma_hw_stats *bnxt_re_ib_alloc_hw_stats(struct ib_device *ibdev, 58 u8 port_num); 59 int bnxt_re_ib_get_hw_stats(struct ib_device *ibdev, 60 struct rdma_hw_stats *stats, 61 u8 port, int index); 62 #endif /* __BNXT_RE_HW_STATS_H__ */ 63