1 /*
2
3 Copyright (c) 2007, Chelsio Inc.
4 All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
8
9 1. Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer.
11
12 2. Neither the name of the Chelsio Corporation nor the names of its
13 contributors may be used to endorse or promote products derived from
14 this software without specific prior written permission.
15
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 POSSIBILITY OF SUCH DAMAGE.
27
28 $FreeBSD: releng/6.4/sys/dev/cxgb/common/cxgb_ctl_defs.h 174319 2007-12-05 22:05:49Z kmacy $
29
30 */
31
32 #ifndef _CXGB3_OFFLOAD_CTL_DEFS_H
33 #define _CXGB3_OFFLOAD_CTL_DEFS_H
34
35 enum {
36 GET_MAX_OUTSTANDING_WR,
37 GET_TX_MAX_CHUNK,
38 GET_TID_RANGE,
39 GET_STID_RANGE,
40 GET_RTBL_RANGE,
41 GET_L2T_CAPACITY,
42 GET_MTUS,
43 GET_WR_LEN,
44 GET_IFF_FROM_MAC,
45 GET_DDP_PARAMS,
46 GET_PORTS,
47
48 ULP_ISCSI_GET_PARAMS,
49 ULP_ISCSI_SET_PARAMS,
50
51 RDMA_GET_PARAMS,
52 RDMA_CQ_OP,
53 RDMA_CQ_SETUP,
54 RDMA_CQ_DISABLE,
55 RDMA_CTRL_QP_SETUP,
56 RDMA_GET_MEM,
57
58 FAILOVER = 30,
59 FAILOVER_DONE = 31,
60 FAILOVER_CLEAR = 32,
61
62 GET_CPUIDX_OF_QSET = 40,
63
64 GET_RX_PAGE_INFO = 50,
65 };
66
67 /*
68 * Structure used to describe a TID range. Valid TIDs are [base, base+num).
69 */
70 struct tid_range {
71 unsigned int base; /* first TID */
72 unsigned int num; /* number of TIDs in range */
73 };
74
75 /*
76 * Structure used to request the size and contents of the MTU table.
77 */
78 struct mtutab {
79 unsigned int size; /* # of entries in the MTU table */
80 const unsigned short *mtus; /* the MTU table values */
81 };
82
83 struct net_device;
84
85 /*
86 * Structure used to request the adapter net_device owning a given MAC address.
87 */
88 struct iff_mac {
89 struct net_device *dev; /* the net_device */
90 const unsigned char *mac_addr; /* MAC address to lookup */
91 u16 vlan_tag;
92 };
93
94 struct pci_dev;
95
96 /*
97 * Structure used to request the TCP DDP parameters.
98 */
99 struct ddp_params {
100 unsigned int llimit; /* TDDP region start address */
101 unsigned int ulimit; /* TDDP region end address */
102 unsigned int tag_mask; /* TDDP tag mask */
103 struct pci_dev *pdev;
104 };
105
106 struct adap_ports {
107 unsigned int nports; /* number of ports on this adapter */
108 struct net_device *lldevs[2];
109 };
110
111 /*
112 * Structure used to return information to the iscsi layer.
113 */
114 struct ulp_iscsi_info {
115 unsigned int offset;
116 unsigned int llimit;
117 unsigned int ulimit;
118 unsigned int tagmask;
119 unsigned int pgsz3;
120 unsigned int pgsz2;
121 unsigned int pgsz1;
122 unsigned int pgsz0;
123 unsigned int max_rxsz;
124 unsigned int max_txsz;
125 struct pci_dev *pdev;
126 };
127
128 /*
129 * Offload TX/RX page information.
130 */
131 struct ofld_page_info {
132 unsigned int page_size; /* Page size, should be a power of 2 */
133 unsigned int num; /* Number of pages */
134 };
135
136 /*
137 * Structure used to return information to the RDMA layer.
138 */
139 struct rdma_info {
140 unsigned int tpt_base; /* TPT base address */
141 unsigned int tpt_top; /* TPT last entry address */
142 unsigned int pbl_base; /* PBL base address */
143 unsigned int pbl_top; /* PBL last entry address */
144 unsigned int rqt_base; /* RQT base address */
145 unsigned int rqt_top; /* RQT last entry address */
146 unsigned int udbell_len; /* user doorbell region length */
147 unsigned long udbell_physbase; /* user doorbell physical start addr */
148 void volatile *kdb_addr; /* kernel doorbell register address */
149 struct pci_dev *pdev; /* associated PCI device */
150 };
151
152 /*
153 * Structure used to request an operation on an RDMA completion queue.
154 */
155 struct rdma_cq_op {
156 unsigned int id;
157 unsigned int op;
158 unsigned int credits;
159 };
160
161 /*
162 * Structure used to setup RDMA completion queues.
163 */
164 struct rdma_cq_setup {
165 unsigned int id;
166 unsigned long long base_addr;
167 unsigned int size;
168 unsigned int credits;
169 unsigned int credit_thres;
170 unsigned int ovfl_mode;
171 };
172
173 /*
174 * Structure used to setup the RDMA control egress context.
175 */
176 struct rdma_ctrlqp_setup {
177 unsigned long long base_addr;
178 unsigned int size;
179 };
180 #endif /* _CXGB3_OFFLOAD_CTL_DEFS_H */
Cache object: 0a3e243b80bcb203e9d3aeff006c0514
|