cxgb3_ctl_defs.h 3.3 KB

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