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