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	OCRDMA_DRV_STATS,
48	OCRDMA_RESET_STATS
49};
50
51void ocrdma_rem_debugfs(void);
52void ocrdma_init_debugfs(void);
53void ocrdma_rem_port_stats(struct ocrdma_dev *dev);
54void ocrdma_add_port_stats(struct ocrdma_dev *dev);
55int ocrdma_pma_counters(struct ocrdma_dev *dev,
56			struct ib_mad *out_mad);
57
58#endif	/* __OCRDMA_STATS_H__ */
59