linux/drivers/infiniband/hw/efa/efa_admin_cmds_defs.h

/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
/*
 * Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All rights reserved.
 */

#ifndef _EFA_ADMIN_CMDS_H_
#define _EFA_ADMIN_CMDS_H_

#define EFA_ADMIN_API_VERSION_MAJOR
#define EFA_ADMIN_API_VERSION_MINOR

/* EFA admin queue opcodes */
enum efa_admin_aq_opcode {};

enum efa_admin_aq_feature_id {};

/* QP transport type */
enum efa_admin_qp_type {};

/* QP state */
enum efa_admin_qp_state {};

enum efa_admin_get_stats_type {};

enum efa_admin_get_stats_scope {};

/*
 * QP allocation sizes, converted by fabric QueuePair (QP) create command
 * from QP capabilities.
 */
struct efa_admin_qp_alloc_size {};

struct efa_admin_create_qp_cmd {};

struct efa_admin_create_qp_resp {};

struct efa_admin_modify_qp_cmd {};

struct efa_admin_modify_qp_resp {};

struct efa_admin_query_qp_cmd {};

struct efa_admin_query_qp_resp {};

struct efa_admin_destroy_qp_cmd {};

struct efa_admin_destroy_qp_resp {};

/*
 * Create Address Handle command parameters. Must not be called more than
 * once for the same destination
 */
struct efa_admin_create_ah_cmd {};

struct efa_admin_create_ah_resp {};

struct efa_admin_destroy_ah_cmd {};

struct efa_admin_destroy_ah_resp {};

/*
 * Registration of MemoryRegion, required for QP working with Virtual
 * Addresses. In standard verbs semantics, region length is limited to 2GB
 * space, but EFA offers larger MR support for large memory space, to ease
 * on users working with very large datasets (i.e. full GPU memory mapping).
 */
struct efa_admin_reg_mr_cmd {};

struct efa_admin_reg_mr_resp {};

struct efa_admin_dereg_mr_cmd {};

struct efa_admin_dereg_mr_resp {};

struct efa_admin_create_cq_cmd {};

struct efa_admin_create_cq_resp {};

struct efa_admin_destroy_cq_cmd {};

struct efa_admin_destroy_cq_resp {};

/*
 * EFA AQ Get Statistics command. Extended statistics are placed in control
 * buffer pointed by AQ entry
 */
struct efa_admin_aq_get_stats_cmd {};

struct efa_admin_basic_stats {};

struct efa_admin_messages_stats {};

struct efa_admin_rdma_read_stats {};

struct efa_admin_rdma_write_stats {};

struct efa_admin_acq_get_stats_resp {};

struct efa_admin_get_set_feature_common_desc {};

struct efa_admin_feature_device_attr_desc {};

struct efa_admin_feature_queue_attr_desc {};

struct efa_admin_event_queue_attr_desc {};

struct efa_admin_feature_aenq_desc {};

struct efa_admin_feature_network_attr_desc {};

/*
 * When hint value is 0, hints capabilities are not supported or driver
 * should use its own predefined value
 */
struct efa_admin_hw_hints {};

struct efa_admin_get_feature_cmd {};

struct efa_admin_get_feature_resp {};

struct efa_admin_set_feature_cmd {};

struct efa_admin_set_feature_resp {};

struct efa_admin_alloc_pd_cmd {};

struct efa_admin_alloc_pd_resp {};

struct efa_admin_dealloc_pd_cmd {};

struct efa_admin_dealloc_pd_resp {};

struct efa_admin_alloc_uar_cmd {};

struct efa_admin_alloc_uar_resp {};

struct efa_admin_dealloc_uar_cmd {};

struct efa_admin_dealloc_uar_resp {};

struct efa_admin_create_eq_cmd {};

struct efa_admin_create_eq_resp {};

struct efa_admin_destroy_eq_cmd {};

struct efa_admin_destroy_eq_resp {};

/* asynchronous event notification groups */
enum efa_admin_aenq_group {};

struct efa_admin_mmio_req_read_less_resp {};

enum efa_admin_os_type {};

struct efa_admin_host_info {};

/* create_qp_cmd */
#define EFA_ADMIN_CREATE_QP_CMD_SQ_VIRT_MASK
#define EFA_ADMIN_CREATE_QP_CMD_RQ_VIRT_MASK
#define EFA_ADMIN_CREATE_QP_CMD_UNSOLICITED_WRITE_RECV_MASK

/* modify_qp_cmd */
#define EFA_ADMIN_MODIFY_QP_CMD_QP_STATE_MASK
#define EFA_ADMIN_MODIFY_QP_CMD_CUR_QP_STATE_MASK
#define EFA_ADMIN_MODIFY_QP_CMD_QKEY_MASK
#define EFA_ADMIN_MODIFY_QP_CMD_SQ_PSN_MASK
#define EFA_ADMIN_MODIFY_QP_CMD_SQ_DRAINED_ASYNC_NOTIFY_MASK
#define EFA_ADMIN_MODIFY_QP_CMD_RNR_RETRY_MASK

/* reg_mr_cmd */
#define EFA_ADMIN_REG_MR_CMD_PHYS_PAGE_SIZE_SHIFT_MASK
#define EFA_ADMIN_REG_MR_CMD_MEM_ADDR_PHY_MODE_EN_MASK
#define EFA_ADMIN_REG_MR_CMD_LOCAL_WRITE_ENABLE_MASK
#define EFA_ADMIN_REG_MR_CMD_REMOTE_WRITE_ENABLE_MASK
#define EFA_ADMIN_REG_MR_CMD_REMOTE_READ_ENABLE_MASK

/* reg_mr_resp */
#define EFA_ADMIN_REG_MR_RESP_RECV_IC_ID_MASK
#define EFA_ADMIN_REG_MR_RESP_RDMA_READ_IC_ID_MASK
#define EFA_ADMIN_REG_MR_RESP_RDMA_RECV_IC_ID_MASK

/* create_cq_cmd */
#define EFA_ADMIN_CREATE_CQ_CMD_INTERRUPT_MODE_ENABLED_MASK
#define EFA_ADMIN_CREATE_CQ_CMD_VIRT_MASK
#define EFA_ADMIN_CREATE_CQ_CMD_CQ_ENTRY_SIZE_WORDS_MASK
#define EFA_ADMIN_CREATE_CQ_CMD_SET_SRC_ADDR_MASK

/* create_cq_resp */
#define EFA_ADMIN_CREATE_CQ_RESP_DB_VALID_MASK

/* feature_device_attr_desc */
#define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RDMA_READ_MASK
#define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RNR_RETRY_MASK
#define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_DATA_POLLING_128_MASK
#define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RDMA_WRITE_MASK
#define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_UNSOLICITED_WRITE_RECV_MASK

/* create_eq_cmd */
#define EFA_ADMIN_CREATE_EQ_CMD_ENTRY_SIZE_WORDS_MASK
#define EFA_ADMIN_CREATE_EQ_CMD_VIRT_MASK
#define EFA_ADMIN_CREATE_EQ_CMD_COMPLETION_EVENTS_MASK

/* host_info */
#define EFA_ADMIN_HOST_INFO_DRIVER_MODULE_TYPE_MASK
#define EFA_ADMIN_HOST_INFO_DRIVER_SUB_MINOR_MASK
#define EFA_ADMIN_HOST_INFO_DRIVER_MINOR_MASK
#define EFA_ADMIN_HOST_INFO_DRIVER_MAJOR_MASK
#define EFA_ADMIN_HOST_INFO_FUNCTION_MASK
#define EFA_ADMIN_HOST_INFO_DEVICE_MASK
#define EFA_ADMIN_HOST_INFO_BUS_MASK
#define EFA_ADMIN_HOST_INFO_SPEC_MINOR_MASK
#define EFA_ADMIN_HOST_INFO_SPEC_MAJOR_MASK
#define EFA_ADMIN_HOST_INFO_INTREE_MASK
#define EFA_ADMIN_HOST_INFO_GDR_MASK

#endif /* _EFA_ADMIN_CMDS_H_ */