blob: 0461de550f5da56ab54f9529e41e0d17bbf31da1 [file] [log] [blame]
/*
* Copyright (C) 2003-2009 Chelsio Communications. All rights reserved.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file included in this
* release for licensing terms and conditions.
*/
#ifndef _CXGB4_OFLD_CTL_DEFS_H
#define _CXGB4_OFLD_CTL_DEFS_H
#include <linux/types.h>
enum {
GET_MAX_OUTSTANDING_WR = 0,
GET_TX_MAX_CHUNK = 1,
GET_MTUS = 6,
GET_WR_LEN = 7,
GET_DDP_PARAMS = 9,
ULP_ISCSI_GET_PARAMS = 10,
ULP_ISCSI_SET_PARAMS = 11,
RDMA_GET_PARAMS = 12,
RDMA_CQ_OP = 13,
RDMA_CQ_SETUP = 14,
RDMA_CQ_DISABLE = 15,
GET_PORT_SCHED = 21,
GET_NUM_QUEUES = 22,
GET_CHAN_MAP = 23,
GET_PORT_ARRAY = 24,
};
/*
* Structure used to describe a TID range. Valid TIDs are [base, base+num).
*/
struct tid_range {
unsigned int base; /* first TID */
unsigned int num; /* number of TIDs in range */
};
/*
* Structure used to request the size and contents of the MTU table.
*/
struct mtutab {
unsigned int size; /* # of entries in the MTU table */
const unsigned short *mtus; /* the MTU table values */
};
struct port_array {
unsigned int nports; /* number of ports on this adapter */
struct net_device **lldevs; /* points to array of net_devices */
};
struct net_device;
/* Structure used to request a port's offload scheduler */
struct port_sched {
struct net_device *dev; /* the net_device */
int sched; /* associated scheduler */
};
struct pci_dev;
/*
* Structure used to request the TCP DDP parameters.
*/
struct ddp_params {
unsigned int llimit; /* TDDP region start address */
unsigned int ulimit; /* TDDP region end address */
unsigned int tag_mask; /* TDDP tag mask */
struct pci_dev *pdev;
};
/*
* Structure used to return information to the iscsi layer.
*/
struct ulp_iscsi_info {
unsigned int offset;
unsigned int llimit;
unsigned int ulimit;
unsigned int tagmask;
unsigned char pgsz_factor[4];
unsigned int max_rxsz;
unsigned int max_txsz;
struct pci_dev *pdev;
};
/*
* Structure used to return information to the RDMA layer.
*/
struct rdma_info {
unsigned int tpt_base; /* TPT base address */
unsigned int tpt_top; /* TPT last entry address */
unsigned int pbl_base; /* PBL base address */
unsigned int pbl_top; /* PBL last entry address */
unsigned int rqt_base; /* RQT base address */
unsigned int rqt_top; /* RQT last entry address */
unsigned int udbell_len; /* user doorbell region length */
resource_size_t udbell_physbase; /* user doorbell physical start addr */
void __iomem *kdb_addr; /* kernel doorbell register address */
struct pci_dev *pdev; /* associated PCI device */
};
/*
* Structure used to request an operation on an RDMA completion queue.
*/
struct rdma_cq_op {
unsigned int id;
unsigned int op;
unsigned int credits;
};
/*
* Structure used to setup RDMA completion queues.
*/
struct rdma_cq_setup {
unsigned int id;
unsigned long long base_addr;
unsigned int size;
unsigned int credits;
unsigned int credit_thres;
unsigned int ovfl_mode;
};
struct toedev;
#endif /* _CXGB4_OFLD_CTL_DEFS_H */