Go to the documentation of this file.
28 #ifndef __OCRDMA_SLI_H__
29 #define __OCRDMA_SLI_H__
31 #define Bit(_b) (1 << (_b))
33 #define OCRDMA_GEN1_FAMILY 0xB
34 #define OCRDMA_GEN2_FAMILY 0x2
36 #define OCRDMA_SUBSYS_ROCE 10
71 #define OCRDMA_SUBSYS_COMMON 1
90 #define OCRDMA_MAX_SGID (8)
92 #define OCRDMA_MAX_QP 2048
93 #define OCRDMA_MAX_CQ 2048
108 #define OCRDMA_DB_CQ_RING_ID_MASK 0x3FF
109 #define OCRDMA_DB_CQ_RING_ID_EXT_MASK 0x0C00
111 #define OCRDMA_DB_CQ_RING_ID_EXT_MASK_SHIFT 0x1
112 #define OCRDMA_DB_CQ_NUM_POPPED_SHIFT (16)
114 #define OCRDMA_DB_CQ_REARM_SHIFT (29)
116 #define OCRDMA_DB_CQ_SOLICIT_SHIFT (31)
118 #define OCRDMA_EQ_ID_MASK 0x1FF
119 #define OCRDMA_EQ_ID_EXT_MASK 0x3e00
120 #define OCRDMA_EQ_ID_EXT_MASK_SHIFT (2)
123 #define OCRDMA_EQ_CLR_SHIFT (9)
125 #define OCRDMA_EQ_TYPE_SHIFT (10)
127 #define OCRDMA_NUM_EQE_SHIFT (16)
129 #define OCRDMA_REARM_SHIFT (29)
131 #define OCRDMA_MQ_ID_MASK 0x7FF
133 #define OCRDMA_MQ_NUM_MQE_SHIFT (16)
135 #define OCRDMA_MIN_HPAGE_SIZE (4096)
137 #define OCRDMA_MIN_Q_PAGE_SIZE (4096)
138 #define OCRDMA_MAX_Q_PAGES (8)
147 #define OCRDMA_MAX_Q_PAGE_SIZE_CNT (5)
148 #define OCRDMA_Q_PAGE_BASE_SIZE (OCRDMA_MIN_Q_PAGE_SIZE * OCRDMA_MAX_Q_PAGES)
150 #define MAX_OCRDMA_QP_PAGES (8)
151 #define OCRDMA_MAX_WQE_MEM_SIZE (MAX_OCRDMA_QP_PAGES * OCRDMA_MIN_HQ_PAGE_SIZE)
153 #define OCRDMA_CREATE_CQ_MAX_PAGES (4)
154 #define OCRDMA_DPP_CQE_SIZE (4)
156 #define OCRDMA_GEN2_MAX_CQE 1024
157 #define OCRDMA_GEN2_CQ_PAGE_SIZE 4096
158 #define OCRDMA_GEN2_WQE_SIZE 256
159 #define OCRDMA_MAX_CQE 4095
160 #define OCRDMA_CQ_PAGE_SIZE 16384
161 #define OCRDMA_WQE_SIZE 128
162 #define OCRDMA_WQE_STRIDE 8
163 #define OCRDMA_WQE_ALIGN_BYTES 16
165 #define MAX_OCRDMA_SRQ_PAGES MAX_OCRDMA_QP_PAGES
247 #define OCRDMA_EQ_LEN 4096
248 #define OCRDMA_MQ_CQ_LEN 256
249 #define OCRDMA_MQ_LEN 128
251 #define PAGE_SHIFT_4K 12
252 #define PAGE_SIZE_4K (1 << PAGE_SHIFT_4K)
255 #define PAGES_4K_SPANNED(_address, size) \
256 ((u32)((((size_t)(_address) & (PAGE_SIZE_4K - 1)) + \
257 (size) + (PAGE_SIZE_4K - 1)) >> PAGE_SHIFT_4K))
269 #define MAX_OCRDMA_EQ_PAGES (8)
291 #define OCRDMA_EQ_MINOR_OTHER (0x1)
387 #define OCRDMA_ASYNC_EVE_CODE 0x14
747 #define MAX_OCRDMA_IRD_PAGES 4
1032 #define OCRDMA_QUERY_UP_QP_ID_SHIFT 0
1033 #define OCRDMA_QUERY_UP_QP_ID_MASK 0xFFFFFF
1248 #define MAX_OCRDMA_NSMR_PBL (u32)22
1249 #define MAX_OCRDMA_PBL_SIZE 65536
1250 #define MAX_OCRDMA_PBL_PER_LKEY 32767
1429 #define OCRDMA_AH_TBL_PAGES 8
1553 #define is_cqe_valid(cq, cqe) \
1554 (((le32_to_cpu(cqe->flags_status_srcqpn) & OCRDMA_CQE_VALID)\
1555 == cq->phase) ? 1 : 0)
1556 #define is_cqe_for_sq(cqe) \
1557 ((le32_to_cpu(cqe->flags_status_srcqpn) & OCRDMA_CQE_QTYPE) ? 0 : 1)
1558 #define is_cqe_for_rq(cqe) \
1559 ((le32_to_cpu(cqe->flags_status_srcqpn) & OCRDMA_CQE_QTYPE) ? 1 : 0)
1560 #define is_cqe_invalidated(cqe) \
1561 ((le32_to_cpu(cqe->flags_status_srcqpn) & OCRDMA_CQE_INVALIDATE) ? \
1563 #define is_cqe_imm(cqe) \
1564 ((le32_to_cpu(cqe->flags_status_srcqpn) & OCRDMA_CQE_IMM) ? 1 : 0)
1565 #define is_cqe_wr_imm(cqe) \
1566 ((le32_to_cpu(cqe->flags_status_srcqpn) & OCRDMA_CQE_WRITE_IMM) ? 1 : 0)
1654 #define OCRDMA_ROCE_ETH_TYPE 0x8915
1666 #define OCRDMA_AV_VALID Bit(0)
1667 #define OCRDMA_AV_VLAN_VALID Bit(1)