mac_stat.h revision 0dc2366f7b9f9f36e10909b1e95edbf2a261c2ac
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _MAC_STAT_H
#define _MAC_STAT_H
#include <sys/mac_flow_impl.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
struct mac_soft_ring_set_s;
struct mac_soft_ring_s;
typedef struct mac_rx_stats_s {
typedef struct mac_tx_stats_s {
/*
* Number of times the srs gets blocked due to lack of Tx
* desc is noted down. Corresponding wakeup from driver
* to unblock is also noted down. They should match in a
* correctly working setup. If there is less unblocks
* than blocks, then Tx side waits forever for a wakeup
* from below. The following protected by srs_lock.
*/
typedef struct mac_misc_stats_s {
/*
* When a ring is taken away from a mac client, before destroying
* corresponding SRS (for rx ring) or soft ring (for tx ring), add stats
* recorded by that SRS or soft ring to defunct lane stats.
*/
/* link protection stats */
extern void mac_misc_stat_create(flow_entry_t *);
extern void mac_misc_stat_delete(flow_entry_t *);
extern void mac_ring_stat_create(mac_ring_t *);
extern void mac_ring_stat_delete(mac_ring_t *);
extern void mac_srs_stat_create(struct mac_soft_ring_set_s *);
extern void mac_srs_stat_delete(struct mac_soft_ring_set_s *);
extern void mac_tx_srs_stat_recreate(struct mac_soft_ring_set_s *,
extern void mac_soft_ring_stat_create(struct mac_soft_ring_s *);
extern void mac_soft_ring_stat_delete(struct mac_soft_ring_s *);
extern void mac_stat_rename(mac_client_impl_t *);
extern void mac_pseudo_ring_stat_rename(mac_impl_t *);
extern void mac_driver_stat_create(mac_impl_t *);
extern void mac_driver_stat_delete(mac_impl_t *);
#endif /* _MAC_STAT_H */