xnf.h revision 843e19887f64dde75055cf8842fc4db2171eff45
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_XNF_H
#define _SYS_XNF_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/hypervisor.h>
#ifdef __cplusplus
extern "C" {
#endif
#define XNF_MAX_RXDESCS 256
/* Watermark for causing "interrupt on completion" for outgoing packets */
#define MCAST_HASHBITS 256
extern int xnf_diagnose; /* Available for use any time. */
/* Flags to set in the global xnf_diagnose */
#define XNF_DIAG_RX 0x01
#define XNF_DIAG_TX 0x02
#define XNF_DIAG_STATS 0x04
#define XNF_DIAG_RX_BUFS 0x08
/* DEBUG flags */
#define XNF_DEBUG_DDI 0x01
#define XNF_DEBUG_TRACE 0x02
#define XNF_DEBUG_SEND 0x04
#define XNF_DEBUG_INT 0x08
#define XNF_DESC_ALIGN 8
struct xnf_buffer_desc {
};
/* Various information about each transmit packet */
struct tx_pktinfo {
};
/* Per network-interface-controller driver private structure */
typedef struct xnf {
/* most interesting stuff first to assist debugging */
int rx_bufs_outstanding;
int tx_descs_free;
int rx_descs_free; /* count of free rx bufs */
int n_xmits; /* No. xmit descriptors */
int n_recvs; /* No. recv descriptors */
int n_recv_bufs; /* No. recv DMA buffers */
unsigned char mac_addr[ETHERADDRL];
int max_recv_bufs;
int recv_buffer_count;
int xmit_buffer_count;
struct xnf_buffer_desc *free_list;
struct xnf_buffer_desc *xmit_free_list;
int tx_pkt_id_list; /* free list of avail pkt ids */
} xnf_t;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_XNF_H */