xref: /titanic_50/usr/src/uts/common/io/hxge/hxge_vmac.h (revision 3dec9fcdd56adf1b4a563137b4915c8f2d83b881)
1*3dec9fcdSqs148142 /*
2*3dec9fcdSqs148142  * CDDL HEADER START
3*3dec9fcdSqs148142  *
4*3dec9fcdSqs148142  * The contents of this file are subject to the terms of the
5*3dec9fcdSqs148142  * Common Development and Distribution License (the "License").
6*3dec9fcdSqs148142  * You may not use this file except in compliance with the License.
7*3dec9fcdSqs148142  *
8*3dec9fcdSqs148142  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*3dec9fcdSqs148142  * or http://www.opensolaris.org/os/licensing.
10*3dec9fcdSqs148142  * See the License for the specific language governing permissions
11*3dec9fcdSqs148142  * and limitations under the License.
12*3dec9fcdSqs148142  *
13*3dec9fcdSqs148142  * When distributing Covered Code, include this CDDL HEADER in each
14*3dec9fcdSqs148142  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*3dec9fcdSqs148142  * If applicable, add the following below this CDDL HEADER, with the
16*3dec9fcdSqs148142  * fields enclosed by brackets "[]" replaced with your own identifying
17*3dec9fcdSqs148142  * information: Portions Copyright [yyyy] [name of copyright owner]
18*3dec9fcdSqs148142  *
19*3dec9fcdSqs148142  * CDDL HEADER END
20*3dec9fcdSqs148142  */
21*3dec9fcdSqs148142 /*
22*3dec9fcdSqs148142  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23*3dec9fcdSqs148142  * Use is subject to license terms.
24*3dec9fcdSqs148142  */
25*3dec9fcdSqs148142 
26*3dec9fcdSqs148142 #ifndef	_SYS_HXGE_HXGE_VMAC_H
27*3dec9fcdSqs148142 #define	_SYS_HXGE_HXGE_VMAC_H
28*3dec9fcdSqs148142 
29*3dec9fcdSqs148142 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*3dec9fcdSqs148142 
31*3dec9fcdSqs148142 #ifdef	__cplusplus
32*3dec9fcdSqs148142 extern "C" {
33*3dec9fcdSqs148142 #endif
34*3dec9fcdSqs148142 
35*3dec9fcdSqs148142 #include <hxge_vmac_hw.h>
36*3dec9fcdSqs148142 #include <hpi_vmac.h>
37*3dec9fcdSqs148142 
38*3dec9fcdSqs148142 /* Common MAC statistics */
39*3dec9fcdSqs148142 typedef	struct _hxge_mac_stats {
40*3dec9fcdSqs148142 	/* Transciever state informations. */
41*3dec9fcdSqs148142 	uint32_t	cap_10gfdx;
42*3dec9fcdSqs148142 
43*3dec9fcdSqs148142 	/* Advertised capabilities. */
44*3dec9fcdSqs148142 	uint32_t	adv_cap_10gfdx;
45*3dec9fcdSqs148142 
46*3dec9fcdSqs148142 	/* Link partner capabilities. */
47*3dec9fcdSqs148142 	uint32_t	lp_cap_10gfdx;
48*3dec9fcdSqs148142 
49*3dec9fcdSqs148142 	/* Physical link statistics. */
50*3dec9fcdSqs148142 	uint32_t	link_speed;
51*3dec9fcdSqs148142 	uint32_t	link_duplex;
52*3dec9fcdSqs148142 	uint32_t	link_up;
53*3dec9fcdSqs148142 
54*3dec9fcdSqs148142 	/* Promiscous mode */
55*3dec9fcdSqs148142 	boolean_t	promisc;
56*3dec9fcdSqs148142 } hxge_mac_stats_t;
57*3dec9fcdSqs148142 
58*3dec9fcdSqs148142 /* VMAC statistics */
59*3dec9fcdSqs148142 
60*3dec9fcdSqs148142 typedef	struct _hxge_vmac_stats {
61*3dec9fcdSqs148142 	uint64_t	tx_frame_cnt;		/* vmac_tx_frame_cnt_t */
62*3dec9fcdSqs148142 	uint64_t	tx_byte_cnt;		/* vmac_tx_byte_cnt_t */
63*3dec9fcdSqs148142 
64*3dec9fcdSqs148142 	uint64_t	rx_frame_cnt;		/* vmac_rx_frame_cnt_t */
65*3dec9fcdSqs148142 	uint64_t	rx_byte_cnt;		/* vmac_rx_byte_cnt_t */
66*3dec9fcdSqs148142 	uint64_t	rx_drop_frame_cnt;	/* vmac_rx_drop_fr_cnt_t */
67*3dec9fcdSqs148142 	uint64_t	rx_drop_byte_cnt;	/* vmac_rx_drop_byte_cnt_t */
68*3dec9fcdSqs148142 	uint64_t	rx_crc_cnt;		/* vmac_rx_crc_cnt_t */
69*3dec9fcdSqs148142 	uint64_t	rx_pause_cnt;		/* vmac_rx_pause_cnt_t */
70*3dec9fcdSqs148142 	uint64_t	rx_bcast_fr_cnt;	/* vmac_rx_bcast_fr_cnt_t */
71*3dec9fcdSqs148142 	uint64_t	rx_mcast_fr_cnt;	/* vmac_rx_mcast_fr_cnt_t */
72*3dec9fcdSqs148142 } hxge_vmac_stats_t, *p_hxge_vmac_stats_t;
73*3dec9fcdSqs148142 
74*3dec9fcdSqs148142 
75*3dec9fcdSqs148142 typedef	struct _hxge_vmac {
76*3dec9fcdSqs148142 	boolean_t		is_jumbo;
77*3dec9fcdSqs148142 	uint64_t		tx_config;
78*3dec9fcdSqs148142 	uint64_t		rx_config;
79*3dec9fcdSqs148142 	uint16_t		minframesize;
80*3dec9fcdSqs148142 	uint16_t		maxframesize;
81*3dec9fcdSqs148142 	uint16_t		maxburstsize;
82*3dec9fcdSqs148142 } hxge_vmac_t;
83*3dec9fcdSqs148142 
84*3dec9fcdSqs148142 
85*3dec9fcdSqs148142 #ifdef	__cplusplus
86*3dec9fcdSqs148142 }
87*3dec9fcdSqs148142 #endif
88*3dec9fcdSqs148142 
89*3dec9fcdSqs148142 #endif	/* _SYS_HXGE_HXGE_VMAC_H */
90