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