oce_io.h revision 8d738d7d1f42180d941afa8b9a7310a2a437d17c
/*
* 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 2009 Emulex. All rights reserved.
* Use is subject to license terms.
*/
/*
* Header file defining the HW IO elements
*/
#ifndef _OCE_IO_H_
#define _OCE_IO_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/dditypes.h>
#include <sys/byteorder.h>
#include <oce_hw.h>
#include <oce_buf.h>
#define MBX_TIMEOUT_SEC 5
struct oce_dev;
enum eq_len {
EQ_LEN_256 = 256,
EQ_LEN_512 = 512,
EQ_LEN_1024 = 1024,
EQ_LEN_2048 = 2048,
EQ_LEN_4096 = 4096
};
enum eqe_size {
EQE_SIZE_4 = 4,
EQE_SIZE_16 = 16
};
enum qtype {
};
typedef enum qstate_e {
QDELETED = 0x0,
QCREATED = 0x1
}qstate_t;
struct eq_config {
/* number of entries in the eq */
/* size of each entry */
/* vector associated with this eq */
/* minimum possible eq delay i usec */
/* max eq delay in usec */
/* currently configured eq delay in usec */
/* pad */
};
struct oce_eq {
/* configuration of this eq */
/* id assigned by the hw to this eq */
/* handle to the creating parent dev */
void *parent;
/* callback context */
void *cb_context;
/* reference count of this structure */
/* ring buffer for this eq */
/* Queue state */
/* Lock for this queue */
};
enum cq_len {
CQ_LEN_256 = 256,
CQ_LEN_512 = 512,
CQ_LEN_1024 = 1024
};
struct cq_config {
/* length of queue */
/* size of each item */
/* is eventable */
/* solicited eventable? */
/* no delay? */
/* dma coalescing */
};
struct oce_cq {
/* configuration of this cq */
/* reference count of this structure */
/* id given by the hardware */
/* parent device to which this cq belongs */
void *parent;
/* event queue associated with this cq */
/* placeholder for callback context */
void *cb_arg;
/* ring buffer for this cq */
/* Queue state */
/* lock */
};
struct mq_config {
};
struct oce_mq {
/* configuration of this mq */
/* handle to the parent device */
void *parent;
/* send queue */
/* idnetifier for the mq */
/* free entries in Queue */
/* Queue state */
/* lock for the mq */
};
/*
* utility structure that handles context of mbx
*/
struct oce_mbx_ctx {
/* pointer to mbx */
/* call back functioin [optional] */
/* call back context [optional] */
void *cb_ctx;
};
struct wq_config {
/* qtype */
};
struct oce_wq {
void *parent; /* parent of this wq */
/* Queue state */
};
struct rq_config {
};
struct rq_shadow_entry {
};
struct oce_rq {
/* RQ config */
/* RQ id */
/* parent of this rq */
void *parent;
/* CPU ID assigend to this RQ if it is an RSS queue */
/* ring buffer managing the RQEs */
/* RQ Buffer cache */
/* kmem_cache_t *rqb_cache; */
/* shadow list of mblk for rq ring */
struct rq_shadow_entry *shadow_ring;
/* cq associated with this queue */
/* Queue state */
/* rq lock */
};
struct link_status {
/* dw 0 */
/* dw 1 */
};
/* Queues */
/* Bootstrap */
struct oce_mbx_ctx *mbxctx);
/* Hardware */
/* Transmit */
/* Recieve */
/* event handling */
struct oce_mbx_ctx *mbxctx);
/* mbx functions */
struct mbx_set_common_ntwk_rx_filter *filter);
struct normal_vlan *vtag_arr,
#ifdef __cplusplus
}
#endif
#endif /* _OCE_IO_H_ */