linux/drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright(c) 2013 - 2018 Intel Corporation. */

#ifndef _IAVF_ADMINQ_CMD_H_
#define _IAVF_ADMINQ_CMD_H_

/* This header file defines the iavf Admin Queue commands and is shared between
 * iavf Firmware and Software.
 *
 * This file needs to comply with the Linux Kernel coding style.
 */

#define IAVF_FW_API_VERSION_MAJOR
#define IAVF_FW_API_VERSION_MINOR_X722
#define IAVF_FW_API_VERSION_MINOR_X710

#define IAVF_FW_MINOR_VERSION(_h)

/* API version 1.7 implements additional link and PHY-specific APIs  */
#define IAVF_MINOR_VER_GET_LINK_INFO_XL710

struct iavf_aq_desc {};

/* Flags sub-structure
 * |0  |1  |2  |3  |4  |5  |6  |7  |8  |9  |10 |11 |12 |13 |14 |15 |
 * |DD |CMP|ERR|VFE| * *  RESERVED * * |LB |RD |VFC|BUF|SI |EI |FE |
 */

/* command flags and offsets*/
#define IAVF_AQ_FLAG_DD_SHIFT
#define IAVF_AQ_FLAG_CMP_SHIFT
#define IAVF_AQ_FLAG_ERR_SHIFT
#define IAVF_AQ_FLAG_VFE_SHIFT
#define IAVF_AQ_FLAG_LB_SHIFT
#define IAVF_AQ_FLAG_RD_SHIFT
#define IAVF_AQ_FLAG_VFC_SHIFT
#define IAVF_AQ_FLAG_BUF_SHIFT
#define IAVF_AQ_FLAG_SI_SHIFT
#define IAVF_AQ_FLAG_EI_SHIFT
#define IAVF_AQ_FLAG_FE_SHIFT

#define IAVF_AQ_FLAG_DD
#define IAVF_AQ_FLAG_CMP
#define IAVF_AQ_FLAG_ERR
#define IAVF_AQ_FLAG_VFE
#define IAVF_AQ_FLAG_LB
#define IAVF_AQ_FLAG_RD
#define IAVF_AQ_FLAG_VFC
#define IAVF_AQ_FLAG_BUF
#define IAVF_AQ_FLAG_SI
#define IAVF_AQ_FLAG_EI
#define IAVF_AQ_FLAG_FE

/* error codes */
enum iavf_admin_queue_err {};

/* Admin Queue command opcodes */
enum iavf_admin_queue_opc {};

/* command structures and indirect data structures */

/* Structure naming conventions:
 * - no suffix for direct command descriptor structures
 * - _data for indirect sent data
 * - _resp for indirect return data (data which is both will use _data)
 * - _completion for direct return data
 * - _element_ for repeated elements (may also be _data or _resp)
 *
 * Command structures are expected to overlay the params.raw member of the basic
 * descriptor, and as such cannot exceed 16 bytes in length.
 */

/* This macro is used to generate a compilation error if a structure
 * is not exactly the correct length. It gives a divide by zero error if the
 * structure is not of the correct size, otherwise it creates an enum that is
 * never used.
 */
#define IAVF_CHECK_STRUCT_LEN(n, X)

/* This macro is used extensively to ensure that command structures are 16
 * bytes in length as they have to map to the raw array of that size.
 */
#define IAVF_CHECK_CMD_LENGTH(X)

/* Queue Shutdown (direct 0x0003) */
struct iavf_aqc_queue_shutdown {};

IAVF_CHECK_CMD_LENGTH();

struct iavf_aqc_vsi_properties_data {};

IAVF_CHECK_STRUCT_LEN();

/* Get VEB Parameters (direct 0x0232)
 * uses iavf_aqc_switch_seid for the descriptor
 */
struct iavf_aqc_get_veb_parameters_completion {};

IAVF_CHECK_CMD_LENGTH();

#define IAVF_LINK_SPEED_100MB_SHIFT
#define IAVF_LINK_SPEED_1000MB_SHIFT
#define IAVF_LINK_SPEED_10GB_SHIFT
#define IAVF_LINK_SPEED_40GB_SHIFT
#define IAVF_LINK_SPEED_20GB_SHIFT
#define IAVF_LINK_SPEED_25GB_SHIFT

enum iavf_aq_link_speed {};

/* Send to PF command (indirect 0x0801) id is only used by PF
 * Send to VF command (indirect 0x0802) id is only used by PF
 * Send to Peer PF command (indirect 0x0803)
 */
struct iavf_aqc_pf_vf_message {};

IAVF_CHECK_CMD_LENGTH();

struct iavf_aqc_get_set_rss_key {};

IAVF_CHECK_CMD_LENGTH();

struct iavf_aqc_get_set_rss_key_data {};

IAVF_CHECK_STRUCT_LEN();

struct  iavf_aqc_get_set_rss_lut {};

IAVF_CHECK_CMD_LENGTH();
#endif /* _IAVF_ADMINQ_CMD_H_ */