Divy Le Ray | 4d22de3 | 2007-01-18 22:04:14 -0500 | [diff] [blame^] | 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 | |
| 10 | #ifndef _CXGB3_OFFLOAD_CTL_DEFS_H |
| 11 | #define _CXGB3_OFFLOAD_CTL_DEFS_H |
| 12 | |
| 13 | enum { |
| 14 | GET_MAX_OUTSTANDING_WR, |
| 15 | GET_TX_MAX_CHUNK, |
| 16 | GET_TID_RANGE, |
| 17 | GET_STID_RANGE, |
| 18 | GET_RTBL_RANGE, |
| 19 | GET_L2T_CAPACITY, |
| 20 | GET_MTUS, |
| 21 | GET_WR_LEN, |
| 22 | GET_IFF_FROM_MAC, |
| 23 | GET_DDP_PARAMS, |
| 24 | GET_PORTS, |
| 25 | |
| 26 | ULP_ISCSI_GET_PARAMS, |
| 27 | ULP_ISCSI_SET_PARAMS, |
| 28 | |
| 29 | RDMA_GET_PARAMS, |
| 30 | RDMA_CQ_OP, |
| 31 | RDMA_CQ_SETUP, |
| 32 | RDMA_CQ_DISABLE, |
| 33 | RDMA_CTRL_QP_SETUP, |
| 34 | RDMA_GET_MEM, |
| 35 | }; |
| 36 | |
| 37 | /* |
| 38 | * Structure used to describe a TID range. Valid TIDs are [base, base+num). |
| 39 | */ |
| 40 | struct tid_range { |
| 41 | unsigned int base; /* first TID */ |
| 42 | unsigned int num; /* number of TIDs in range */ |
| 43 | }; |
| 44 | |
| 45 | /* |
| 46 | * Structure used to request the size and contents of the MTU table. |
| 47 | */ |
| 48 | struct mtutab { |
| 49 | unsigned int size; /* # of entries in the MTU table */ |
| 50 | const unsigned short *mtus; /* the MTU table values */ |
| 51 | }; |
| 52 | |
| 53 | struct net_device; |
| 54 | |
| 55 | /* |
| 56 | * Structure used to request the adapter net_device owning a given MAC address. |
| 57 | */ |
| 58 | struct iff_mac { |
| 59 | struct net_device *dev; /* the net_device */ |
| 60 | const unsigned char *mac_addr; /* MAC address to lookup */ |
| 61 | u16 vlan_tag; |
| 62 | }; |
| 63 | |
| 64 | struct pci_dev; |
| 65 | |
| 66 | /* |
| 67 | * Structure used to request the TCP DDP parameters. |
| 68 | */ |
| 69 | struct ddp_params { |
| 70 | unsigned int llimit; /* TDDP region start address */ |
| 71 | unsigned int ulimit; /* TDDP region end address */ |
| 72 | unsigned int tag_mask; /* TDDP tag mask */ |
| 73 | struct pci_dev *pdev; |
| 74 | }; |
| 75 | |
| 76 | struct adap_ports { |
| 77 | unsigned int nports; /* number of ports on this adapter */ |
| 78 | struct net_device *lldevs[2]; |
| 79 | }; |
| 80 | |
| 81 | /* |
| 82 | * Structure used to return information to the iscsi layer. |
| 83 | */ |
| 84 | struct ulp_iscsi_info { |
| 85 | unsigned int offset; |
| 86 | unsigned int llimit; |
| 87 | unsigned int ulimit; |
| 88 | unsigned int tagmask; |
| 89 | unsigned int pgsz3; |
| 90 | unsigned int pgsz2; |
| 91 | unsigned int pgsz1; |
| 92 | unsigned int pgsz0; |
| 93 | unsigned int max_rxsz; |
| 94 | unsigned int max_txsz; |
| 95 | struct pci_dev *pdev; |
| 96 | }; |
| 97 | |
| 98 | /* |
| 99 | * Structure used to return information to the RDMA layer. |
| 100 | */ |
| 101 | struct rdma_info { |
| 102 | unsigned int tpt_base; /* TPT base address */ |
| 103 | unsigned int tpt_top; /* TPT last entry address */ |
| 104 | unsigned int pbl_base; /* PBL base address */ |
| 105 | unsigned int pbl_top; /* PBL last entry address */ |
| 106 | unsigned int rqt_base; /* RQT base address */ |
| 107 | unsigned int rqt_top; /* RQT last entry address */ |
| 108 | unsigned int udbell_len; /* user doorbell region length */ |
| 109 | unsigned long udbell_physbase; /* user doorbell physical start addr */ |
| 110 | void __iomem *kdb_addr; /* kernel doorbell register address */ |
| 111 | struct pci_dev *pdev; /* associated PCI device */ |
| 112 | }; |
| 113 | |
| 114 | /* |
| 115 | * Structure used to request an operation on an RDMA completion queue. |
| 116 | */ |
| 117 | struct rdma_cq_op { |
| 118 | unsigned int id; |
| 119 | unsigned int op; |
| 120 | unsigned int credits; |
| 121 | }; |
| 122 | |
| 123 | /* |
| 124 | * Structure used to setup RDMA completion queues. |
| 125 | */ |
| 126 | struct rdma_cq_setup { |
| 127 | unsigned int id; |
| 128 | unsigned long long base_addr; |
| 129 | unsigned int size; |
| 130 | unsigned int credits; |
| 131 | unsigned int credit_thres; |
| 132 | unsigned int ovfl_mode; |
| 133 | }; |
| 134 | |
| 135 | /* |
| 136 | * Structure used to setup the RDMA control egress context. |
| 137 | */ |
| 138 | struct rdma_ctrlqp_setup { |
| 139 | unsigned long long base_addr; |
| 140 | unsigned int size; |
| 141 | }; |
| 142 | #endif /* _CXGB3_OFFLOAD_CTL_DEFS_H */ |