oce_buf.h revision 12d61dab3304980e691068219eaaab6398744a2e
/*
* 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 2010 Emulex. All rights reserved.
* Use is subject to license terms.
*/
/*
* Header file defining the driver buffer management interface
*/
#ifndef _OCE_BUF_H_
#define _OCE_BUF_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/ddidmareq.h>
#include <oce_io.h>
#include <oce_utils.h>
#define OCE_MAX_TX_HDL 8
#define OCE_MAX_TXDMA_COOKIES 16
#define OCE_TXMAP_ALIGN 1
#define OCE_TX_LO_WM OCE_TX_MAX_FRAGS
/* helper structure to access OS addresses */
typedef union oce_addr_s {
struct {
#ifdef _BIG_ENDIAN
#else
#endif
}dw;
typedef struct oce_dma_buf_s {
/* size of the memory */
typedef struct oce_ring_buffer_s {
typedef struct oce_rq_bdesc_s {
typedef struct oce_wq_bdesc_s {
typedef struct oce_wq_mdesc_s {
enum entry_type {
};
typedef struct _oce_handle_s {
void *hdl; /* opaque handle */
typedef struct _oce_wqe_desc_s {
enum entry_type type;
#pragma pack(1)
/* Always keep it 2 mod 4 */
typedef struct _oce_rq_buf_hdr_s {
void *datap;
/* ether_vlan_header_t vhdr; */
#pragma pack()
#define OCE_RQE_BUF_HEADROOM sizeof (oce_rq_buf_hdr_t)
#define MAX_POOL_NAME 32
#define RING_NUM_FREE(ring) \
/* Rq cache */
/* Wq Cache */
#ifdef __cplusplus
}
#endif
#endif /* _OCE_BUF_H_ */