1*678453a8Sspeer /* 2*678453a8Sspeer * CDDL HEADER START 3*678453a8Sspeer * 4*678453a8Sspeer * The contents of this file are subject to the terms of the 5*678453a8Sspeer * Common Development and Distribution License (the "License"). 6*678453a8Sspeer * You may not use this file except in compliance with the License. 7*678453a8Sspeer * 8*678453a8Sspeer * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*678453a8Sspeer * or http://www.opensolaris.org/os/licensing. 10*678453a8Sspeer * See the License for the specific language governing permissions 11*678453a8Sspeer * and limitations under the License. 12*678453a8Sspeer * 13*678453a8Sspeer * When distributing Covered Code, include this CDDL HEADER in each 14*678453a8Sspeer * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*678453a8Sspeer * If applicable, add the following below this CDDL HEADER, with the 16*678453a8Sspeer * fields enclosed by brackets "[]" replaced with your own identifying 17*678453a8Sspeer * information: Portions Copyright [yyyy] [name of copyright owner] 18*678453a8Sspeer * 19*678453a8Sspeer * CDDL HEADER END 20*678453a8Sspeer */ 21*678453a8Sspeer 22*678453a8Sspeer /* 23*678453a8Sspeer * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24*678453a8Sspeer * Use is subject to license terms. 25*678453a8Sspeer */ 26*678453a8Sspeer 27*678453a8Sspeer #ifndef _VSW_HIO_H 28*678453a8Sspeer #define _VSW_HIO_H 29*678453a8Sspeer 30*678453a8Sspeer #pragma ident "%Z%%M% %I% %E% SMI" 31*678453a8Sspeer 32*678453a8Sspeer #ifdef __cplusplus 33*678453a8Sspeer extern "C" { 34*678453a8Sspeer #endif 35*678453a8Sspeer 36*678453a8Sspeer typedef struct vsw_share { 37*678453a8Sspeer uint32_t vs_state; /* State of this share */ 38*678453a8Sspeer uint32_t vs_index; /* Index in the shares array */ 39*678453a8Sspeer struct vsw *vs_vswp; /* Back pointer to vswp */ 40*678453a8Sspeer uint8_t vs_req_id; /* DDS request ID */ 41*678453a8Sspeer 42*678453a8Sspeer /* Cached info */ 43*678453a8Sspeer vsw_port_t *vs_portp; /* Corresponding port */ 44*678453a8Sspeer uint64_t vs_ldcid; /* LDC to which the share is assigned */ 45*678453a8Sspeer uint64_t vs_macaddr; /* Associated MAC addr */ 46*678453a8Sspeer uint64_t vs_cookie; /* Share Cookie from alloc_share */ 47*678453a8Sspeer 48*678453a8Sspeer /* physdev's share related info */ 49*678453a8Sspeer mac_share_handle_t vs_shdl; /* HIO share handle */ 50*678453a8Sspeer mac_group_info_t vs_rxginfo; /* RX group info */ 51*678453a8Sspeer uint64_t vs_gnum; /* RX group number */ 52*678453a8Sspeer } vsw_share_t; 53*678453a8Sspeer 54*678453a8Sspeer #define VSW_SHARE_FREE 0x0 55*678453a8Sspeer #define VSW_SHARE_ASSIGNED 0x1 56*678453a8Sspeer #define VSW_SHARE_DDS_SENT 0x2 57*678453a8Sspeer #define VSW_SHARE_DDS_ACKD 0x4 58*678453a8Sspeer 59*678453a8Sspeer /* Hybrid related info */ 60*678453a8Sspeer typedef struct vsw_hio { 61*678453a8Sspeer mac_capab_rings_t vh_rcapab; /* Rings capability data */ 62*678453a8Sspeer mac_capab_share_t vh_scapab; /* Share capability data */ 63*678453a8Sspeer vsw_share_t *vh_shares; /* Array of Shares */ 64*678453a8Sspeer uint32_t vh_num_shares; /* Number of shares available */ 65*678453a8Sspeer } vsw_hio_t; 66*678453a8Sspeer 67*678453a8Sspeer 68*678453a8Sspeer #ifdef __cplusplus 69*678453a8Sspeer } 70*678453a8Sspeer #endif 71*678453a8Sspeer 72*678453a8Sspeer #endif /* _VSW_HIO_H */ 73