dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / include / sys / ib / mgt / ibmf / ibmf_kstat.h
blob643f7d477db5d8f3615a74f30f8efc25a37ba7c8
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_IB_MGT_IBMF_IBMF_KSTAT_H
28 #define _SYS_IB_MGT_IBMF_IBMF_KSTAT_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
33 * This file contains the IBMF kstat structures and defines.
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
40 /* Kstat structure definitions */
41 typedef struct ibmf_port_kstat_s {
42 kstat_named_t clients_registered; /* # clients registered on HCA */
43 kstat_named_t client_regs_failed; /* client registration failures */
44 kstat_named_t send_wqes_alloced; /* # currently allocated send WQEs */
45 kstat_named_t recv_wqes_alloced; /* # currently allocated recv WQEs */
46 kstat_named_t swqe_allocs_failed; /* send WQE allocations failed */
47 kstat_named_t rwqe_allocs_failed; /* recv WQE allocations failed */
48 } ibmf_port_kstat_t;
50 typedef struct ibmf_kstat_s {
51 kstat_named_t msgs_alloced; /* # currently allocated messages */
52 kstat_named_t msgs_active; /* # currently active messages */
53 kstat_named_t msgs_sent; /* # total msgs sent per port */
54 kstat_named_t msgs_received; /* # total msgs recv per port */
55 kstat_named_t sends_active; /* # currently active send messages */
56 kstat_named_t recvs_active; /* # currently active recv messages */
57 kstat_named_t ud_dests_alloced; /* # currently allocated UD Dests */
58 kstat_named_t alt_qps_alloced; /* # currently allocated alt. QPs */
59 kstat_named_t send_cb_active; /* # active send callbacks */
60 kstat_named_t recv_cb_active; /* # active send callbacks */
61 kstat_named_t recv_bufs_alloced; /* # receive buffers allocated */
62 kstat_named_t msg_allocs_failed; /* message allocations failed */
63 kstat_named_t uddest_allocs_failed; /* UD dest allocations failed */
64 kstat_named_t alt_qp_allocs_failed; /* alt. QP allocations failed */
65 kstat_named_t send_pkt_failed; /* send packet failures */
66 kstat_named_t rmpp_errors; /* count of rmpp errors */
67 } ibmf_kstat_t;
69 #define IBMF_ADD32_KSTATS(clientp, xx, val) \
70 if ((clientp != NULL) && (clientp->ic_kstatp != NULL)) { \
71 ibmf_kstat_t *kp; \
72 kp = (ibmf_kstat_t *)clientp->ic_kstatp->ks_data; \
73 kp->xx.value.ui32 += val; \
76 #define IBMF_SUB32_KSTATS(clientp, xx, val) \
77 if ((clientp != NULL) && (clientp->ic_kstatp != NULL)) { \
78 ibmf_kstat_t *kp; \
79 kp = (ibmf_kstat_t *)clientp->ic_kstatp->ks_data; \
80 kp->xx.value.ui32 -= val; \
83 #define IBMF_ADD32_PORT_KSTATS(cip, xx, val) \
84 if ((cip != NULL) && (cip->ci_port_kstatp != NULL)) { \
85 ibmf_port_kstat_t *kp; \
86 kp = (ibmf_port_kstat_t *)cip->ci_port_kstatp->ks_data; \
87 kp->xx.value.ui32 += val; \
90 #define IBMF_SUB32_PORT_KSTATS(cip, xx, val) \
91 if ((cip != NULL) && (cip->ci_port_kstatp != NULL)) { \
92 ibmf_port_kstat_t *kp; \
93 kp = (ibmf_port_kstat_t *)cip->ci_port_kstatp->ks_data; \
94 kp->xx.value.ui32 -= val; \
97 #ifdef __cplusplus
99 #endif
101 #endif /* _SYS_IB_MGT_IBMF_IBMF_KSTAT_H */