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