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