Loading...
1/* This file is part of the Emulex RoCE Device Driver for
2 * RoCE (RDMA over Converged Ethernet) adapters.
3 * Copyright (C) 2012-2015 Emulex. All rights reserved.
4 * EMULEX and SLI are trademarks of Emulex.
5 * www.emulex.com
6 *
7 * This software is available to you under a choice of one of two licenses.
8 * You may choose to be licensed under the terms of the GNU General Public
9 * License (GPL) Version 2, available from the file COPYING in the main
10 * directory of this source tree, or the BSD license below:
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 *
16 * - Redistributions of source code must retain the above copyright notice,
17 * this list of conditions and the following disclaimer.
18 *
19 * - 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 distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 *
35 * Contact Information:
36 * linux-drivers@emulex.com
37 *
38 * Emulex
39 * 3333 Susan Street
40 * Costa Mesa, CA 92626
41 */
42
43#ifndef __OCRDMA_STATS_H__
44#define __OCRDMA_STATS_H__
45
46#include <linux/debugfs.h>
47#include "ocrdma.h"
48#include "ocrdma_hw.h"
49
50#define OCRDMA_MAX_DBGFS_MEM 4096
51
52enum OCRDMA_STATS_TYPE {
53 OCRDMA_RSRC_STATS,
54 OCRDMA_RXSTATS,
55 OCRDMA_WQESTATS,
56 OCRDMA_TXSTATS,
57 OCRDMA_DB_ERRSTATS,
58 OCRDMA_RXQP_ERRSTATS,
59 OCRDMA_TXQP_ERRSTATS,
60 OCRDMA_TX_DBG_STATS,
61 OCRDMA_RX_DBG_STATS,
62 OCRDMA_DRV_STATS,
63 OCRDMA_RESET_STATS
64};
65
66void ocrdma_rem_debugfs(void);
67void ocrdma_init_debugfs(void);
68bool ocrdma_alloc_stats_resources(struct ocrdma_dev *dev);
69void ocrdma_release_stats_resources(struct ocrdma_dev *dev);
70void ocrdma_rem_port_stats(struct ocrdma_dev *dev);
71void ocrdma_add_port_stats(struct ocrdma_dev *dev);
72void ocrdma_pma_counters(struct ocrdma_dev *dev, struct ib_mad *out_mad);
73
74#endif /* __OCRDMA_STATS_H__ */
1/*******************************************************************
2 * This file is part of the Emulex RoCE Device Driver for *
3 * RoCE (RDMA over Converged Ethernet) adapters. *
4 * Copyright (C) 2008-2014 Emulex. All rights reserved. *
5 * EMULEX and SLI are trademarks of Emulex. *
6 * www.emulex.com *
7 * *
8 * This program is free software; you can redistribute it and/or *
9 * modify it under the terms of version 2 of the GNU General *
10 * Public License as published by the Free Software Foundation. *
11 * This program is distributed in the hope that it will be useful. *
12 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
13 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
14 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
15 * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
16 * TO BE LEGALLY INVALID. See the GNU General Public License for *
17 * more details, a copy of which can be found in the file COPYING *
18 * included with this package. *
19 *
20 * Contact Information:
21 * linux-drivers@emulex.com
22 *
23 * Emulex
24 * 3333 Susan Street
25 * Costa Mesa, CA 92626
26 *******************************************************************/
27
28#ifndef __OCRDMA_STATS_H__
29#define __OCRDMA_STATS_H__
30
31#include <linux/debugfs.h>
32#include "ocrdma.h"
33#include "ocrdma_hw.h"
34
35#define OCRDMA_MAX_DBGFS_MEM 4096
36
37enum OCRDMA_STATS_TYPE {
38 OCRDMA_RSRC_STATS,
39 OCRDMA_RXSTATS,
40 OCRDMA_WQESTATS,
41 OCRDMA_TXSTATS,
42 OCRDMA_DB_ERRSTATS,
43 OCRDMA_RXQP_ERRSTATS,
44 OCRDMA_TXQP_ERRSTATS,
45 OCRDMA_TX_DBG_STATS,
46 OCRDMA_RX_DBG_STATS
47};
48
49void ocrdma_rem_debugfs(void);
50void ocrdma_init_debugfs(void);
51void ocrdma_rem_port_stats(struct ocrdma_dev *dev);
52void ocrdma_add_port_stats(struct ocrdma_dev *dev);
53
54#endif /* __OCRDMA_STATS_H__ */