3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs/*
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * CDDL HEADER START
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs *
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * The contents of this file are subject to the terms of the
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Common Development and Distribution License (the "License").
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * You may not use this file except in compliance with the License.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs *
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * or http://www.opensolaris.org/os/licensing.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * See the License for the specific language governing permissions
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * and limitations under the License.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs *
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * When distributing Covered Code, include this CDDL HEADER in each
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * If applicable, add the following below this CDDL HEADER, with the
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * fields enclosed by brackets "[]" replaced with your own identifying
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * information: Portions Copyright [yyyy] [name of copyright owner]
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs *
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * CDDL HEADER END
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs/*
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs * Use is subject to license terms.
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#ifndef _SYS_HXGE_HXGE_VMAC_H
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#define _SYS_HXGE_HXGE_VMAC_H
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#pragma ident "%Z%%M% %I% %E% SMI"
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#ifdef __cplusplus
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qsextern "C" {
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#endif
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#include <hxge_vmac_hw.h>
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#include <hpi_vmac.h>
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs/* Common MAC statistics */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qstypedef struct _hxge_mac_stats {
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs /* Transciever state informations. */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint32_t cap_10gfdx;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs /* Advertised capabilities. */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint32_t adv_cap_10gfdx;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs /* Link partner capabilities. */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint32_t lp_cap_10gfdx;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs /* Physical link statistics. */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint32_t link_speed;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint32_t link_duplex;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint32_t link_up;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs /* Promiscous mode */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs boolean_t promisc;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs} hxge_mac_stats_t;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs/* VMAC statistics */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qstypedef struct _hxge_vmac_stats {
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t tx_frame_cnt; /* vmac_tx_frame_cnt_t */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t tx_byte_cnt; /* vmac_tx_byte_cnt_t */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t rx_frame_cnt; /* vmac_rx_frame_cnt_t */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t rx_byte_cnt; /* vmac_rx_byte_cnt_t */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t rx_drop_frame_cnt; /* vmac_rx_drop_fr_cnt_t */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t rx_drop_byte_cnt; /* vmac_rx_drop_byte_cnt_t */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t rx_crc_cnt; /* vmac_rx_crc_cnt_t */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t rx_pause_cnt; /* vmac_rx_pause_cnt_t */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t rx_bcast_fr_cnt; /* vmac_rx_bcast_fr_cnt_t */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t rx_mcast_fr_cnt; /* vmac_rx_mcast_fr_cnt_t */
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs} hxge_vmac_stats_t, *p_hxge_vmac_stats_t;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qstypedef struct _hxge_vmac {
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs boolean_t is_jumbo;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t tx_config;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint64_t rx_config;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint16_t minframesize;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint16_t maxframesize;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs uint16_t maxburstsize;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs} hxge_vmac_t;
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#ifdef __cplusplus
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs}
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#endif
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs
3dec9fcdd56adf1b4a563137b4915c8f2d83b881qs#endif /* _SYS_HXGE_HXGE_VMAC_H */