vnet_common.h revision 7b1f684a14f99a2b9b1b2561f484ff648eff6d9b
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _VNET_COMMON_H
#define _VNET_COMMON_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/vio_common.h>
#include <sys/vio_mailbox.h>
#include <sys/ethernet.h>
/*
* This header file contains definitions common to LDoms Virtual Network
* server (vsw) and client (vnet).
*/
/* max # of cookies per frame size */
/* initial send sequence number */
#define VNET_ISS 0x1
/*
* Maximum MTU value currently supported. MAX_COOKIES for data has been defined
* already based on ETHERMAX. Hence we limit the MTU to be within 2 8K pages
* and take some additional steps (see related code in .c files) to ensure that
* ldc cookies for each data buffer is within the MAX_COOKIES. This allows us
* to support Jumbo MTUs without changing the size of the descriptor.
*/
#define VNET_MAX_MTU 16000
/* vnet descriptor */
typedef struct vnet_public_desc {
/*
* Vnet in-band descriptor. Used by those vnet clients
* such as OBP who do not use descriptor rings.
*/
typedef struct vnet_ibnd_desc {
/* payload */
/* exported functions */
#ifdef __cplusplus
}
#endif
#endif /* _VNET_COMMON_H */