linux/drivers/net/ethernet/amazon/ena/ena_admin_defs.h

/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
/*
 * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
 */
#ifndef _ENA_ADMIN_H_
#define _ENA_ADMIN_H_

#define ENA_ADMIN_RSS_KEY_PARTS

enum ena_admin_aq_opcode {};

enum ena_admin_aq_completion_status {};

/* subcommands for the set/get feature admin commands */
enum ena_admin_aq_feature_id {};

/* device capabilities */
enum ena_admin_aq_caps_id {};

enum ena_admin_placement_policy_type {};

enum ena_admin_link_types {};

enum ena_admin_completion_policy_type {};

/* basic stats return ena_admin_basic_stats while extanded stats return a
 * buffer (string format) with additional statistics per queue and per
 * device id
 */
enum ena_admin_get_stats_type {};

enum ena_admin_get_stats_scope {};

struct ena_admin_aq_common_desc {};

/* used in ena_admin_aq_entry. Can point directly to control data, or to a
 * page list chunk. Used also at the end of indirect mode page list chunks,
 * for chaining.
 */
struct ena_admin_ctrl_buff_info {};

struct ena_admin_sq {};

struct ena_admin_aq_entry {};

struct ena_admin_acq_common_desc {};

struct ena_admin_acq_entry {};

struct ena_admin_aq_create_sq_cmd {};

enum ena_admin_sq_direction {};

struct ena_admin_acq_create_sq_resp_desc {};

struct ena_admin_aq_destroy_sq_cmd {};

struct ena_admin_acq_destroy_sq_resp_desc {};

struct ena_admin_aq_create_cq_cmd {};

struct ena_admin_acq_create_cq_resp_desc {};

struct ena_admin_aq_destroy_cq_cmd {};

struct ena_admin_acq_destroy_cq_resp_desc {};

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

/* Basic Statistics Command. */
struct ena_admin_basic_stats {};

/* ENI Statistics Command. */
struct ena_admin_eni_stats {};

struct ena_admin_acq_get_stats_resp {};

struct ena_admin_get_set_feature_common_desc {};

struct ena_admin_device_attr_feature_desc {};

enum ena_admin_llq_header_location {};

enum ena_admin_llq_ring_entry_size {};

enum ena_admin_llq_num_descs_before_header {};

/* packet descriptor list entry always starts with one or more descriptors,
 * followed by a header. The rest of the descriptors are located in the
 * beginning of the subsequent entry. Stride refers to how the rest of the
 * descriptors are placed. This field is relevant only for inline header
 * mode
 */
enum ena_admin_llq_stride_ctrl {};

enum ena_admin_accel_mode_feat {};

struct ena_admin_accel_mode_get {};

struct ena_admin_accel_mode_set {};

struct ena_admin_accel_mode_req {};

struct ena_admin_feature_llq_desc {};

struct ena_admin_queue_ext_feature_fields {};

struct ena_admin_queue_feature_desc {};

struct ena_admin_set_feature_mtu_desc {};

struct ena_admin_set_feature_host_attr_desc {};

struct ena_admin_feature_intr_moder_desc {};

struct ena_admin_get_feature_link_desc {};

struct ena_admin_feature_aenq_desc {};

struct ena_admin_feature_offload_desc {};

enum ena_admin_hash_functions {};

struct ena_admin_feature_rss_flow_hash_control {};

struct ena_admin_feature_rss_flow_hash_function {};

/* RSS flow hash protocols */
enum ena_admin_flow_hash_proto {};

/* RSS flow hash fields */
enum ena_admin_flow_hash_fields {};

struct ena_admin_proto_input {};

struct ena_admin_feature_rss_hash_control {};

struct ena_admin_feature_rss_flow_hash_input {};

enum ena_admin_os_type {};

struct ena_admin_host_info {};

struct ena_admin_rss_ind_table_entry {};

struct ena_admin_feature_rss_ind_table {};

/* When hint value is 0, driver should use it's own predefined value */
struct ena_admin_ena_hw_hints {};

struct ena_admin_get_feat_cmd {};

struct ena_admin_queue_ext_feature_desc {};

struct ena_admin_get_feat_resp {};

struct ena_admin_set_feat_cmd {};

struct ena_admin_set_feat_resp {};

struct ena_admin_aenq_common_desc {};

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

enum ena_admin_aenq_notification_syndrome {};

struct ena_admin_aenq_entry {};

struct ena_admin_aenq_link_change_desc {};

struct ena_admin_aenq_keep_alive_desc {};

struct ena_admin_ena_mmio_req_read_less_resp {};

/* aq_common_desc */
#define ENA_ADMIN_AQ_COMMON_DESC_COMMAND_ID_MASK
#define ENA_ADMIN_AQ_COMMON_DESC_PHASE_MASK
#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_SHIFT
#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_MASK
#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_INDIRECT_SHIFT
#define ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_INDIRECT_MASK

/* sq */
#define ENA_ADMIN_SQ_SQ_DIRECTION_SHIFT
#define ENA_ADMIN_SQ_SQ_DIRECTION_MASK

/* acq_common_desc */
#define ENA_ADMIN_ACQ_COMMON_DESC_COMMAND_ID_MASK
#define ENA_ADMIN_ACQ_COMMON_DESC_PHASE_MASK

/* aq_create_sq_cmd */
#define ENA_ADMIN_AQ_CREATE_SQ_CMD_SQ_DIRECTION_SHIFT
#define ENA_ADMIN_AQ_CREATE_SQ_CMD_SQ_DIRECTION_MASK
#define ENA_ADMIN_AQ_CREATE_SQ_CMD_PLACEMENT_POLICY_MASK
#define ENA_ADMIN_AQ_CREATE_SQ_CMD_COMPLETION_POLICY_SHIFT
#define ENA_ADMIN_AQ_CREATE_SQ_CMD_COMPLETION_POLICY_MASK
#define ENA_ADMIN_AQ_CREATE_SQ_CMD_IS_PHYSICALLY_CONTIGUOUS_MASK

/* aq_create_cq_cmd */
#define ENA_ADMIN_AQ_CREATE_CQ_CMD_INTERRUPT_MODE_ENABLED_SHIFT
#define ENA_ADMIN_AQ_CREATE_CQ_CMD_INTERRUPT_MODE_ENABLED_MASK
#define ENA_ADMIN_AQ_CREATE_CQ_CMD_CQ_ENTRY_SIZE_WORDS_MASK

/* get_set_feature_common_desc */
#define ENA_ADMIN_GET_SET_FEATURE_COMMON_DESC_SELECT_MASK

/* get_feature_link_desc */
#define ENA_ADMIN_GET_FEATURE_LINK_DESC_AUTONEG_MASK
#define ENA_ADMIN_GET_FEATURE_LINK_DESC_DUPLEX_SHIFT
#define ENA_ADMIN_GET_FEATURE_LINK_DESC_DUPLEX_MASK

/* feature_offload_desc */
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L3_CSUM_IPV4_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV4_CSUM_PART_SHIFT
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV4_CSUM_PART_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV4_CSUM_FULL_SHIFT
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV4_CSUM_FULL_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV6_CSUM_PART_SHIFT
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV6_CSUM_PART_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV6_CSUM_FULL_SHIFT
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV6_CSUM_FULL_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TSO_IPV4_SHIFT
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TSO_IPV4_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TSO_IPV6_SHIFT
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TSO_IPV6_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TSO_ECN_SHIFT
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_TSO_ECN_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L3_CSUM_IPV4_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L4_IPV4_CSUM_SHIFT
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L4_IPV4_CSUM_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L4_IPV6_CSUM_SHIFT
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L4_IPV6_CSUM_MASK
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_HASH_SHIFT
#define ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_HASH_MASK

/* feature_rss_flow_hash_function */
#define ENA_ADMIN_FEATURE_RSS_FLOW_HASH_FUNCTION_FUNCS_MASK
#define ENA_ADMIN_FEATURE_RSS_FLOW_HASH_FUNCTION_SELECTED_FUNC_MASK

/* feature_rss_flow_hash_input */
#define ENA_ADMIN_FEATURE_RSS_FLOW_HASH_INPUT_L3_SORT_SHIFT
#define ENA_ADMIN_FEATURE_RSS_FLOW_HASH_INPUT_L3_SORT_MASK
#define ENA_ADMIN_FEATURE_RSS_FLOW_HASH_INPUT_L4_SORT_SHIFT
#define ENA_ADMIN_FEATURE_RSS_FLOW_HASH_INPUT_L4_SORT_MASK
#define ENA_ADMIN_FEATURE_RSS_FLOW_HASH_INPUT_ENABLE_L3_SORT_SHIFT
#define ENA_ADMIN_FEATURE_RSS_FLOW_HASH_INPUT_ENABLE_L3_SORT_MASK
#define ENA_ADMIN_FEATURE_RSS_FLOW_HASH_INPUT_ENABLE_L4_SORT_SHIFT
#define ENA_ADMIN_FEATURE_RSS_FLOW_HASH_INPUT_ENABLE_L4_SORT_MASK

/* host_info */
#define ENA_ADMIN_HOST_INFO_MAJOR_MASK
#define ENA_ADMIN_HOST_INFO_MINOR_SHIFT
#define ENA_ADMIN_HOST_INFO_MINOR_MASK
#define ENA_ADMIN_HOST_INFO_SUB_MINOR_SHIFT
#define ENA_ADMIN_HOST_INFO_SUB_MINOR_MASK
#define ENA_ADMIN_HOST_INFO_MODULE_TYPE_SHIFT
#define ENA_ADMIN_HOST_INFO_MODULE_TYPE_MASK
#define ENA_ADMIN_HOST_INFO_FUNCTION_MASK
#define ENA_ADMIN_HOST_INFO_DEVICE_SHIFT
#define ENA_ADMIN_HOST_INFO_DEVICE_MASK
#define ENA_ADMIN_HOST_INFO_BUS_SHIFT
#define ENA_ADMIN_HOST_INFO_BUS_MASK
#define ENA_ADMIN_HOST_INFO_RX_OFFSET_SHIFT
#define ENA_ADMIN_HOST_INFO_RX_OFFSET_MASK
#define ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_SHIFT
#define ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_MASK
#define ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_SHIFT
#define ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_MASK
#define ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_SHIFT
#define ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_MASK
#define ENA_ADMIN_HOST_INFO_RX_PAGE_REUSE_SHIFT
#define ENA_ADMIN_HOST_INFO_RX_PAGE_REUSE_MASK

/* aenq_common_desc */
#define ENA_ADMIN_AENQ_COMMON_DESC_PHASE_MASK

/* aenq_link_change_desc */
#define ENA_ADMIN_AENQ_LINK_CHANGE_DESC_LINK_STATUS_MASK

#endif /* _ENA_ADMIN_H_ */