FreeBSD kernel CXGB device code
cxgb_ctl_defs.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2003-2006 Chelsio Communications. All rights reserved.
3 *
4 * This program is distributed in the hope that it will be useful, but WITHOUT
5 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6 * FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file included in this
7 * release for licensing terms and conditions.
8 *
9 * $FreeBSD$
10 */
11
12#ifndef _CXGB3_OFFLOAD_CTL_DEFS_H
13#define _CXGB3_OFFLOAD_CTL_DEFS_H
14
15enum {
27
30
37
41
43
45};
46
47/*
48 * Structure used to describe a TID range. Valid TIDs are [base, base+num).
49 */
50struct tid_range {
51 unsigned int base; /* first TID */
52 unsigned int num; /* number of TIDs in range */
53};
54
55/*
56 * Structure used to request the size and contents of the MTU table.
57 */
58struct mtutab {
59 unsigned int size; /* # of entries in the MTU table */
60 const unsigned short *mtus; /* the MTU table values */
61};
62
63/*
64 * Structure used to request the ifnet that owns a given MAC address.
65 */
66struct iff_mac {
67 struct ifnet *dev;
68 const unsigned char *mac_addr;
70};
71
72struct pci_dev;
73
74/*
75 * Structure used to request the TCP DDP parameters.
76 */
77struct ddp_params {
78 unsigned int llimit; /* TDDP region start address */
79 unsigned int ulimit; /* TDDP region end address */
80 unsigned int tag_mask; /* TDDP tag mask */
81 struct pci_dev *pdev;
82};
83
84struct adap_ports {
85 unsigned int nports; /* number of ports on this adapter */
86 struct ifnet *lldevs[MAX_NPORTS];
87};
88
89/*
90 * Structure used to return information to the iscsi layer.
91 */
93 unsigned int offset;
94 unsigned int llimit;
95 unsigned int ulimit;
96 unsigned int tagmask;
97 unsigned int pgsz3;
98 unsigned int pgsz2;
99 unsigned int pgsz1;
100 unsigned int pgsz0;
101 unsigned int max_rxsz;
102 unsigned int max_txsz;
103 struct pci_dev *pdev;
104};
105
106/*
107 * Offload TX/RX page information.
108 */
110 unsigned int page_size; /* Page size, should be a power of 2 */
111 unsigned int num; /* Number of pages */
112};
113
114/*
115 * Structure used to return information to the RDMA layer.
116 */
117struct rdma_info {
118 unsigned int tpt_base; /* TPT base address */
119 unsigned int tpt_top; /* TPT last entry address */
120 unsigned int pbl_base; /* PBL base address */
121 unsigned int pbl_top; /* PBL last entry address */
122 unsigned int rqt_base; /* RQT base address */
123 unsigned int rqt_top; /* RQT last entry address */
124 unsigned int udbell_len; /* user doorbell region length */
125 unsigned long udbell_physbase; /* user doorbell physical start addr */
126 void *kdb_addr; /* kernel doorbell register address */
127 device_t pdev; /* associated PCI device */
128};
129
130/*
131 * Structure used to request an operation on an RDMA completion queue.
132 */
134 unsigned int id;
135 unsigned int op;
136 unsigned int credits;
137};
138
139/*
140 * Structure used to setup RDMA completion queues.
141 */
143 unsigned int id;
144 unsigned long long base_addr;
145 unsigned int size;
146 unsigned int credits;
147 unsigned int credit_thres;
148 unsigned int ovfl_mode;
149};
150
151/*
152 * Structure used to setup the RDMA control egress context.
153 */
155 unsigned long long base_addr;
156 unsigned int size;
157};
158#endif /* _CXGB3_OFFLOAD_CTL_DEFS_H */
@ FAILOVER
Definition: cxgb_ctl_defs.h:38
@ FAILOVER_CLEAR
Definition: cxgb_ctl_defs.h:40
@ GET_WR_LEN
Definition: cxgb_ctl_defs.h:23
@ RDMA_CQ_OP
Definition: cxgb_ctl_defs.h:32
@ RDMA_GET_PARAMS
Definition: cxgb_ctl_defs.h:31
@ GET_PORTS
Definition: cxgb_ctl_defs.h:26
@ FAILOVER_DONE
Definition: cxgb_ctl_defs.h:39
@ GET_MAX_OUTSTANDING_WR
Definition: cxgb_ctl_defs.h:16
@ RDMA_CQ_DISABLE
Definition: cxgb_ctl_defs.h:34
@ GET_DDP_PARAMS
Definition: cxgb_ctl_defs.h:25
@ RDMA_CTRL_QP_SETUP
Definition: cxgb_ctl_defs.h:35
@ RDMA_CQ_SETUP
Definition: cxgb_ctl_defs.h:33
@ GET_CPUIDX_OF_QSET
Definition: cxgb_ctl_defs.h:42
@ ULP_ISCSI_GET_PARAMS
Definition: cxgb_ctl_defs.h:28
@ GET_L2T_CAPACITY
Definition: cxgb_ctl_defs.h:21
@ GET_STID_RANGE
Definition: cxgb_ctl_defs.h:19
@ GET_RTBL_RANGE
Definition: cxgb_ctl_defs.h:20
@ RDMA_GET_MEM
Definition: cxgb_ctl_defs.h:36
@ GET_RX_PAGE_INFO
Definition: cxgb_ctl_defs.h:44
@ GET_TX_MAX_CHUNK
Definition: cxgb_ctl_defs.h:17
@ GET_TID_RANGE
Definition: cxgb_ctl_defs.h:18
@ ULP_ISCSI_SET_PARAMS
Definition: cxgb_ctl_defs.h:29
@ GET_IFF_FROM_MAC
Definition: cxgb_ctl_defs.h:24
@ GET_MTUS
Definition: cxgb_ctl_defs.h:22
@ MAX_NPORTS
Definition: cxgb_osdep.h:56
uint16_t u16
Definition: cxgb_osdep.h:201
unsigned int nports
Definition: cxgb_ctl_defs.h:85
struct ifnet * lldevs[MAX_NPORTS]
Definition: cxgb_ctl_defs.h:86
unsigned int ulimit
Definition: cxgb_ctl_defs.h:79
unsigned int llimit
Definition: cxgb_ctl_defs.h:78
struct pci_dev * pdev
Definition: cxgb_ctl_defs.h:81
unsigned int tag_mask
Definition: cxgb_ctl_defs.h:80
struct ifnet * dev
Definition: cxgb_ctl_defs.h:67
const unsigned char * mac_addr
Definition: cxgb_ctl_defs.h:68
u16 vlan_tag
Definition: cxgb_ctl_defs.h:69
const unsigned short * mtus
Definition: cxgb_ctl_defs.h:60
unsigned int size
Definition: cxgb_ctl_defs.h:59
unsigned int page_size
unsigned int num
unsigned int id
unsigned int credits
unsigned int op
unsigned int id
unsigned int size
unsigned int ovfl_mode
unsigned int credit_thres
unsigned int credits
unsigned long long base_addr
unsigned long long base_addr
unsigned int size
unsigned int tpt_base
unsigned int rqt_base
unsigned int pbl_base
unsigned long udbell_physbase
unsigned int udbell_len
void * kdb_addr
unsigned int pbl_top
device_t pdev
unsigned int rqt_top
unsigned int tpt_top
unsigned int base
Definition: cxgb_ctl_defs.h:51
unsigned int num
Definition: cxgb_ctl_defs.h:52
unsigned int pgsz0
unsigned int max_rxsz
unsigned int pgsz2
Definition: cxgb_ctl_defs.h:98
unsigned int tagmask
Definition: cxgb_ctl_defs.h:96
unsigned int pgsz3
Definition: cxgb_ctl_defs.h:97
unsigned int pgsz1
Definition: cxgb_ctl_defs.h:99
unsigned int llimit
Definition: cxgb_ctl_defs.h:94
unsigned int max_txsz
struct pci_dev * pdev
unsigned int ulimit
Definition: cxgb_ctl_defs.h:95
unsigned int offset
Definition: cxgb_ctl_defs.h:93