WIP FPC-III support
[linux/fpc-iii.git] / drivers / infiniband / hw / efa / efa_admin_cmds_defs.h
blobb199e4ac6cf9e7fb4ade96a23e79e4715224a54e
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
2 /*
3 * Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
4 */
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,
20 EFA_ADMIN_REG_MR = 7,
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_MAX_OPCODE = 17,
34 enum efa_admin_aq_feature_id {
35 EFA_ADMIN_DEVICE_ATTR = 1,
36 EFA_ADMIN_AENQ_CONFIG = 2,
37 EFA_ADMIN_NETWORK_ATTR = 3,
38 EFA_ADMIN_QUEUE_ATTR = 4,
39 EFA_ADMIN_HW_HINTS = 5,
40 EFA_ADMIN_HOST_INFO = 6,
43 /* QP transport type */
44 enum efa_admin_qp_type {
45 /* Unreliable Datagram */
46 EFA_ADMIN_QP_TYPE_UD = 1,
47 /* Scalable Reliable Datagram */
48 EFA_ADMIN_QP_TYPE_SRD = 2,
51 /* QP state */
52 enum efa_admin_qp_state {
53 EFA_ADMIN_QP_STATE_RESET = 0,
54 EFA_ADMIN_QP_STATE_INIT = 1,
55 EFA_ADMIN_QP_STATE_RTR = 2,
56 EFA_ADMIN_QP_STATE_RTS = 3,
57 EFA_ADMIN_QP_STATE_SQD = 4,
58 EFA_ADMIN_QP_STATE_SQE = 5,
59 EFA_ADMIN_QP_STATE_ERR = 6,
62 enum efa_admin_get_stats_type {
63 EFA_ADMIN_GET_STATS_TYPE_BASIC = 0,
64 EFA_ADMIN_GET_STATS_TYPE_MESSAGES = 1,
65 EFA_ADMIN_GET_STATS_TYPE_RDMA_READ = 2,
68 enum efa_admin_get_stats_scope {
69 EFA_ADMIN_GET_STATS_SCOPE_ALL = 0,
70 EFA_ADMIN_GET_STATS_SCOPE_QUEUE = 1,
74 * QP allocation sizes, converted by fabric QueuePair (QP) create command
75 * from QP capabilities.
77 struct efa_admin_qp_alloc_size {
78 /* Send descriptor ring size in bytes */
79 u32 send_queue_ring_size;
81 /* Max number of WQEs that can be outstanding on send queue. */
82 u32 send_queue_depth;
85 * Recv descriptor ring size in bytes, sufficient for user-provided
86 * number of WQEs
88 u32 recv_queue_ring_size;
90 /* Max number of WQEs that can be outstanding on recv queue */
91 u32 recv_queue_depth;
94 struct efa_admin_create_qp_cmd {
95 /* Common Admin Queue descriptor */
96 struct efa_admin_aq_common_desc aq_common_desc;
98 /* Protection Domain associated with this QP */
99 u16 pd;
101 /* QP type */
102 u8 qp_type;
105 * 0 : sq_virt - If set, SQ ring base address is
106 * virtual (IOVA returned by MR registration)
107 * 1 : rq_virt - If set, RQ ring base address is
108 * virtual (IOVA returned by MR registration)
109 * 7:2 : reserved - MBZ
111 u8 flags;
114 * Send queue (SQ) ring base physical address. This field is not
115 * used if this is a Low Latency Queue(LLQ).
117 u64 sq_base_addr;
119 /* Receive queue (RQ) ring base address. */
120 u64 rq_base_addr;
122 /* Index of CQ to be associated with Send Queue completions */
123 u32 send_cq_idx;
125 /* Index of CQ to be associated with Recv Queue completions */
126 u32 recv_cq_idx;
129 * Memory registration key for the SQ ring, used only when not in
130 * LLQ mode and base address is virtual
132 u32 sq_l_key;
135 * Memory registration key for the RQ ring, used only when base
136 * address is virtual
138 u32 rq_l_key;
140 /* Requested QP allocation sizes */
141 struct efa_admin_qp_alloc_size qp_alloc_size;
143 /* UAR number */
144 u16 uar;
146 /* MBZ */
147 u16 reserved;
149 /* MBZ */
150 u32 reserved2;
153 struct efa_admin_create_qp_resp {
154 /* Common Admin Queue completion descriptor */
155 struct efa_admin_acq_common_desc acq_common_desc;
158 * Opaque handle to be used for consequent admin operations on the
159 * QP
161 u32 qp_handle;
164 * QP number in the given EFA virtual device. Least-significant bits
165 * (as needed according to max_qp) carry unique QP ID
167 u16 qp_num;
169 /* MBZ */
170 u16 reserved;
172 /* Index of sub-CQ for Send Queue completions */
173 u16 send_sub_cq_idx;
175 /* Index of sub-CQ for Receive Queue completions */
176 u16 recv_sub_cq_idx;
178 /* SQ doorbell address, as offset to PCIe DB BAR */
179 u32 sq_db_offset;
181 /* RQ doorbell address, as offset to PCIe DB BAR */
182 u32 rq_db_offset;
185 * low latency send queue ring base address as an offset to PCIe
186 * MMIO LLQ_MEM BAR
188 u32 llq_descriptors_offset;
191 struct efa_admin_modify_qp_cmd {
192 /* Common Admin Queue descriptor */
193 struct efa_admin_aq_common_desc aq_common_desc;
196 * Mask indicating which fields should be updated
197 * 0 : qp_state
198 * 1 : cur_qp_state
199 * 2 : qkey
200 * 3 : sq_psn
201 * 4 : sq_drained_async_notify
202 * 5 : rnr_retry
203 * 31:6 : reserved
205 u32 modify_mask;
207 /* QP handle returned by create_qp command */
208 u32 qp_handle;
210 /* QP state */
211 u32 qp_state;
213 /* Override current QP state (before applying the transition) */
214 u32 cur_qp_state;
216 /* QKey */
217 u32 qkey;
219 /* SQ PSN */
220 u32 sq_psn;
222 /* Enable async notification when SQ is drained */
223 u8 sq_drained_async_notify;
225 /* Number of RNR retries (valid only for SRD QPs) */
226 u8 rnr_retry;
228 /* MBZ */
229 u16 reserved2;
232 struct efa_admin_modify_qp_resp {
233 /* Common Admin Queue completion descriptor */
234 struct efa_admin_acq_common_desc acq_common_desc;
237 struct efa_admin_query_qp_cmd {
238 /* Common Admin Queue descriptor */
239 struct efa_admin_aq_common_desc aq_common_desc;
241 /* QP handle returned by create_qp command */
242 u32 qp_handle;
245 struct efa_admin_query_qp_resp {
246 /* Common Admin Queue completion descriptor */
247 struct efa_admin_acq_common_desc acq_common_desc;
249 /* QP state */
250 u32 qp_state;
252 /* QKey */
253 u32 qkey;
255 /* SQ PSN */
256 u32 sq_psn;
258 /* Indicates that draining is in progress */
259 u8 sq_draining;
261 /* Number of RNR retries (valid only for SRD QPs) */
262 u8 rnr_retry;
264 /* MBZ */
265 u16 reserved2;
268 struct efa_admin_destroy_qp_cmd {
269 /* Common Admin Queue descriptor */
270 struct efa_admin_aq_common_desc aq_common_desc;
272 /* QP handle returned by create_qp command */
273 u32 qp_handle;
276 struct efa_admin_destroy_qp_resp {
277 /* Common Admin Queue completion descriptor */
278 struct efa_admin_acq_common_desc acq_common_desc;
282 * Create Address Handle command parameters. Must not be called more than
283 * once for the same destination
285 struct efa_admin_create_ah_cmd {
286 /* Common Admin Queue descriptor */
287 struct efa_admin_aq_common_desc aq_common_desc;
289 /* Destination address in network byte order */
290 u8 dest_addr[16];
292 /* PD number */
293 u16 pd;
295 /* MBZ */
296 u16 reserved;
299 struct efa_admin_create_ah_resp {
300 /* Common Admin Queue completion descriptor */
301 struct efa_admin_acq_common_desc acq_common_desc;
303 /* Target interface address handle (opaque) */
304 u16 ah;
306 /* MBZ */
307 u16 reserved;
310 struct efa_admin_destroy_ah_cmd {
311 /* Common Admin Queue descriptor */
312 struct efa_admin_aq_common_desc aq_common_desc;
314 /* Target interface address handle (opaque) */
315 u16 ah;
317 /* PD number */
318 u16 pd;
321 struct efa_admin_destroy_ah_resp {
322 /* Common Admin Queue completion descriptor */
323 struct efa_admin_acq_common_desc acq_common_desc;
327 * Registration of MemoryRegion, required for QP working with Virtual
328 * Addresses. In standard verbs semantics, region length is limited to 2GB
329 * space, but EFA offers larger MR support for large memory space, to ease
330 * on users working with very large datasets (i.e. full GPU memory mapping).
332 struct efa_admin_reg_mr_cmd {
333 /* Common Admin Queue descriptor */
334 struct efa_admin_aq_common_desc aq_common_desc;
336 /* Protection Domain */
337 u16 pd;
339 /* MBZ */
340 u16 reserved16_w1;
342 /* Physical Buffer List, each element is page-aligned. */
343 union {
345 * Inline array of guest-physical page addresses of user
346 * memory pages (optimization for short region
347 * registrations)
349 u64 inline_pbl_array[4];
351 /* points to PBL (direct or indirect, chained if needed) */
352 struct efa_admin_ctrl_buff_info pbl;
353 } pbl;
355 /* Memory region length, in bytes. */
356 u64 mr_length;
359 * flags and page size
360 * 4:0 : phys_page_size_shift - page size is (1 <<
361 * phys_page_size_shift). Page size is used for
362 * building the Virtual to Physical address mapping
363 * 6:5 : reserved - MBZ
364 * 7 : mem_addr_phy_mode_en - Enable bit for physical
365 * memory registration (no translation), can be used
366 * only by privileged clients. If set, PBL must
367 * contain a single entry.
369 u8 flags;
372 * permissions
373 * 0 : local_write_enable - Local write permissions:
374 * must be set for RQ buffers and buffers posted for
375 * RDMA Read requests
376 * 1 : reserved1 - MBZ
377 * 2 : remote_read_enable - Remote read permissions:
378 * must be set to enable RDMA read from the region
379 * 7:3 : reserved2 - MBZ
381 u8 permissions;
383 /* MBZ */
384 u16 reserved16_w5;
386 /* number of pages in PBL (redundant, could be calculated) */
387 u32 page_num;
390 * IO Virtual Address associated with this MR. If
391 * mem_addr_phy_mode_en is set, contains the physical address of
392 * the region.
394 u64 iova;
397 struct efa_admin_reg_mr_resp {
398 /* Common Admin Queue completion descriptor */
399 struct efa_admin_acq_common_desc acq_common_desc;
402 * L_Key, to be used in conjunction with local buffer references in
403 * SQ and RQ WQE, or with virtual RQ/CQ rings
405 u32 l_key;
408 * R_Key, to be used in RDMA messages to refer to remotely accessed
409 * memory region
411 u32 r_key;
414 struct efa_admin_dereg_mr_cmd {
415 /* Common Admin Queue descriptor */
416 struct efa_admin_aq_common_desc aq_common_desc;
418 /* L_Key, memory region's l_key */
419 u32 l_key;
422 struct efa_admin_dereg_mr_resp {
423 /* Common Admin Queue completion descriptor */
424 struct efa_admin_acq_common_desc acq_common_desc;
427 struct efa_admin_create_cq_cmd {
428 struct efa_admin_aq_common_desc aq_common_desc;
431 * 4:0 : reserved5 - MBZ
432 * 5 : interrupt_mode_enabled - if set, cq operates
433 * in interrupt mode (i.e. CQ events and MSI-X are
434 * generated), otherwise - polling
435 * 6 : virt - If set, ring base address is virtual
436 * (IOVA returned by MR registration)
437 * 7 : reserved6 - MBZ
439 u8 cq_caps_1;
442 * 4:0 : cq_entry_size_words - size of CQ entry in
443 * 32-bit words, valid values: 4, 8.
444 * 7:5 : reserved7 - MBZ
446 u8 cq_caps_2;
448 /* completion queue depth in # of entries. must be power of 2 */
449 u16 cq_depth;
451 /* msix vector assigned to this cq */
452 u32 msix_vector_idx;
455 * CQ ring base address, virtual or physical depending on 'virt'
456 * flag
458 struct efa_common_mem_addr cq_ba;
461 * Memory registration key for the ring, used only when base
462 * address is virtual
464 u32 l_key;
467 * number of sub cqs - must be equal to sub_cqs_per_cq of queue
468 * attributes.
470 u16 num_sub_cqs;
472 /* UAR number */
473 u16 uar;
476 struct efa_admin_create_cq_resp {
477 struct efa_admin_acq_common_desc acq_common_desc;
479 u16 cq_idx;
481 /* actual cq depth in number of entries */
482 u16 cq_actual_depth;
485 struct efa_admin_destroy_cq_cmd {
486 struct efa_admin_aq_common_desc aq_common_desc;
488 u16 cq_idx;
490 /* MBZ */
491 u16 reserved1;
494 struct efa_admin_destroy_cq_resp {
495 struct efa_admin_acq_common_desc acq_common_desc;
499 * EFA AQ Get Statistics command. Extended statistics are placed in control
500 * buffer pointed by AQ entry
502 struct efa_admin_aq_get_stats_cmd {
503 struct efa_admin_aq_common_desc aq_common_descriptor;
505 union {
506 /* command specific inline data */
507 u32 inline_data_w1[3];
509 struct efa_admin_ctrl_buff_info control_buffer;
510 } u;
512 /* stats type as defined in enum efa_admin_get_stats_type */
513 u8 type;
515 /* stats scope defined in enum efa_admin_get_stats_scope */
516 u8 scope;
518 u16 scope_modifier;
521 struct efa_admin_basic_stats {
522 u64 tx_bytes;
524 u64 tx_pkts;
526 u64 rx_bytes;
528 u64 rx_pkts;
530 u64 rx_drops;
533 struct efa_admin_messages_stats {
534 u64 send_bytes;
536 u64 send_wrs;
538 u64 recv_bytes;
540 u64 recv_wrs;
543 struct efa_admin_rdma_read_stats {
544 u64 read_wrs;
546 u64 read_bytes;
548 u64 read_wr_err;
550 u64 read_resp_bytes;
553 struct efa_admin_acq_get_stats_resp {
554 struct efa_admin_acq_common_desc acq_common_desc;
556 union {
557 struct efa_admin_basic_stats basic_stats;
559 struct efa_admin_messages_stats messages_stats;
561 struct efa_admin_rdma_read_stats rdma_read_stats;
562 } u;
565 struct efa_admin_get_set_feature_common_desc {
567 * 1:0 : select - 0x1 - current value; 0x3 - default
568 * value
569 * 7:3 : reserved3 - MBZ
571 u8 flags;
573 /* as appears in efa_admin_aq_feature_id */
574 u8 feature_id;
576 /* MBZ */
577 u16 reserved16;
580 struct efa_admin_feature_device_attr_desc {
581 /* Bitmap of efa_admin_aq_feature_id */
582 u64 supported_features;
584 /* Bitmap of supported page sizes in MR registrations */
585 u64 page_size_cap;
587 u32 fw_version;
589 u32 admin_api_version;
591 u32 device_version;
593 /* Bar used for SQ and RQ doorbells */
594 u16 db_bar;
596 /* Indicates how many bits are used on physical address access */
597 u8 phys_addr_width;
599 /* Indicates how many bits are used on virtual address access */
600 u8 virt_addr_width;
603 * 0 : rdma_read - If set, RDMA Read is supported on
604 * TX queues
605 * 1 : rnr_retry - If set, RNR retry is supported on
606 * modify QP command
607 * 31:2 : reserved - MBZ
609 u32 device_caps;
611 /* Max RDMA transfer size in bytes */
612 u32 max_rdma_size;
615 struct efa_admin_feature_queue_attr_desc {
616 /* The maximum number of queue pairs supported */
617 u32 max_qp;
619 /* Maximum number of WQEs per Send Queue */
620 u32 max_sq_depth;
622 /* Maximum size of data that can be sent inline in a Send WQE */
623 u32 inline_buf_size;
625 /* Maximum number of buffer descriptors per Recv Queue */
626 u32 max_rq_depth;
628 /* The maximum number of completion queues supported per VF */
629 u32 max_cq;
631 /* Maximum number of CQEs per Completion Queue */
632 u32 max_cq_depth;
634 /* Number of sub-CQs to be created for each CQ */
635 u16 sub_cqs_per_cq;
637 /* Minimum number of WQEs per SQ */
638 u16 min_sq_depth;
640 /* Maximum number of SGEs (buffers) allowed for a single send WQE */
641 u16 max_wr_send_sges;
643 /* Maximum number of SGEs allowed for a single recv WQE */
644 u16 max_wr_recv_sges;
646 /* The maximum number of memory regions supported */
647 u32 max_mr;
649 /* The maximum number of pages can be registered */
650 u32 max_mr_pages;
652 /* The maximum number of protection domains supported */
653 u32 max_pd;
655 /* The maximum number of address handles supported */
656 u32 max_ah;
658 /* The maximum size of LLQ in bytes */
659 u32 max_llq_size;
661 /* Maximum number of SGEs for a single RDMA read WQE */
662 u16 max_wr_rdma_sges;
665 * Maximum number of bytes that can be written to SQ between two
666 * consecutive doorbells (in units of 64B). Driver must ensure that only
667 * complete WQEs are written to queue before issuing a doorbell.
668 * Examples: max_tx_batch=16 and WQE size = 64B, means up to 16 WQEs can
669 * be written to SQ between two consecutive doorbells. max_tx_batch=11
670 * and WQE size = 128B, means up to 5 WQEs can be written to SQ between
671 * two consecutive doorbells. Zero means unlimited.
673 u16 max_tx_batch;
676 struct efa_admin_feature_aenq_desc {
677 /* bitmask for AENQ groups the device can report */
678 u32 supported_groups;
680 /* bitmask for AENQ groups to report */
681 u32 enabled_groups;
684 struct efa_admin_feature_network_attr_desc {
685 /* Raw address data in network byte order */
686 u8 addr[16];
688 /* max packet payload size in bytes */
689 u32 mtu;
693 * When hint value is 0, hints capabilities are not supported or driver
694 * should use its own predefined value
696 struct efa_admin_hw_hints {
697 /* value in ms */
698 u16 mmio_read_timeout;
700 /* value in ms */
701 u16 driver_watchdog_timeout;
703 /* value in ms */
704 u16 admin_completion_timeout;
706 /* poll interval in ms */
707 u16 poll_interval;
710 struct efa_admin_get_feature_cmd {
711 struct efa_admin_aq_common_desc aq_common_descriptor;
713 struct efa_admin_ctrl_buff_info control_buffer;
715 struct efa_admin_get_set_feature_common_desc feature_common;
717 u32 raw[11];
720 struct efa_admin_get_feature_resp {
721 struct efa_admin_acq_common_desc acq_common_desc;
723 union {
724 u32 raw[14];
726 struct efa_admin_feature_device_attr_desc device_attr;
728 struct efa_admin_feature_aenq_desc aenq;
730 struct efa_admin_feature_network_attr_desc network_attr;
732 struct efa_admin_feature_queue_attr_desc queue_attr;
734 struct efa_admin_hw_hints hw_hints;
735 } u;
738 struct efa_admin_set_feature_cmd {
739 struct efa_admin_aq_common_desc aq_common_descriptor;
741 struct efa_admin_ctrl_buff_info control_buffer;
743 struct efa_admin_get_set_feature_common_desc feature_common;
745 union {
746 u32 raw[11];
748 /* AENQ configuration */
749 struct efa_admin_feature_aenq_desc aenq;
750 } u;
753 struct efa_admin_set_feature_resp {
754 struct efa_admin_acq_common_desc acq_common_desc;
756 union {
757 u32 raw[14];
758 } u;
761 struct efa_admin_alloc_pd_cmd {
762 struct efa_admin_aq_common_desc aq_common_descriptor;
765 struct efa_admin_alloc_pd_resp {
766 struct efa_admin_acq_common_desc acq_common_desc;
768 /* PD number */
769 u16 pd;
771 /* MBZ */
772 u16 reserved;
775 struct efa_admin_dealloc_pd_cmd {
776 struct efa_admin_aq_common_desc aq_common_descriptor;
778 /* PD number */
779 u16 pd;
781 /* MBZ */
782 u16 reserved;
785 struct efa_admin_dealloc_pd_resp {
786 struct efa_admin_acq_common_desc acq_common_desc;
789 struct efa_admin_alloc_uar_cmd {
790 struct efa_admin_aq_common_desc aq_common_descriptor;
793 struct efa_admin_alloc_uar_resp {
794 struct efa_admin_acq_common_desc acq_common_desc;
796 /* UAR number */
797 u16 uar;
799 /* MBZ */
800 u16 reserved;
803 struct efa_admin_dealloc_uar_cmd {
804 struct efa_admin_aq_common_desc aq_common_descriptor;
806 /* UAR number */
807 u16 uar;
809 /* MBZ */
810 u16 reserved;
813 struct efa_admin_dealloc_uar_resp {
814 struct efa_admin_acq_common_desc acq_common_desc;
817 /* asynchronous event notification groups */
818 enum efa_admin_aenq_group {
819 EFA_ADMIN_FATAL_ERROR = 1,
820 EFA_ADMIN_WARNING = 2,
821 EFA_ADMIN_NOTIFICATION = 3,
822 EFA_ADMIN_KEEP_ALIVE = 4,
823 EFA_ADMIN_AENQ_GROUPS_NUM = 5,
826 enum efa_admin_aenq_notification_syndrom {
827 EFA_ADMIN_SUSPEND = 0,
828 EFA_ADMIN_RESUME = 1,
829 EFA_ADMIN_UPDATE_HINTS = 2,
832 struct efa_admin_mmio_req_read_less_resp {
833 u16 req_id;
835 u16 reg_off;
837 /* value is valid when poll is cleared */
838 u32 reg_val;
841 enum efa_admin_os_type {
842 EFA_ADMIN_OS_LINUX = 0,
845 struct efa_admin_host_info {
846 /* OS distribution string format */
847 u8 os_dist_str[128];
849 /* Defined in enum efa_admin_os_type */
850 u32 os_type;
852 /* Kernel version string format */
853 u8 kernel_ver_str[32];
855 /* Kernel version numeric format */
856 u32 kernel_ver;
859 * 7:0 : driver_module_type
860 * 15:8 : driver_sub_minor
861 * 23:16 : driver_minor
862 * 31:24 : driver_major
864 u32 driver_ver;
867 * Device's Bus, Device and Function
868 * 2:0 : function
869 * 7:3 : device
870 * 15:8 : bus
872 u16 bdf;
875 * Spec version
876 * 7:0 : spec_minor
877 * 15:8 : spec_major
879 u16 spec_ver;
882 * 0 : intree - Intree driver
883 * 1 : gdr - GPUDirect RDMA supported
884 * 31:2 : reserved2
886 u32 flags;
889 /* create_qp_cmd */
890 #define EFA_ADMIN_CREATE_QP_CMD_SQ_VIRT_MASK BIT(0)
891 #define EFA_ADMIN_CREATE_QP_CMD_RQ_VIRT_MASK BIT(1)
893 /* modify_qp_cmd */
894 #define EFA_ADMIN_MODIFY_QP_CMD_QP_STATE_MASK BIT(0)
895 #define EFA_ADMIN_MODIFY_QP_CMD_CUR_QP_STATE_MASK BIT(1)
896 #define EFA_ADMIN_MODIFY_QP_CMD_QKEY_MASK BIT(2)
897 #define EFA_ADMIN_MODIFY_QP_CMD_SQ_PSN_MASK BIT(3)
898 #define EFA_ADMIN_MODIFY_QP_CMD_SQ_DRAINED_ASYNC_NOTIFY_MASK BIT(4)
899 #define EFA_ADMIN_MODIFY_QP_CMD_RNR_RETRY_MASK BIT(5)
901 /* reg_mr_cmd */
902 #define EFA_ADMIN_REG_MR_CMD_PHYS_PAGE_SIZE_SHIFT_MASK GENMASK(4, 0)
903 #define EFA_ADMIN_REG_MR_CMD_MEM_ADDR_PHY_MODE_EN_MASK BIT(7)
904 #define EFA_ADMIN_REG_MR_CMD_LOCAL_WRITE_ENABLE_MASK BIT(0)
905 #define EFA_ADMIN_REG_MR_CMD_REMOTE_READ_ENABLE_MASK BIT(2)
907 /* create_cq_cmd */
908 #define EFA_ADMIN_CREATE_CQ_CMD_INTERRUPT_MODE_ENABLED_MASK BIT(5)
909 #define EFA_ADMIN_CREATE_CQ_CMD_VIRT_MASK BIT(6)
910 #define EFA_ADMIN_CREATE_CQ_CMD_CQ_ENTRY_SIZE_WORDS_MASK GENMASK(4, 0)
912 /* get_set_feature_common_desc */
913 #define EFA_ADMIN_GET_SET_FEATURE_COMMON_DESC_SELECT_MASK GENMASK(1, 0)
915 /* feature_device_attr_desc */
916 #define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RDMA_READ_MASK BIT(0)
917 #define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RNR_RETRY_MASK BIT(1)
919 /* host_info */
920 #define EFA_ADMIN_HOST_INFO_DRIVER_MODULE_TYPE_MASK GENMASK(7, 0)
921 #define EFA_ADMIN_HOST_INFO_DRIVER_SUB_MINOR_MASK GENMASK(15, 8)
922 #define EFA_ADMIN_HOST_INFO_DRIVER_MINOR_MASK GENMASK(23, 16)
923 #define EFA_ADMIN_HOST_INFO_DRIVER_MAJOR_MASK GENMASK(31, 24)
924 #define EFA_ADMIN_HOST_INFO_FUNCTION_MASK GENMASK(2, 0)
925 #define EFA_ADMIN_HOST_INFO_DEVICE_MASK GENMASK(7, 3)
926 #define EFA_ADMIN_HOST_INFO_BUS_MASK GENMASK(15, 8)
927 #define EFA_ADMIN_HOST_INFO_SPEC_MINOR_MASK GENMASK(7, 0)
928 #define EFA_ADMIN_HOST_INFO_SPEC_MAJOR_MASK GENMASK(15, 8)
929 #define EFA_ADMIN_HOST_INFO_INTREE_MASK BIT(0)
930 #define EFA_ADMIN_HOST_INFO_GDR_MASK BIT(1)
932 #endif /* _EFA_ADMIN_CMDS_H_ */