1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
3 * Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All rights reserved.
6 #ifndef _EFA_ADMIN_CMDS_H_
7 #define _EFA_ADMIN_CMDS_H_
9 #define EFA_ADMIN_API_VERSION_MAJOR 0
10 #define EFA_ADMIN_API_VERSION_MINOR 1
12 /* EFA admin queue opcodes */
13 enum efa_admin_aq_opcode
{
14 EFA_ADMIN_CREATE_QP
= 1,
15 EFA_ADMIN_MODIFY_QP
= 2,
16 EFA_ADMIN_QUERY_QP
= 3,
17 EFA_ADMIN_DESTROY_QP
= 4,
18 EFA_ADMIN_CREATE_AH
= 5,
19 EFA_ADMIN_DESTROY_AH
= 6,
21 EFA_ADMIN_DEREG_MR
= 8,
22 EFA_ADMIN_CREATE_CQ
= 9,
23 EFA_ADMIN_DESTROY_CQ
= 10,
24 EFA_ADMIN_GET_FEATURE
= 11,
25 EFA_ADMIN_SET_FEATURE
= 12,
26 EFA_ADMIN_GET_STATS
= 13,
27 EFA_ADMIN_ALLOC_PD
= 14,
28 EFA_ADMIN_DEALLOC_PD
= 15,
29 EFA_ADMIN_ALLOC_UAR
= 16,
30 EFA_ADMIN_DEALLOC_UAR
= 17,
31 EFA_ADMIN_CREATE_EQ
= 18,
32 EFA_ADMIN_DESTROY_EQ
= 19,
33 EFA_ADMIN_ALLOC_MR
= 20,
34 EFA_ADMIN_MAX_OPCODE
= 20,
37 enum efa_admin_aq_feature_id
{
38 EFA_ADMIN_DEVICE_ATTR
= 1,
39 EFA_ADMIN_AENQ_CONFIG
= 2,
40 EFA_ADMIN_NETWORK_ATTR
= 3,
41 EFA_ADMIN_QUEUE_ATTR
= 4,
42 EFA_ADMIN_HW_HINTS
= 5,
43 EFA_ADMIN_HOST_INFO
= 6,
44 EFA_ADMIN_EVENT_QUEUE_ATTR
= 7,
47 /* QP transport type */
48 enum efa_admin_qp_type
{
49 /* Unreliable Datagram */
50 EFA_ADMIN_QP_TYPE_UD
= 1,
51 /* Scalable Reliable Datagram */
52 EFA_ADMIN_QP_TYPE_SRD
= 2,
56 enum efa_admin_qp_state
{
57 EFA_ADMIN_QP_STATE_RESET
= 0,
58 EFA_ADMIN_QP_STATE_INIT
= 1,
59 EFA_ADMIN_QP_STATE_RTR
= 2,
60 EFA_ADMIN_QP_STATE_RTS
= 3,
61 EFA_ADMIN_QP_STATE_SQD
= 4,
62 EFA_ADMIN_QP_STATE_SQE
= 5,
63 EFA_ADMIN_QP_STATE_ERR
= 6,
66 enum efa_admin_get_stats_type
{
67 EFA_ADMIN_GET_STATS_TYPE_BASIC
= 0,
68 EFA_ADMIN_GET_STATS_TYPE_MESSAGES
= 1,
69 EFA_ADMIN_GET_STATS_TYPE_RDMA_READ
= 2,
70 EFA_ADMIN_GET_STATS_TYPE_RDMA_WRITE
= 3,
73 enum efa_admin_get_stats_scope
{
74 EFA_ADMIN_GET_STATS_SCOPE_ALL
= 0,
75 EFA_ADMIN_GET_STATS_SCOPE_QUEUE
= 1,
79 * QP allocation sizes, converted by fabric QueuePair (QP) create command
80 * from QP capabilities.
82 struct efa_admin_qp_alloc_size
{
83 /* Send descriptor ring size in bytes */
84 u32 send_queue_ring_size
;
86 /* Max number of WQEs that can be outstanding on send queue. */
90 * Recv descriptor ring size in bytes, sufficient for user-provided
93 u32 recv_queue_ring_size
;
95 /* Max number of WQEs that can be outstanding on recv queue */
99 struct efa_admin_create_qp_cmd
{
100 /* Common Admin Queue descriptor */
101 struct efa_admin_aq_common_desc aq_common_desc
;
103 /* Protection Domain associated with this QP */
110 * 0 : sq_virt - If set, SQ ring base address is
111 * virtual (IOVA returned by MR registration)
112 * 1 : rq_virt - If set, RQ ring base address is
113 * virtual (IOVA returned by MR registration)
114 * 2 : unsolicited_write_recv - If set, work requests
115 * will not be consumed for incoming RDMA write with
117 * 7:3 : reserved - MBZ
122 * Send queue (SQ) ring base physical address. This field is not
123 * used if this is a Low Latency Queue(LLQ).
127 /* Receive queue (RQ) ring base address. */
130 /* Index of CQ to be associated with Send Queue completions */
133 /* Index of CQ to be associated with Recv Queue completions */
137 * Memory registration key for the SQ ring, used only when not in
138 * LLQ mode and base address is virtual
143 * Memory registration key for the RQ ring, used only when base
148 /* Requested QP allocation sizes */
149 struct efa_admin_qp_alloc_size qp_alloc_size
;
154 /* Requested service level for the QP, 0 is the default SL */
164 struct efa_admin_create_qp_resp
{
165 /* Common Admin Queue completion descriptor */
166 struct efa_admin_acq_common_desc acq_common_desc
;
169 * Opaque handle to be used for consequent admin operations on the
175 * QP number in the given EFA virtual device. Least-significant bits (as
176 * needed according to max_qp) carry unique QP ID
183 /* Index of sub-CQ for Send Queue completions */
186 /* Index of sub-CQ for Receive Queue completions */
189 /* SQ doorbell address, as offset to PCIe DB BAR */
192 /* RQ doorbell address, as offset to PCIe DB BAR */
196 * low latency send queue ring base address as an offset to PCIe
199 u32 llq_descriptors_offset
;
202 struct efa_admin_modify_qp_cmd
{
203 /* Common Admin Queue descriptor */
204 struct efa_admin_aq_common_desc aq_common_desc
;
207 * Mask indicating which fields should be updated
212 * 4 : sq_drained_async_notify
218 /* QP handle returned by create_qp command */
224 /* Override current QP state (before applying the transition) */
233 /* Enable async notification when SQ is drained */
234 u8 sq_drained_async_notify
;
236 /* Number of RNR retries (valid only for SRD QPs) */
243 struct efa_admin_modify_qp_resp
{
244 /* Common Admin Queue completion descriptor */
245 struct efa_admin_acq_common_desc acq_common_desc
;
248 struct efa_admin_query_qp_cmd
{
249 /* Common Admin Queue descriptor */
250 struct efa_admin_aq_common_desc aq_common_desc
;
252 /* QP handle returned by create_qp command */
256 struct efa_admin_query_qp_resp
{
257 /* Common Admin Queue completion descriptor */
258 struct efa_admin_acq_common_desc acq_common_desc
;
269 /* Indicates that draining is in progress */
272 /* Number of RNR retries (valid only for SRD QPs) */
279 struct efa_admin_destroy_qp_cmd
{
280 /* Common Admin Queue descriptor */
281 struct efa_admin_aq_common_desc aq_common_desc
;
283 /* QP handle returned by create_qp command */
287 struct efa_admin_destroy_qp_resp
{
288 /* Common Admin Queue completion descriptor */
289 struct efa_admin_acq_common_desc acq_common_desc
;
293 * Create Address Handle command parameters. Must not be called more than
294 * once for the same destination
296 struct efa_admin_create_ah_cmd
{
297 /* Common Admin Queue descriptor */
298 struct efa_admin_aq_common_desc aq_common_desc
;
300 /* Destination address in network byte order */
310 struct efa_admin_create_ah_resp
{
311 /* Common Admin Queue completion descriptor */
312 struct efa_admin_acq_common_desc acq_common_desc
;
314 /* Target interface address handle (opaque) */
321 struct efa_admin_destroy_ah_cmd
{
322 /* Common Admin Queue descriptor */
323 struct efa_admin_aq_common_desc aq_common_desc
;
325 /* Target interface address handle (opaque) */
332 struct efa_admin_destroy_ah_resp
{
333 /* Common Admin Queue completion descriptor */
334 struct efa_admin_acq_common_desc acq_common_desc
;
338 * Registration of MemoryRegion, required for QP working with Virtual
339 * Addresses. In standard verbs semantics, region length is limited to 2GB
340 * space, but EFA offers larger MR support for large memory space, to ease
341 * on users working with very large datasets (i.e. full GPU memory mapping).
343 struct efa_admin_reg_mr_cmd
{
344 /* Common Admin Queue descriptor */
345 struct efa_admin_aq_common_desc aq_common_desc
;
347 /* Protection Domain */
353 /* Physical Buffer List, each element is page-aligned. */
356 * Inline array of guest-physical page addresses of user
357 * memory pages (optimization for short region
360 u64 inline_pbl_array
[4];
362 /* points to PBL (direct or indirect, chained if needed) */
363 struct efa_admin_ctrl_buff_info pbl
;
366 /* Memory region length, in bytes. */
370 * flags and page size
371 * 4:0 : phys_page_size_shift - page size is (1 <<
372 * phys_page_size_shift). Page size is used for
373 * building the Virtual to Physical address mapping
374 * 6:5 : reserved - MBZ
375 * 7 : mem_addr_phy_mode_en - Enable bit for physical
376 * memory registration (no translation), can be used
377 * only by privileged clients. If set, PBL must
378 * contain a single entry.
384 * 0 : local_write_enable - Local write permissions:
385 * must be set for RQ buffers and buffers posted for
387 * 1 : remote_write_enable - Remote write
388 * permissions: must be set to enable RDMA write to
390 * 2 : remote_read_enable - Remote read permissions:
391 * must be set to enable RDMA read from the region
392 * 7:3 : reserved2 - MBZ
399 /* number of pages in PBL (redundant, could be calculated) */
403 * IO Virtual Address associated with this MR. If
404 * mem_addr_phy_mode_en is set, contains the physical address of
410 struct efa_admin_reg_mr_resp
{
411 /* Common Admin Queue completion descriptor */
412 struct efa_admin_acq_common_desc acq_common_desc
;
415 * L_Key, to be used in conjunction with local buffer references in
416 * SQ and RQ WQE, or with virtual RQ/CQ rings
421 * R_Key, to be used in RDMA messages to refer to remotely accessed
427 * Mask indicating which fields have valid values
429 * 1 : rdma_read_ic_id
430 * 2 : rdma_recv_ic_id
435 * Physical interconnect used by the device to reach the MR for receive
441 * Physical interconnect used by the device to reach the MR for RDMA
447 * Physical interconnect used by the device to reach the MR for RDMA
453 struct efa_admin_dereg_mr_cmd
{
454 /* Common Admin Queue descriptor */
455 struct efa_admin_aq_common_desc aq_common_desc
;
457 /* L_Key, memory region's l_key */
461 struct efa_admin_dereg_mr_resp
{
462 /* Common Admin Queue completion descriptor */
463 struct efa_admin_acq_common_desc acq_common_desc
;
467 * Allocation of MemoryRegion, required for QP working with Virtual
468 * Addresses in kernel verbs semantics, ready for fast registration use.
470 struct efa_admin_alloc_mr_cmd
{
471 /* Common Admin Queue descriptor */
472 struct efa_admin_aq_common_desc aq_common_desc
;
474 /* Protection Domain */
480 /* Maximum number of pages this MR supports. */
484 struct efa_admin_alloc_mr_resp
{
485 /* Common Admin Queue completion descriptor */
486 struct efa_admin_acq_common_desc acq_common_desc
;
489 * L_Key, to be used in conjunction with local buffer references in
490 * SQ and RQ WQE, or with virtual RQ/CQ rings
495 * R_Key, to be used in RDMA messages to refer to remotely accessed
501 struct efa_admin_create_cq_cmd
{
502 struct efa_admin_aq_common_desc aq_common_desc
;
505 * 4:0 : reserved5 - MBZ
506 * 5 : interrupt_mode_enabled - if set, cq operates
507 * in interrupt mode (i.e. CQ events and EQ elements
508 * are generated), otherwise - polling
509 * 6 : virt - If set, ring base address is virtual
510 * (IOVA returned by MR registration)
511 * 7 : reserved6 - MBZ
516 * 4:0 : cq_entry_size_words - size of CQ entry in
517 * 32-bit words, valid values: 4, 8.
518 * 5 : set_src_addr - If set, source address will be
519 * filled on RX completions from unknown senders.
520 * Requires 8 words CQ entry size.
521 * 7:6 : reserved7 - MBZ
525 /* Sub completion queue depth in # of entries. must be power of 2 */
528 /* EQ number assigned to this cq */
535 * CQ ring base address, virtual or physical depending on 'virt'
538 struct efa_common_mem_addr cq_ba
;
541 * Memory registration key for the ring, used only when base
547 * number of sub cqs - must be equal to sub_cqs_per_cq of queue
556 struct efa_admin_create_cq_resp
{
557 struct efa_admin_acq_common_desc acq_common_desc
;
561 /* actual sub cq depth in number of entries */
562 u16 sub_cq_actual_depth
;
564 /* CQ doorbell address, as offset to PCIe DB BAR */
568 * 0 : db_valid - If set, doorbell offset is valid.
569 * Always set when interrupts are requested.
574 struct efa_admin_destroy_cq_cmd
{
575 struct efa_admin_aq_common_desc aq_common_desc
;
583 struct efa_admin_destroy_cq_resp
{
584 struct efa_admin_acq_common_desc acq_common_desc
;
588 * EFA AQ Get Statistics command. Extended statistics are placed in control
589 * buffer pointed by AQ entry
591 struct efa_admin_aq_get_stats_cmd
{
592 struct efa_admin_aq_common_desc aq_common_descriptor
;
595 /* command specific inline data */
596 u32 inline_data_w1
[3];
598 struct efa_admin_ctrl_buff_info control_buffer
;
601 /* stats type as defined in enum efa_admin_get_stats_type */
604 /* stats scope defined in enum efa_admin_get_stats_scope */
610 struct efa_admin_basic_stats
{
624 struct efa_admin_messages_stats
{
634 struct efa_admin_rdma_read_stats
{
644 struct efa_admin_rdma_write_stats
{
651 u64 write_recv_bytes
;
654 struct efa_admin_acq_get_stats_resp
{
655 struct efa_admin_acq_common_desc acq_common_desc
;
658 struct efa_admin_basic_stats basic_stats
;
660 struct efa_admin_messages_stats messages_stats
;
662 struct efa_admin_rdma_read_stats rdma_read_stats
;
664 struct efa_admin_rdma_write_stats rdma_write_stats
;
668 struct efa_admin_get_set_feature_common_desc
{
672 /* as appears in efa_admin_aq_feature_id */
679 struct efa_admin_feature_device_attr_desc
{
680 /* Bitmap of efa_admin_aq_feature_id */
681 u64 supported_features
;
683 /* Bitmap of supported page sizes in MR registrations */
688 u32 admin_api_version
;
692 /* Bar used for SQ and RQ doorbells */
695 /* Indicates how many bits are used on physical address access */
698 /* Indicates how many bits are used on virtual address access */
702 * 0 : rdma_read - If set, RDMA Read is supported on
704 * 1 : rnr_retry - If set, RNR retry is supported on
706 * 2 : data_polling_128 - If set, 128 bytes data
707 * polling is supported
708 * 3 : rdma_write - If set, RDMA Write is supported
710 * 4 : unsolicited_write_recv - If set, unsolicited
711 * write with imm. receive is supported
712 * 31:5 : reserved - MBZ
716 /* Max RDMA transfer size in bytes */
719 /* Unique global ID for an EFA device */
722 /* The device maximum link speed in Gbit/sec */
723 u16 max_link_speed_gbps
;
732 struct efa_admin_feature_queue_attr_desc
{
733 /* The maximum number of queue pairs supported */
736 /* Maximum number of WQEs per Send Queue */
739 /* Maximum size of data that can be sent inline in a Send WQE */
742 /* Maximum number of buffer descriptors per Recv Queue */
745 /* The maximum number of completion queues supported per VF */
748 /* Maximum number of CQEs per Completion Queue */
751 /* Number of sub-CQs to be created for each CQ */
754 /* Minimum number of WQEs per SQ */
757 /* Maximum number of SGEs (buffers) allowed for a single send WQE */
758 u16 max_wr_send_sges
;
760 /* Maximum number of SGEs allowed for a single recv WQE */
761 u16 max_wr_recv_sges
;
763 /* The maximum number of memory regions supported */
766 /* The maximum number of pages can be registered */
769 /* The maximum number of protection domains supported */
772 /* The maximum number of address handles supported */
775 /* The maximum size of LLQ in bytes */
778 /* Maximum number of SGEs for a single RDMA read/write WQE */
779 u16 max_wr_rdma_sges
;
782 * Maximum number of bytes that can be written to SQ between two
783 * consecutive doorbells (in units of 64B). Driver must ensure that only
784 * complete WQEs are written to queue before issuing a doorbell.
785 * Examples: max_tx_batch=16 and WQE size = 64B, means up to 16 WQEs can
786 * be written to SQ between two consecutive doorbells. max_tx_batch=11
787 * and WQE size = 128B, means up to 5 WQEs can be written to SQ between
788 * two consecutive doorbells. Zero means unlimited.
793 struct efa_admin_event_queue_attr_desc
{
794 /* The maximum number of event queues supported */
797 /* Maximum number of EQEs per Event Queue */
800 /* Supported events bitmask */
804 struct efa_admin_feature_aenq_desc
{
805 /* bitmask for AENQ groups the device can report */
806 u32 supported_groups
;
808 /* bitmask for AENQ groups to report */
812 struct efa_admin_feature_network_attr_desc
{
813 /* Raw address data in network byte order */
816 /* max packet payload size in bytes */
821 * When hint value is 0, hints capabilities are not supported or driver
822 * should use its own predefined value
824 struct efa_admin_hw_hints
{
826 u16 mmio_read_timeout
;
829 u16 driver_watchdog_timeout
;
832 u16 admin_completion_timeout
;
834 /* poll interval in ms */
838 struct efa_admin_get_feature_cmd
{
839 struct efa_admin_aq_common_desc aq_common_descriptor
;
841 struct efa_admin_ctrl_buff_info control_buffer
;
843 struct efa_admin_get_set_feature_common_desc feature_common
;
848 struct efa_admin_get_feature_resp
{
849 struct efa_admin_acq_common_desc acq_common_desc
;
854 struct efa_admin_feature_device_attr_desc device_attr
;
856 struct efa_admin_feature_aenq_desc aenq
;
858 struct efa_admin_feature_network_attr_desc network_attr
;
860 struct efa_admin_feature_queue_attr_desc queue_attr
;
862 struct efa_admin_event_queue_attr_desc event_queue_attr
;
864 struct efa_admin_hw_hints hw_hints
;
868 struct efa_admin_set_feature_cmd
{
869 struct efa_admin_aq_common_desc aq_common_descriptor
;
871 struct efa_admin_ctrl_buff_info control_buffer
;
873 struct efa_admin_get_set_feature_common_desc feature_common
;
878 /* AENQ configuration */
879 struct efa_admin_feature_aenq_desc aenq
;
883 struct efa_admin_set_feature_resp
{
884 struct efa_admin_acq_common_desc acq_common_desc
;
891 struct efa_admin_alloc_pd_cmd
{
892 struct efa_admin_aq_common_desc aq_common_descriptor
;
895 struct efa_admin_alloc_pd_resp
{
896 struct efa_admin_acq_common_desc acq_common_desc
;
905 struct efa_admin_dealloc_pd_cmd
{
906 struct efa_admin_aq_common_desc aq_common_descriptor
;
915 struct efa_admin_dealloc_pd_resp
{
916 struct efa_admin_acq_common_desc acq_common_desc
;
919 struct efa_admin_alloc_uar_cmd
{
920 struct efa_admin_aq_common_desc aq_common_descriptor
;
923 struct efa_admin_alloc_uar_resp
{
924 struct efa_admin_acq_common_desc acq_common_desc
;
933 struct efa_admin_dealloc_uar_cmd
{
934 struct efa_admin_aq_common_desc aq_common_descriptor
;
943 struct efa_admin_dealloc_uar_resp
{
944 struct efa_admin_acq_common_desc acq_common_desc
;
947 struct efa_admin_create_eq_cmd
{
948 struct efa_admin_aq_common_desc aq_common_descriptor
;
950 /* Size of the EQ in entries, must be power of 2 */
953 /* MSI-X table entry index */
957 * 4:0 : entry_size_words - size of EQ entry in
959 * 7:5 : reserved - MBZ
963 /* EQ ring base address */
964 struct efa_common_mem_addr ba
;
967 * Enabled events on this EQ
968 * 0 : completion_events - Enable completion events
969 * 31:1 : reserved - MBZ
977 struct efa_admin_create_eq_resp
{
978 struct efa_admin_acq_common_desc acq_common_desc
;
987 struct efa_admin_destroy_eq_cmd
{
988 struct efa_admin_aq_common_desc aq_common_descriptor
;
997 struct efa_admin_destroy_eq_resp
{
998 struct efa_admin_acq_common_desc acq_common_desc
;
1001 /* asynchronous event notification groups */
1002 enum efa_admin_aenq_group
{
1003 EFA_ADMIN_FATAL_ERROR
= 1,
1004 EFA_ADMIN_WARNING
= 2,
1005 EFA_ADMIN_NOTIFICATION
= 3,
1006 EFA_ADMIN_KEEP_ALIVE
= 4,
1007 EFA_ADMIN_AENQ_GROUPS_NUM
= 5,
1010 struct efa_admin_mmio_req_read_less_resp
{
1015 /* value is valid when poll is cleared */
1019 enum efa_admin_os_type
{
1020 EFA_ADMIN_OS_LINUX
= 0,
1023 struct efa_admin_host_info
{
1024 /* OS distribution string format */
1025 u8 os_dist_str
[128];
1027 /* Defined in enum efa_admin_os_type */
1030 /* Kernel version string format */
1031 u8 kernel_ver_str
[32];
1033 /* Kernel version numeric format */
1037 * 7:0 : driver_module_type
1038 * 15:8 : driver_sub_minor
1039 * 23:16 : driver_minor
1040 * 31:24 : driver_major
1045 * Device's Bus, Device and Function
1060 * 0 : intree - Intree driver
1061 * 1 : gdr - GPUDirect RDMA supported
1068 #define EFA_ADMIN_CREATE_QP_CMD_SQ_VIRT_MASK BIT(0)
1069 #define EFA_ADMIN_CREATE_QP_CMD_RQ_VIRT_MASK BIT(1)
1070 #define EFA_ADMIN_CREATE_QP_CMD_UNSOLICITED_WRITE_RECV_MASK BIT(2)
1073 #define EFA_ADMIN_MODIFY_QP_CMD_QP_STATE_MASK BIT(0)
1074 #define EFA_ADMIN_MODIFY_QP_CMD_CUR_QP_STATE_MASK BIT(1)
1075 #define EFA_ADMIN_MODIFY_QP_CMD_QKEY_MASK BIT(2)
1076 #define EFA_ADMIN_MODIFY_QP_CMD_SQ_PSN_MASK BIT(3)
1077 #define EFA_ADMIN_MODIFY_QP_CMD_SQ_DRAINED_ASYNC_NOTIFY_MASK BIT(4)
1078 #define EFA_ADMIN_MODIFY_QP_CMD_RNR_RETRY_MASK BIT(5)
1081 #define EFA_ADMIN_REG_MR_CMD_PHYS_PAGE_SIZE_SHIFT_MASK GENMASK(4, 0)
1082 #define EFA_ADMIN_REG_MR_CMD_MEM_ADDR_PHY_MODE_EN_MASK BIT(7)
1083 #define EFA_ADMIN_REG_MR_CMD_LOCAL_WRITE_ENABLE_MASK BIT(0)
1084 #define EFA_ADMIN_REG_MR_CMD_REMOTE_WRITE_ENABLE_MASK BIT(1)
1085 #define EFA_ADMIN_REG_MR_CMD_REMOTE_READ_ENABLE_MASK BIT(2)
1088 #define EFA_ADMIN_REG_MR_RESP_RECV_IC_ID_MASK BIT(0)
1089 #define EFA_ADMIN_REG_MR_RESP_RDMA_READ_IC_ID_MASK BIT(1)
1090 #define EFA_ADMIN_REG_MR_RESP_RDMA_RECV_IC_ID_MASK BIT(2)
1093 #define EFA_ADMIN_CREATE_CQ_CMD_INTERRUPT_MODE_ENABLED_MASK BIT(5)
1094 #define EFA_ADMIN_CREATE_CQ_CMD_VIRT_MASK BIT(6)
1095 #define EFA_ADMIN_CREATE_CQ_CMD_CQ_ENTRY_SIZE_WORDS_MASK GENMASK(4, 0)
1096 #define EFA_ADMIN_CREATE_CQ_CMD_SET_SRC_ADDR_MASK BIT(5)
1098 /* create_cq_resp */
1099 #define EFA_ADMIN_CREATE_CQ_RESP_DB_VALID_MASK BIT(0)
1101 /* feature_device_attr_desc */
1102 #define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RDMA_READ_MASK BIT(0)
1103 #define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RNR_RETRY_MASK BIT(1)
1104 #define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_DATA_POLLING_128_MASK BIT(2)
1105 #define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RDMA_WRITE_MASK BIT(3)
1106 #define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_UNSOLICITED_WRITE_RECV_MASK BIT(4)
1109 #define EFA_ADMIN_CREATE_EQ_CMD_ENTRY_SIZE_WORDS_MASK GENMASK(4, 0)
1110 #define EFA_ADMIN_CREATE_EQ_CMD_COMPLETION_EVENTS_MASK BIT(0)
1113 #define EFA_ADMIN_HOST_INFO_DRIVER_MODULE_TYPE_MASK GENMASK(7, 0)
1114 #define EFA_ADMIN_HOST_INFO_DRIVER_SUB_MINOR_MASK GENMASK(15, 8)
1115 #define EFA_ADMIN_HOST_INFO_DRIVER_MINOR_MASK GENMASK(23, 16)
1116 #define EFA_ADMIN_HOST_INFO_DRIVER_MAJOR_MASK GENMASK(31, 24)
1117 #define EFA_ADMIN_HOST_INFO_FUNCTION_MASK GENMASK(2, 0)
1118 #define EFA_ADMIN_HOST_INFO_DEVICE_MASK GENMASK(7, 3)
1119 #define EFA_ADMIN_HOST_INFO_BUS_MASK GENMASK(15, 8)
1120 #define EFA_ADMIN_HOST_INFO_SPEC_MINOR_MASK GENMASK(7, 0)
1121 #define EFA_ADMIN_HOST_INFO_SPEC_MAJOR_MASK GENMASK(15, 8)
1122 #define EFA_ADMIN_HOST_INFO_INTREE_MASK BIT(0)
1123 #define EFA_ADMIN_HOST_INFO_GDR_MASK BIT(1)
1125 #endif /* _EFA_ADMIN_CMDS_H_ */