Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  cmd.h   Sprache: C

 

/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
/* Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved */

#ifndef _MLXSW_CMD_H
#define _MLXSW_CMD_H

#include "item.h"

#define MLXSW_CMD_MBOX_SIZE 4096

static inline char *mlxsw_cmd_mbox_alloc(void)
{
 return kzalloc(MLXSW_CMD_MBOX_SIZE, GFP_KERNEL);
}

static inline void mlxsw_cmd_mbox_free(char *mbox)
{
 kfree(mbox);
}

static inline void mlxsw_cmd_mbox_zero(char *mbox)
{
 memset(mbox, 0, MLXSW_CMD_MBOX_SIZE);
}

struct mlxsw_core;

int mlxsw_cmd_exec(struct mlxsw_core *mlxsw_core, u16 opcode, u8 opcode_mod,
     u32 in_mod, bool out_mbox_direct, bool reset_ok,
     char *in_mbox, size_t in_mbox_size,
     char *out_mbox, size_t out_mbox_size);

static inline int mlxsw_cmd_exec_in(struct mlxsw_core *mlxsw_core, u16 opcode,
        u8 opcode_mod, u32 in_mod, char *in_mbox,
        size_t in_mbox_size)
{
 return mlxsw_cmd_exec(mlxsw_core, opcode, opcode_mod, in_mod, false,
         false, in_mbox, in_mbox_size, NULL, 0);
}

static inline int mlxsw_cmd_exec_out(struct mlxsw_core *mlxsw_core, u16 opcode,
         u8 opcode_mod, u32 in_mod,
         bool out_mbox_direct,
         char *out_mbox, size_t out_mbox_size)
{
 return mlxsw_cmd_exec(mlxsw_core, opcode, opcode_mod, in_mod,
         out_mbox_direct, false, NULL, 0,
         out_mbox, out_mbox_size);
}

static inline int mlxsw_cmd_exec_none(struct mlxsw_core *mlxsw_core, u16 opcode,
          u8 opcode_mod, u32 in_mod)
{
 return mlxsw_cmd_exec(mlxsw_core, opcode, opcode_mod, in_mod, false,
         false, NULL, 0, NULL, 0);
}

enum mlxsw_cmd_opcode {
 MLXSW_CMD_OPCODE_QUERY_FW  = 0x004,
 MLXSW_CMD_OPCODE_QUERY_BOARDINFO = 0x006,
 MLXSW_CMD_OPCODE_QUERY_AQ_CAP  = 0x003,
 MLXSW_CMD_OPCODE_MAP_FA   = 0xFFF,
 MLXSW_CMD_OPCODE_UNMAP_FA  = 0xFFE,
 MLXSW_CMD_OPCODE_CONFIG_PROFILE  = 0x100,
 MLXSW_CMD_OPCODE_ACCESS_REG  = 0x040,
 MLXSW_CMD_OPCODE_SW2HW_DQ  = 0x201,
 MLXSW_CMD_OPCODE_HW2SW_DQ  = 0x202,
 MLXSW_CMD_OPCODE_2ERR_DQ  = 0x01E,
 MLXSW_CMD_OPCODE_QUERY_DQ  = 0x022,
 MLXSW_CMD_OPCODE_SW2HW_CQ  = 0x016,
 MLXSW_CMD_OPCODE_HW2SW_CQ  = 0x017,
 MLXSW_CMD_OPCODE_QUERY_CQ  = 0x018,
 MLXSW_CMD_OPCODE_SW2HW_EQ  = 0x013,
 MLXSW_CMD_OPCODE_HW2SW_EQ  = 0x014,
 MLXSW_CMD_OPCODE_QUERY_EQ  = 0x015,
 MLXSW_CMD_OPCODE_QUERY_RESOURCES = 0x101,
};

static inline const char *mlxsw_cmd_opcode_str(u16 opcode)
{
 switch (opcode) {
 case MLXSW_CMD_OPCODE_QUERY_FW:
  return "QUERY_FW";
 case MLXSW_CMD_OPCODE_QUERY_BOARDINFO:
  return "QUERY_BOARDINFO";
 case MLXSW_CMD_OPCODE_QUERY_AQ_CAP:
  return "QUERY_AQ_CAP";
 case MLXSW_CMD_OPCODE_MAP_FA:
  return "MAP_FA";
 case MLXSW_CMD_OPCODE_UNMAP_FA:
  return "UNMAP_FA";
 case MLXSW_CMD_OPCODE_CONFIG_PROFILE:
  return "CONFIG_PROFILE";
 case MLXSW_CMD_OPCODE_ACCESS_REG:
  return "ACCESS_REG";
 case MLXSW_CMD_OPCODE_SW2HW_DQ:
  return "SW2HW_DQ";
 case MLXSW_CMD_OPCODE_HW2SW_DQ:
  return "HW2SW_DQ";
 case MLXSW_CMD_OPCODE_2ERR_DQ:
  return "2ERR_DQ";
 case MLXSW_CMD_OPCODE_QUERY_DQ:
  return "QUERY_DQ";
 case MLXSW_CMD_OPCODE_SW2HW_CQ:
  return "SW2HW_CQ";
 case MLXSW_CMD_OPCODE_HW2SW_CQ:
  return "HW2SW_CQ";
 case MLXSW_CMD_OPCODE_QUERY_CQ:
  return "QUERY_CQ";
 case MLXSW_CMD_OPCODE_SW2HW_EQ:
  return "SW2HW_EQ";
 case MLXSW_CMD_OPCODE_HW2SW_EQ:
  return "HW2SW_EQ";
 case MLXSW_CMD_OPCODE_QUERY_EQ:
  return "QUERY_EQ";
 case MLXSW_CMD_OPCODE_QUERY_RESOURCES:
  return "QUERY_RESOURCES";
 default:
  return "*UNKNOWN*";
 }
}

enum mlxsw_cmd_status {
 /* Command execution succeeded. */
 MLXSW_CMD_STATUS_OK  = 0x00,
 /* Internal error (e.g. bus error) occurred while processing command. */
 MLXSW_CMD_STATUS_INTERNAL_ERR = 0x01,
 /* Operation/command not supported or opcode modifier not supported. */
 MLXSW_CMD_STATUS_BAD_OP  = 0x02,
 /* Parameter not supported, parameter out of range. */
 MLXSW_CMD_STATUS_BAD_PARAM = 0x03,
 /* System was not enabled or bad system state. */
 MLXSW_CMD_STATUS_BAD_SYS_STATE = 0x04,
 /* Attempt to access reserved or unallocated resource, or resource in
  * inappropriate ownership.
 */

 MLXSW_CMD_STATUS_BAD_RESOURCE = 0x05,
 /* Requested resource is currently executing a command. */
 MLXSW_CMD_STATUS_RESOURCE_BUSY = 0x06,
 /* Required capability exceeds device limits. */
 MLXSW_CMD_STATUS_EXCEED_LIM = 0x08,
 /* Resource is not in the appropriate state or ownership. */
 MLXSW_CMD_STATUS_BAD_RES_STATE = 0x09,
 /* Index out of range (might be beyond table size or attempt to
  * access a reserved resource).
 */

 MLXSW_CMD_STATUS_BAD_INDEX = 0x0A,
 /* NVMEM checksum/CRC failed. */
 MLXSW_CMD_STATUS_BAD_NVMEM = 0x0B,
 /* Device is currently running reset */
 MLXSW_CMD_STATUS_RUNNING_RESET = 0x26,
 /* Bad management packet (silently discarded). */
 MLXSW_CMD_STATUS_BAD_PKT = 0x30,
};

static inline const char *mlxsw_cmd_status_str(u8 status)
{
 switch (status) {
 case MLXSW_CMD_STATUS_OK:
  return "OK";
 case MLXSW_CMD_STATUS_INTERNAL_ERR:
  return "INTERNAL_ERR";
 case MLXSW_CMD_STATUS_BAD_OP:
  return "BAD_OP";
 case MLXSW_CMD_STATUS_BAD_PARAM:
  return "BAD_PARAM";
 case MLXSW_CMD_STATUS_BAD_SYS_STATE:
  return "BAD_SYS_STATE";
 case MLXSW_CMD_STATUS_BAD_RESOURCE:
  return "BAD_RESOURCE";
 case MLXSW_CMD_STATUS_RESOURCE_BUSY:
  return "RESOURCE_BUSY";
 case MLXSW_CMD_STATUS_EXCEED_LIM:
  return "EXCEED_LIM";
 case MLXSW_CMD_STATUS_BAD_RES_STATE:
  return "BAD_RES_STATE";
 case MLXSW_CMD_STATUS_BAD_INDEX:
  return "BAD_INDEX";
 case MLXSW_CMD_STATUS_BAD_NVMEM:
  return "BAD_NVMEM";
 case MLXSW_CMD_STATUS_RUNNING_RESET:
  return "RUNNING_RESET";
 case MLXSW_CMD_STATUS_BAD_PKT:
  return "BAD_PKT";
 default:
  return "*UNKNOWN*";
 }
}

/* QUERY_FW - Query Firmware
 * -------------------------
 * OpMod == 0, INMmod == 0
 * -----------------------
 * The QUERY_FW command retrieves information related to firmware, command
 * interface version and the amount of resources that should be allocated to
 * the firmware.
 */


static inline int mlxsw_cmd_query_fw(struct mlxsw_core *mlxsw_core,
         char *out_mbox)
{
 return mlxsw_cmd_exec_out(mlxsw_core, MLXSW_CMD_OPCODE_QUERY_FW,
      0, 0, false, out_mbox, MLXSW_CMD_MBOX_SIZE);
}

/* cmd_mbox_query_fw_fw_pages
 * Amount of physical memory to be allocatedfor firmware usage in 4KB pages.
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fw_pages, 0x00, 16, 16);

/* cmd_mbox_query_fw_fw_rev_major
 * Firmware Revision - Major
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fw_rev_major, 0x00, 0, 16);

/* cmd_mbox_query_fw_fw_rev_subminor
 * Firmware Sub-minor version (Patch level)
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fw_rev_subminor, 0x04, 16, 16);

/* cmd_mbox_query_fw_fw_rev_minor
 * Firmware Revision - Minor
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fw_rev_minor, 0x04, 0, 16);

/* cmd_mbox_query_fw_core_clk
 * Internal Clock Frequency (in MHz)
 */

MLXSW_ITEM32(cmd_mbox, query_fw, core_clk, 0x08, 16, 16);

/* cmd_mbox_query_fw_cmd_interface_rev
 * Command Interface Interpreter Revision ID. This number is bumped up
 * every time a non-backward-compatible change is done for the command
 * interface. The current cmd_interface_rev is 1.
 */

MLXSW_ITEM32(cmd_mbox, query_fw, cmd_interface_rev, 0x08, 0, 16);

/* cmd_mbox_query_fw_dt
 * If set, Debug Trace is supported
 */

MLXSW_ITEM32(cmd_mbox, query_fw, dt, 0x0C, 31, 1);

/* cmd_mbox_query_fw_api_version
 * Indicates the version of the API, to enable software querying
 * for compatibility. The current api_version is 1.
 */

MLXSW_ITEM32(cmd_mbox, query_fw, api_version, 0x0C, 0, 16);

/* cmd_mbox_query_fw_fw_hour
 * Firmware timestamp - hour
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fw_hour, 0x10, 24, 8);

/* cmd_mbox_query_fw_fw_minutes
 * Firmware timestamp - minutes
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fw_minutes, 0x10, 16, 8);

/* cmd_mbox_query_fw_fw_seconds
 * Firmware timestamp - seconds
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fw_seconds, 0x10, 8, 8);

/* cmd_mbox_query_fw_fw_year
 * Firmware timestamp - year
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fw_year, 0x14, 16, 16);

/* cmd_mbox_query_fw_fw_month
 * Firmware timestamp - month
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fw_month, 0x14, 8, 8);

/* cmd_mbox_query_fw_fw_day
 * Firmware timestamp - day
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fw_day, 0x14, 0, 8);

/* cmd_mbox_query_fw_lag_mode_support
 * 0: CONFIG_PROFILE.lag_mode is not supported by FW
 * 1: CONFIG_PROFILE.lag_mode is supported by FW
 */

MLXSW_ITEM32(cmd_mbox, query_fw, lag_mode_support, 0x18, 1, 1);

/* cmd_mbox_query_fw_cff_support
 * 0: CONFIG_PROFILE.flood_mode = 5 (CFF) is not supported by FW
 * 1: CONFIG_PROFILE.flood_mode = 5 (CFF) is supported by FW
 */

MLXSW_ITEM32(cmd_mbox, query_fw, cff_support, 0x18, 2, 1);

/* cmd_mbox_query_fw_clr_int_base_offset
 * Clear Interrupt register's offset from clr_int_bar register
 * in PCI address space.
 */

MLXSW_ITEM64(cmd_mbox, query_fw, clr_int_base_offset, 0x20, 0, 64);

/* cmd_mbox_query_fw_clr_int_bar
 * PCI base address register (BAR) where clr_int register is located.
 * 00 - BAR 0-1 (64 bit BAR)
 */

MLXSW_ITEM32(cmd_mbox, query_fw, clr_int_bar, 0x28, 30, 2);

/* cmd_mbox_query_fw_error_buf_offset
 * Read Only buffer for internal error reports of offset
 * from error_buf_bar register in PCI address space).
 */

MLXSW_ITEM64(cmd_mbox, query_fw, error_buf_offset, 0x30, 0, 64);

/* cmd_mbox_query_fw_error_buf_size
 * Internal error buffer size in DWORDs
 */

MLXSW_ITEM32(cmd_mbox, query_fw, error_buf_size, 0x38, 0, 32);

/* cmd_mbox_query_fw_error_int_bar
 * PCI base address register (BAR) where error buffer
 * register is located.
 * 00 - BAR 0-1 (64 bit BAR)
 */

MLXSW_ITEM32(cmd_mbox, query_fw, error_int_bar, 0x3C, 30, 2);

/* cmd_mbox_query_fw_doorbell_page_offset
 * Offset of the doorbell page
 */

MLXSW_ITEM64(cmd_mbox, query_fw, doorbell_page_offset, 0x40, 0, 64);

/* cmd_mbox_query_fw_doorbell_page_bar
 * PCI base address register (BAR) of the doorbell page
 * 00 - BAR 0-1 (64 bit BAR)
 */

MLXSW_ITEM32(cmd_mbox, query_fw, doorbell_page_bar, 0x48, 30, 2);

/* cmd_mbox_query_fw_free_running_clock_offset
 * The offset of the free running clock page
 */

MLXSW_ITEM64(cmd_mbox, query_fw, free_running_clock_offset, 0x50, 0, 64);

/* cmd_mbox_query_fw_fr_rn_clk_bar
 * PCI base address register (BAR) of the free running clock page
 * 0: BAR 0
 * 1: 64 bit BAR
 */

MLXSW_ITEM32(cmd_mbox, query_fw, fr_rn_clk_bar, 0x58, 30, 2);

/* cmd_mbox_query_fw_utc_sec_offset
 * The offset of the UTC_Sec page
 */

MLXSW_ITEM64(cmd_mbox, query_fw, utc_sec_offset, 0x70, 0, 64);

/* cmd_mbox_query_fw_utc_sec_bar
 * PCI base address register (BAR) of the UTC_Sec page
 * 0: BAR 0
 * 1: 64 bit BAR
 * Reserved on SwitchX/-2, Switch-IB/2, Spectrum-1
 */

MLXSW_ITEM32(cmd_mbox, query_fw, utc_sec_bar, 0x78, 30, 2);

/* cmd_mbox_query_fw_utc_nsec_offset
 * The offset of the UTC_nSec page
 */

MLXSW_ITEM64(cmd_mbox, query_fw, utc_nsec_offset, 0x80, 0, 64);

/* cmd_mbox_query_fw_utc_nsec_bar
 * PCI base address register (BAR) of the UTC_nSec page
 * 0: BAR 0
 * 1: 64 bit BAR
 * Reserved on SwitchX/-2, Switch-IB/2, Spectrum-1
 */

MLXSW_ITEM32(cmd_mbox, query_fw, utc_nsec_bar, 0x88, 30, 2);

/* QUERY_BOARDINFO - Query Board Information
 * -----------------------------------------
 * OpMod == 0 (N/A), INMmod == 0 (N/A)
 * -----------------------------------
 * The QUERY_BOARDINFO command retrieves adapter specific parameters.
 */


static inline int mlxsw_cmd_boardinfo(struct mlxsw_core *mlxsw_core,
          char *out_mbox)
{
 return mlxsw_cmd_exec_out(mlxsw_core, MLXSW_CMD_OPCODE_QUERY_BOARDINFO,
      0, 0, false, out_mbox, MLXSW_CMD_MBOX_SIZE);
}

/* cmd_mbox_boardinfo_intapin
 * When PCIe interrupt messages are being used, this value is used for clearing
 * an interrupt. When using MSI-X, this register is not used.
 */

MLXSW_ITEM32(cmd_mbox, boardinfo, intapin, 0x10, 24, 8);

/* cmd_mbox_boardinfo_vsd_vendor_id
 * PCISIG Vendor ID (www.pcisig.com/membership/vid_search) of the vendor
 * specifying/formatting the VSD. The vsd_vendor_id identifies the management
 * domain of the VSD/PSID data. Different vendors may choose different VSD/PSID
 * format and encoding as long as they use their assigned vsd_vendor_id.
 */

MLXSW_ITEM32(cmd_mbox, boardinfo, vsd_vendor_id, 0x1C, 0, 16);

/* cmd_mbox_boardinfo_vsd
 * Vendor Specific Data. The VSD string that is burnt to the Flash
 * with the firmware.
 */

#define MLXSW_CMD_BOARDINFO_VSD_LEN 208
MLXSW_ITEM_BUF(cmd_mbox, boardinfo, vsd, 0x20, MLXSW_CMD_BOARDINFO_VSD_LEN);

/* cmd_mbox_boardinfo_psid
 * The PSID field is a 16-ascii (byte) character string which acts as
 * the board ID. The PSID format is used in conjunction with
 * Mellanox vsd_vendor_id (15B3h).
 */

#define MLXSW_CMD_BOARDINFO_PSID_LEN 16
MLXSW_ITEM_BUF(cmd_mbox, boardinfo, psid, 0xF0, MLXSW_CMD_BOARDINFO_PSID_LEN);

/* QUERY_AQ_CAP - Query Asynchronous Queues Capabilities
 * -----------------------------------------------------
 * OpMod == 0 (N/A), INMmod == 0 (N/A)
 * -----------------------------------
 * The QUERY_AQ_CAP command returns the device asynchronous queues
 * capabilities supported.
 */


static inline int mlxsw_cmd_query_aq_cap(struct mlxsw_core *mlxsw_core,
      char *out_mbox)
{
 return mlxsw_cmd_exec_out(mlxsw_core, MLXSW_CMD_OPCODE_QUERY_AQ_CAP,
      0, 0, false, out_mbox, MLXSW_CMD_MBOX_SIZE);
}

/* cmd_mbox_query_aq_cap_log_max_sdq_sz
 * Log (base 2) of max WQEs allowed on SDQ.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, log_max_sdq_sz, 0x00, 24, 8);

/* cmd_mbox_query_aq_cap_max_num_sdqs
 * Maximum number of SDQs.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, max_num_sdqs, 0x00, 0, 8);

/* cmd_mbox_query_aq_cap_log_max_rdq_sz
 * Log (base 2) of max WQEs allowed on RDQ.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, log_max_rdq_sz, 0x04, 24, 8);

/* cmd_mbox_query_aq_cap_max_num_rdqs
 * Maximum number of RDQs.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, max_num_rdqs, 0x04, 0, 8);

/* cmd_mbox_query_aq_cap_log_max_cq_sz
 * Log (base 2) of the Maximum CQEs allowed in a CQ for CQEv0 and CQEv1.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, log_max_cq_sz, 0x08, 24, 8);

/* cmd_mbox_query_aq_cap_log_max_cqv2_sz
 * Log (base 2) of the Maximum CQEs allowed in a CQ for CQEv2.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, log_max_cqv2_sz, 0x08, 16, 8);

/* cmd_mbox_query_aq_cap_max_num_cqs
 * Maximum number of CQs.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, max_num_cqs, 0x08, 0, 8);

/* cmd_mbox_query_aq_cap_log_max_eq_sz
 * Log (base 2) of max EQEs allowed on EQ.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, log_max_eq_sz, 0x0C, 24, 8);

/* cmd_mbox_query_aq_cap_max_num_eqs
 * Maximum number of EQs.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, max_num_eqs, 0x0C, 0, 8);

/* cmd_mbox_query_aq_cap_max_sg_sq
 * The maximum S/G list elements in an DSQ. DSQ must not contain
 * more S/G entries than indicated here.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, max_sg_sq, 0x10, 8, 8);

/* cmd_mbox_query_aq_cap_
 * The maximum S/G list elements in an DRQ. DRQ must not contain
 * more S/G entries than indicated here.
 */

MLXSW_ITEM32(cmd_mbox, query_aq_cap, max_sg_rq, 0x10, 0, 8);

/* MAP_FA - Map Firmware Area
 * --------------------------
 * OpMod == 0 (N/A), INMmod == Number of VPM entries
 * -------------------------------------------------
 * The MAP_FA command passes physical pages to the switch. These pages
 * are used to store the device firmware. MAP_FA can be executed multiple
 * times until all the firmware area is mapped (the size that should be
 * mapped is retrieved through the QUERY_FW command). All required pages
 * must be mapped to finish the initialization phase. Physical memory
 * passed in this command must be pinned.
 */


#define MLXSW_CMD_MAP_FA_VPM_ENTRIES_MAX 32

static inline int mlxsw_cmd_map_fa(struct mlxsw_core *mlxsw_core,
       char *in_mbox, u32 vpm_entries_count)
{
 return mlxsw_cmd_exec_in(mlxsw_core, MLXSW_CMD_OPCODE_MAP_FA,
     0, vpm_entries_count,
     in_mbox, MLXSW_CMD_MBOX_SIZE);
}

/* cmd_mbox_map_fa_pa
 * Physical Address.
 */

MLXSW_ITEM64_INDEXED(cmd_mbox, map_fa, pa, 0x00, 12, 52, 0x08, 0x00, true);

/* cmd_mbox_map_fa_log2size
 * Log (base 2) of the size in 4KB pages of the physical and contiguous memory
 * that starts at PA_L/H.
 */

MLXSW_ITEM32_INDEXED(cmd_mbox, map_fa, log2size, 0x00, 0, 5, 0x08, 0x04, false);

/* UNMAP_FA - Unmap Firmware Area
 * ------------------------------
 * OpMod == 0 (N/A), INMmod == 0 (N/A)
 * -----------------------------------
 * The UNMAP_FA command unload the firmware and unmaps all the
 * firmware area. After this command is completed the device will not access
 * the pages that were mapped to the firmware area. After executing UNMAP_FA
 * command, software reset must be done prior to execution of MAP_FW command.
 */


static inline int mlxsw_cmd_unmap_fa(struct mlxsw_core *mlxsw_core)
{
 return mlxsw_cmd_exec_none(mlxsw_core, MLXSW_CMD_OPCODE_UNMAP_FA, 0, 0);
}

/* QUERY_RESOURCES - Query chip resources
 * --------------------------------------
 * OpMod == 0 (N/A) , INMmod is index
 * ----------------------------------
 * The QUERY_RESOURCES command retrieves information related to chip resources
 * by resource ID. Every command returns 32 entries. INmod is being use as base.
 * for example, index 1 will return entries 32-63. When the tables end and there
 * are no more sources in the table, will return resource id 0xFFF to indicate
 * it.
 */


#define MLXSW_CMD_QUERY_RESOURCES_TABLE_END_ID 0xffff
#define MLXSW_CMD_QUERY_RESOURCES_MAX_QUERIES 100
#define MLXSW_CMD_QUERY_RESOURCES_PER_QUERY 32

static inline int mlxsw_cmd_query_resources(struct mlxsw_core *mlxsw_core,
         char *out_mbox, int index)
{
 return mlxsw_cmd_exec_out(mlxsw_core, MLXSW_CMD_OPCODE_QUERY_RESOURCES,
      0, index, false, out_mbox,
      MLXSW_CMD_MBOX_SIZE);
}

/* cmd_mbox_query_resource_id
 * The resource id. 0xFFFF indicates table's end.
 */

MLXSW_ITEM32_INDEXED(cmd_mbox, query_resource, id, 0x00, 16, 16, 0x8, 0, false);

/* cmd_mbox_query_resource_data
 * The resource
 */

MLXSW_ITEM64_INDEXED(cmd_mbox, query_resource, data,
       0x00, 0, 40, 0x8, 0, false);

/* CONFIG_PROFILE (Set) - Configure Switch Profile
 * ------------------------------
 * OpMod == 1 (Set), INMmod == 0 (N/A)
 * -----------------------------------
 * The CONFIG_PROFILE command sets the switch profile. The command can be
 * executed on the device only once at startup in order to allocate and
 * configure all switch resources and prepare it for operational mode.
 * It is not possible to change the device profile after the chip is
 * in operational mode.
 * Failure of the CONFIG_PROFILE command leaves the hardware in an indeterminate
 * state therefore it is required to perform software reset to the device
 * following an unsuccessful completion of the command. It is required
 * to perform software reset to the device to change an existing profile.
 */


static inline int mlxsw_cmd_config_profile_set(struct mlxsw_core *mlxsw_core,
            char *in_mbox)
{
 return mlxsw_cmd_exec_in(mlxsw_core, MLXSW_CMD_OPCODE_CONFIG_PROFILE,
     1, 0, in_mbox, MLXSW_CMD_MBOX_SIZE);
}

/* cmd_mbox_config_profile_set_max_vepa_channels
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_max_vepa_channels, 0x0C, 0, 1);

/* cmd_mbox_config_profile_set_max_lag
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_max_lag, 0x0C, 1, 1);

/* cmd_mbox_config_profile_set_max_port_per_lag
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_max_port_per_lag, 0x0C, 2, 1);

/* cmd_mbox_config_profile_set_max_mid
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_max_mid, 0x0C, 3, 1);

/* cmd_mbox_config_profile_set_max_pgt
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_max_pgt, 0x0C, 4, 1);

/* cmd_mbox_config_profile_set_max_system_port
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_max_system_port, 0x0C, 5, 1);

/* cmd_mbox_config_profile_set_max_vlan_groups
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_max_vlan_groups, 0x0C, 6, 1);

/* cmd_mbox_config_profile_set_max_regions
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_max_regions, 0x0C, 7, 1);

/* cmd_mbox_config_profile_set_flood_mode
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_flood_mode, 0x0C, 8, 1);

/* cmd_mbox_config_profile_set_max_flood_tables
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_flood_tables, 0x0C, 9, 1);

/* cmd_mbox_config_profile_set_max_ib_mc
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_max_ib_mc, 0x0C, 12, 1);

/* cmd_mbox_config_profile_set_max_pkey
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_max_pkey, 0x0C, 13, 1);

/* cmd_mbox_config_profile_set_adaptive_routing_group_cap
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile,
      set_adaptive_routing_group_cap, 0x0C, 14, 1);

/* cmd_mbox_config_profile_set_ar_sec
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_ar_sec, 0x0C, 15, 1);

/* cmd_mbox_config_profile_set_ubridge
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_ubridge, 0x0C, 22, 1);

/* cmd_mbox_config_profile_set_kvd_linear_size
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_kvd_linear_size, 0x0C, 24, 1);

/* cmd_mbox_config_profile_set_kvd_hash_single_size
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_kvd_hash_single_size, 0x0C, 25, 1);

/* cmd_mbox_config_profile_set_kvd_hash_double_size
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_kvd_hash_double_size, 0x0C, 26, 1);

/* cmd_mbox_config_profile_set_cqe_version
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_cqe_version, 0x08, 0, 1);

/* cmd_mbox_config_profile_set_cqe_time_stamp_type
 * Capability bit. Setting a bit to 1 configures the profile
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_cqe_time_stamp_type, 0x08, 2, 1);

/* cmd_mbox_config_profile_set_lag_mode
 * Capability bit. Setting a bit to 1 configures the lag_mode
 * according to the mailbox contents.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, set_lag_mode, 0x08, 7, 1);

/* cmd_mbox_config_profile_max_vepa_channels
 * Maximum number of VEPA channels per port (0 through 16)
 * 0 - multi-channel VEPA is disabled
 */

MLXSW_ITEM32(cmd_mbox, config_profile, max_vepa_channels, 0x10, 0, 8);

/* cmd_mbox_config_profile_max_lag
 * Maximum number of LAG IDs requested.
 * Reserved when Spectrum-1/2/3, supported from Spectrum-4 and above.
 * For Spectrum-4, firmware sets 128 for values between 1-128 and 256 for values
 * between 129-256.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, max_lag, 0x14, 0, 16);

/* cmd_mbox_config_profile_max_port_per_lag
 * Maximum number of ports per LAG requested.
 */
MLXSW_ITEM32(cmd_mbox, config_profile, max_port_per_lag, 0x18, 0, 16);

/* cmd_mbox_config_profile_max_mid
 * Maximum Multicast IDs.
 * Multicast IDs are allocated from 0 to max_mid-1
 */

MLXSW_ITEM32(cmd_mbox, config_profile, max_mid, 0x1C, 0, 16);

/* cmd_mbox_config_profile_max_pgt
 * Maximum records in the Port Group Table per Switch Partition.
*Port GroupTable indexes   0 tomax_pgt-1
 */

MLXSW_ITEM32( , max_pgt 0x20, 0 16)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

*
 * The maximumjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 *         ,,0
, max_system_port,0 ,16)

/* cmd_mbox_config_profile_max_vlan_groups
 * Maximum number VLAN Groups for=0java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
 */

MLXSW_ITEM32(cmd_mbox, config_profile, java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 36

/* cmd_mbox_config_profile_max_regions
 java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 36
 */

cmd_mbox  max_regions 0x2C0 )

/* cmd_mbox_config_profile_max_flood_tables
 * Maximum number of single-entry flooding tables. Different flooding tables
   beassociated  differentpacket typesjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 */

MLXSW_ITEM32(cmd_mbox,java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

/* cmd_mbox_config_profile_max_vid_flood_tables
  number  -id  tables.tables 
 * to the different packet types for the different switch partitions.
  4Kentries covering  space.
 */

MLXSW_ITEM32java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 26

enum java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 20
/
   java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
  * MLXSW_CMD_OPCODE_QUERY_CQ
  indicatesnumberFIDjava.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
  * tables max_fid_flood_tables indicates the number of per-FID tables.
  * Reserved when unified bridge model  MLXSW_CMD_OPCODE_HW2SW_EQ
  * MLXSW_CMD_OPCODE_QUERY_EQjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  returnjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 27
 /* Controlled flood tables. Reserved when legacy bridge model is
  * used.
 */

MLXSW_CMD_MBOX_CONFIG_PROFILE_FLOOD_MODE_CONTROLLED=,
 /* CFF - Compressed FID Flood (CFF) mode.
  =0java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  * /* Attempt to access reserved or unallocated resource, or resource in
 */

 MLXSW_CMD_STATUS_RESOURCE_BUSY=x06
};

/* cmd_mbox_config_profile_flood_mode
 * Flooding mode to  /* NVMEM checksum/CRC failed. */
 */

MLXSW_ITEM32

/* cmd_mbox_config_profile_max_fid_offset_flood_tables
 * Maximum number of FID-offset java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 26
 */

MLXSW_ITEM32(cmd_mbox, config_profile,
     , 0x34,24 )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48

/* cmd_mbox_config_profile_fid_offset_flood_table_size
*   (umber  entries)of  FID-offsetflood .
 */

MLXSW_ITEM32(cmd_mbox, config_profile,
      java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 21

/* cmd_mbox_config_profile_max_fid_flood_tables
  java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 19
*
 * Note: This flooding tables cover special FIDs only (vFIDs), starting at
 * FID value 4K and higher.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, max_fid_flood_tables, 0x38, 24, 4);

/* cmd_mbox_config_profile_fid_flood_table_size
 * /
 */

config_profile java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 74

/* cmd_mbox_config_profile_max_ib_mc*physicalmemory be  firmware usage  4 .
 *
 * FDB (in 512*
 */

MLXSW_ITEM32(cmd_mbox, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 3

/* cmd_mbox_config_profile_max_pkey
 *   Internal Clock Frequency (in MHz)
 */

x_pkey 0,,15);

/* cmd_mbox_config_profile_ar_sec
 * Primary * every time a non-backward-compatible change is done for the command
  the number   sub-java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
/java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
)
 * 2
*3 -java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 56
 */

MLXSW_ITEM32 

/* cmd_mbox_config_profile_adaptive_routing_group_cap
*Adaptive  Group Capability.Indicates   of  
*. Note  when /  enabled,each
*primary/econdary   2adaptive routing entriesjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
 */

MLXSW_ITEM32(cmd_mbox, config_profile, adaptive_routing_group_cap, 1  java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 48

/* cmd_mbox_config_profile_arn
 * Adaptive Routing Notification Enable
java.lang.StringIndexOutOfBoundsException: Range [55, 38) out of bounds for length 38
 */

MLXSW_ITEM32(cmd_mbox, config_profile, java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 3

*
 * Unified Bridge
 * 0 - non unified bridge
 * 1 - unified */
*
MLXSW_ITEM32*PCIbaseaddress register Bwhereregisterisjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69

enum mlxsw_cmd_mbox_config_profile_lag_mode {
 /* FW manages PGT LAG table */
java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
 /* SW manages PGT LAG table */
 MLXSW_CMD_MBOX_CONFIG_PROFILE_LAG_MODE_SW
;

/* cmd_mbox_config_profile_lag_mode
 * LAG mode
 * Configured if set_lag_mode is set
 * Supported from Spectrum-2 and above.
*Supported only when ubridge = 1
 */

MLXSW_ITEM32(cmd_mbox,config_profile, lag_mode, 0x50, 3, 1);

/* cmd_mbox_config_kvd_linear_size
 * KVD Linear Size
 * Valid for SpectrumMLXSW_ITEM64(cmd_mbox, query_fw, doorbell_page_offset, 0x40, 0, 64);
 * Allowed values are 128*N where N=0 or higher
 */

MLXSW_ITEM32(cmd_mbox, config_profile, kvd_linear_size, 0java.lang.StringIndexOutOfBoundsException: Range [0, 60) out of bounds for length 0


 * KVD Hash single-* 0 0
 * Valid( java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 61
 * MLXSW_ITEM64 ,  ,java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
 * Must be greater or equal to cap_min_kvd_hash_single_size
 * Must be smaller or equal to cap_kvd_size - kvd_linear_size
 */
c ,kvd_hash_single_size ,0 )

 
 * KVD Hash double-entries size (units of single-size entries)

 * Allowed   Theoffsetof  page
 * Must be either java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * Must  * PCI basePCI baseaddress ()of UTC_nSec
 */
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 74

/* cmd_mbox_config_profile_swid_config_mask
 *  * 1: 64bit java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
 * ration value for the Switch Partition are taken from the mailbox.
   current configurationvalues  java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
 * Bit 0 - set type
 * Bit 1 - properties
 * Other - reserved
 */

* ---------------
       0x60, 24, 8, 0x08, 0x00, false);

/* cmd_mbox_config_profile_swid_config_type
 * Switch Partition type.
 * 0000 - disabled (Switch Partition does not exist)
 * 0001 - InfiniBand
 * 0010 - Ethernet
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 * Other - reserved
 */

MLXSW_ITEM32_INDEXEDconfig_profile swid_config_type
       0x60, 20, 4, 0x08, 0x00, false);

/* cmd_mbox_config_profile_swid_config_properties
 * Switch Partition properties.
 */

MLXSW_ITEM32_INDEXED(cmd_mbox, config_profile, swid_config_properties,
       

enum mlxsw_cmd_mbox_config_profile_cqe_time_stamp_type {
/
  * domain of the VSD/PSID data. Different vendors may PSID
 /* FRC - Free Running Clock, units of 1nSec.
  * Reserved when SwitchX/-2, Switch-IB/2 and Spectrum-1.
 */

java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  * Reserved when SwitchX/2, Switch-IB/2 and Spectrum java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 21
  */
 MLXSW_CMD_MBOX_CONFIG_PROFILE_CQE_TIME_STAMP_TYPE_UTC,
;

/* cmd_mbox_config_profile_cqe_time_stamp_type
 * CQE time_stamp_type for non-mirror-packets.
 * Configured if set_cqe_time_stamp_type is set.
 * Reserved when java.lang.StringIndexOutOfBoundsException: Range [56, 23) out of bounds for length 56
 */

MLXSW_ITEM32(cmd_mbox, config_profile, cqe_time_stamp_type, 0xB0, 8, 2);

/* cmd_mbox_config_profile_cqe_version
 * CQE version:
 * 0: CQE version is 0
 * 1: CQE version is either 1 or 2
 * CQE ver 1 or 2 is configured by Completion Queue Context field cqe_ver.
 */

MLXSW_ITEM32(cmd_mbox, config_profile, cqe_version, 0xB0, 0, 8);

/* ACCESS_REG - Access EMAD Supported Register
-
 * OpMod == 0 (N/A), INMmod == 0 (N/A)
*------------------
 *    ,0,false, out_mbox, );
 * is  * Log (base2 max allowed SDQjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
 */


static inline int mlxsw_cmd_access_reg(struct mlxsw_core *mlxsw_core,
           bool /
           char *in_mbox, char *out_mbox)
{
return mlxsw_core ,
         0, 0, false, reset_ok,
         in_mbox, MLXSW_CMD_MBOX_SIZE,
         out_mbox, MLXSW_CMD_MBOX_SIZE);


/* SW2HW_DQ - Software to Hardware DQ
 * ----------------------------------
 * OpMod == 0 (send DQ) / OpMod == 1 (receive DQ)
 * INMmod == DQ java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
 * -------------------------------
 * The SW2HW_DQ command transitions a descriptor queue from software to
 * MLXSW_ITEM32(,query_aq_cap, , 0x0C, 0, 8)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
 * on the descriptor queue.
 */


static inline int __mlxsw_cmd_sw2hw_dq(struct
           char *
 java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
{
return java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
     MLXSW_ITEM32,  max_sg_rq 0,8)
     in_mbox, MLXSW_CMD_MBOX_SIZE);
}

enum {
 MLXSW_CMD_OPCODE_MOD_SDQ = 0,
 MLXSW_CMD_OPCODE_MOD_RDQ = 1,
};

   java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 68
          char *in_mbox, u32 dq_number)
{
 return __mlxsw_cmd_sw2hw_dq(mlxsw_core, in_mbox, dq_number,
        MLXSW_CMD_OPCODE_MOD_SDQ);
}

static inline int mlxsw_cmd_sw2hw_rdq(struct mlxsw_core *mlxsw_core,
          char *in_mbox, u32 dq_number)
{
 return _ *times firmwareareaismapped(hesizethat  
        MLXSW_CMD_OPCODE_MOD_RDQ);
}

/* cmd_mbox_sw2hw_dq_cq
 * Number of the CQ that this Descriptor Queue reports completions to.
 */

MLXSW_ITEM32(cmd_mbox, sw2hw_dq, cq, 0x00, 24, 8);

enum mlxsw_cmd_mbox_sw2hw_dq_sdq_lp#efineMLXSW_CMD_MAP_FA_VPM_ENTRIES_MAX32
 java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
 MLXSW_CMD_MBOX_SW2HW_DQ_SDQ_LP_IGNORE_WQE,
};

/* cmd_mbox_sw2hw_dq_sdq_lp mlxsw_cmd_exec_inmlxsw_core,MLXSW_CMD_OPCODE_MAP_FA,
 * SDQ local Processing
 * 0: local processing by wqe.lp
 * 1: local processing (ignoring wqe.lp)
 */

MLXSW_ITEM32(cmd_mbox, sw2hw_dq, sdq_lp, 0x00, 23, 1);

/* cmd_mbox_sw2hw_dq_sdq_tclass
 * SDQ: CPU 
 * RDQ: Reserved
 */

MLXSW_ITEM32(cmd_mbox, sw2hw_dq, sdq_tclass, 0x00, 16, 6);

/* cmd_mbox_sw2hw_dq_log2_dq_sz
 * Log (base 2) of the Descriptor Queue size in 4KB pages.
 */

MLXSW_ITEM32(cmd_mbox, sw2hw_dq, log2_dq_sz, 0x00, 0, 6);

/* cmd_mbox_sw2hw_dq_pa
 * Physical Address.

MLXSW_ITEM64_INDEXED(cmd_mbox, sw2hw_dq, pa, 0x10, 12, 52, 0x08, 0x00, true);

/* HW2SW_DQ - Hardware to Software DQ
 * ----------------------------------
 * OpMod == 0 (send DQ) / * command, software reset must   java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 77
 * INMmod == DQ number
  ------------------------
 * The HW2SW_DQ command transitions a descriptor queue from hardware to
 * software ownership. Incoming packets on the DQ are silently discarded,
 * SW should not post descriptors on nonoperational DQs.
 */


static inline int __mlxsw_cmd_hw2sw_dq(struct mlxsw_core *mlxsw_core,
           u32 dq_number, u8 opcode_mod)
{
 return mlxsw_cmd_exec_none(mlxsw_core    sources  java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 78
     ,dq_number;
}

_,
          u32 dq_number)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 return __mlxsw_cmd_hw2sw_dq(  Theresource  0xFFFFindicatestablesend
        MLXSW_ITEM32_INDEXED,java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 80
}

static inline java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
          u32 dq_number)
{
 return __mlxsw_cmd_hw2sw_dq(mlxsw_core, dq_number,
        MLXSW_CMD_OPCODE_MOD_RDQ);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

/* 2ERR_DQ - To Error DQ
 --------java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
 * OpMod == 0 (send DQ) / OpMod == 1 (receive DQ)
 * INMmod == DQ number
 * ----------------------------------------------
 * The 2ERR_DQ command transitions the DQ into the error state from the state
 * in which it has been. While the command is executed, some in-process
 * descriptors may complete. Once the DQ transitions into the error state,
 * if there are posted descriptors on the RDQ/SDQ, the hardware writes
  java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 79
 * When the command is completed successfully, the DQ is already in
 * the error state.
 */


static inline int __ * Failure of the CONFIG_PROFILE inanindeterminate
          u32 dq_number, u8 opcode_mod)
{
 return mlxsw_cmd_exec_none(mlxsw_core, MLXSW_CMD_OPCODE_2ERR_DQ,
       opcode_mod, dq_number  followingunsuccessful    .isjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
}

static inline int mlxsw_cmd_2err_sdq(struct mlxsw_core *mlxsw_core,
         u32 dq_number)
{
 return __mlxsw_cmd_2err_dq(mlxsw_core, dq_number,
     );
}

static inline int /* cmd_mbox_config_profile_set_max_vepa_channels
         u32 dq_number)
{
 return __mlxsw_cmd_2err_dq(mlxsw_core, dq_number,

}

/* QUERY_DQ - Query DQ
*---------java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
 * OpMod == 0 (send DQ) / OpMod == 1 (receive DQ)
 * INMmod == DQ number
 * ----------------------------------------------
 * /
 *
 * Note: Output mailbox has the same format as SW2HW_DQ.
 */


bitjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 60
           char *out_mbox, u32 dq_number,
           u8 opcode_mod)
{
 return mlxsw_cmd_exec_out(mlxsw_core, MLXSW_CMD_OPCODE_2ERR_DQ,
      opcode_mod, dq_number, false,
      out_mbox, MLXSW_CMD_MBOX_SIZE);
}

static inline int mlxsw_cmd_query_sdq(struct mlxsw_core *mlxsw_core,
          char *out_mbox, u32 dq_number)
{
 return __mlxsw_cmd_query_dq(mlxsw_core, out_mbox, dq_number,
        MLXSW_CMD_OPCODE_MOD_SDQ);
}

static inline int mlxsw_cmd_query_rdq(struct mlxsw_core *mlxsw_core,
          char *out_mbox, u32 dq_number)
{
 return __mlxsw_cmd_query_dq(mlxsw_core, out_mbox, dq_number,
 ;
}

/* SW2HW_CQ - Software to Hardware CQ
 * ----------------------------------MLXSW_ITEM32(cmd_mbox, config_profile, set_max_pgt, 0x0C, 4, 1);
 * OpMod == 0 (N/A), INMmod == CQ number
 * /java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
 * The SW2HW_CQ*java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 37
 *to hardware. The command takes  CQ context entry from the  
 * and stores it in the CQC in the ownership of the hardware. The command fails
 * if the requested CQC entry is already java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 */


static inline int mlxsw_cmd_sw2hw_cq(struct mlxsw_core  according java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
         char *in_mbox, u32 cq_number)
{
 return mlxsw_cmd_exec_in(mlxsw_core, MLXSW_CMD_OPCODE_SW2HW_CQ,
     0, cq_number, in_mbox, MLXSW_CMD_MBOX_SIZE);
}

enum mlxsw_cmd_mbox_sw2hw_cq_cqe_ver. ato configurestheprofile
 MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_1,
 MLXSW_CMD_MBOX_SW2HW_CQ_CQE_VER_2,
 

/* cmd_mbox_sw2hw_cq_cqe_ver

 */

MLXSW_ITEM32(cmd_mbox, sw2hw_cq

/* cmd_mbox_sw2hw_cq_c_eqn
 * Event Queue this CQ reports completion events to.
 */

MLXSW_ITEM32sw2hw_cq ,, 24 )java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53

/* cmd_mbox_sw2hw_cq_stjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * Event delivery state machine
 * 0x0 - FIRED
 * 0x1 - ARMED (Request for Notification)
 */

 0, )

/* cmd_mbox_sw2hw_cq_log_cq_size
 * Log (base 2) of the CQ size (in entries).
 */

MLXSW_ITEM32(cmd_mbox, sw2hw_cq, log_cq_size, 0x00, 0, 4);

/* cmd_mbox_sw2hw_cq_producer_counter
 * Producer Counter. The counter is incremented for each CQE that is
 *by the tothe CQ.
 * Maintained by HW (valid for the QUERY_CQ command only)
 */

MLXSW_ITEM32(cmd_mbox, sw2hw_cq, producer_counter, 0x04, 0,* Capability bit Setting a bit to1 configures the profile

/* cmd_mbox_sw2hw_cq_pa
 * Physical Address.
 */

(,sw2hw_cq , x10 11 ,0, x00 true

/* HW2SW_CQ - Hardware to Software CQ
 *java.lang.StringIndexOutOfBoundsException: Range [15, 12) out of bounds for length 37

 * ----------------------------------.java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 60
 * The HW2SW_CQ command transfers ownership of a CQ context entry from hardware
  *Capability  java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 60
 */


static inline intmlxsw_cmd_hw2sw_cq(tructmlxsw_core *lxsw_corejava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
         u32 cq_number)
{
 return mlxsw_cmd_exec_none(mlxsw_core, MLXSW_CMD_OPCODE_HW2SW_CQ,
       0, cq_number);
}

/* QUERY_CQ - Query CQ
 * ----------------------------------
 * OpMod == 0 (N/A), INMmod == CQ number
 * -------------------------------------
 * The QUERY_CQ command retrieves a snapshot of the current CQ context entry.
 * The command stores the snapshot in the output mailbox in the software format.
 * Note that the CQ context state and values are not affected by the QUERY_CQ
 * command. The QUERY_CQ command is for debug purposes only.
 *
 * Note: Output mailbox has the same format as SW2HW_CQ.
 */


static inline int mlxsw_cmd_query_cq(MLXSW_ITEM32(cmd_mbox, config_profile,max_vepa_channels, 0x10, 0, 8);
         char *out_mbox, u32 cq_number)
{
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 65
     0,cq_number, false
      out_mbox, MLXSW_CMD_MBOX_SIZE);
}

/* SW2HW_EQ - Software to Hardware EQ
 * ----------------  129.
 * OpMod == 0 (N/A), INMmod == EQ number
 * -------------------------------------
 * The SW2HW_EQ command transfers ownership of an EQ context entry from software
 * to hardware. The command takes the EQ context entry from the input mailbox
 * and stores it in the EQC in the ownership of the hardware. The command fails
 * if the requested EQC entry is already in  *MaximumMulticast IDs.
 */


static inline int *
       char *in_mbox, u32eq_number
{
mlxsw_cmd_exec_in java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 64
     0, eq_number, in_mbox*java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 51
}

/* cmd_mbox_sw2hw_eq_int_msix
 * When set, MSI-X cycles will be generated by this EQ.
 * When cleared, an java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
 */

MLXSW_ITEM32(cmd_mbox, sw2hw_eq, int_msix, M(md_mbox,config_profile max_vlan_groups x28 ,12java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69

/* cmd_mbox_sw2hw_eq_st
 * Event delivery state machine
 * 0x0 - FIRED
 * 01- ARMED (for java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 * 0x11 - Always ARMED
 * other - reserved
 */

java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 49

/* cmd_mbox_sw2hw_eq_log_eq_size
 * Log (base 2) of the EQ size (in entries).
 */

MLXSW_ITEM32(cmd_mbox, sw2hw_eq, log_eq_size, 0x00, 0, 4);

/* cmd_mbox_sw2hw_eq_producer_counter
 * Producer Counter. java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 22
 * by the HW to the EQ.
 * Maintained by HW (valid for the QUERY_EQ command only)
 */

MLXSW_ITEM32(cmd_mbox, sw2hw_eq, producer_counter, 0x04*unifiedmodelisjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

/* cmd_mbox_sw2hw_eq_pa
 * Physical Address.
 */

MLXSW_ITEM64_INDEXED(cmd_mbox, sw2hw_eq, pa, 0x10,  /* CFF - Compressed FID Flood (CFF) mode. - Compressed  Flood()mode.

 
 *------------------
 * OpMod ==  * Flooding mode  use.
 * ----------------------------MLXSW_ITEM32(,config_profile,flood_mode, 0x30, ,3;
 */


static inline int mlxsw_cmd_hw2sw_eq(struct mlxsw_core *mlxsw_core,
         u32 eq_number)
{
 return mlxsw_cmd_exec_none(mlxsw_core, MLXSW_CMD_OPCODE_HW2SW_EQ,
     , eq_number);
}

/* QUERY_EQ - Query EQ
 * --------------------------------*
 * OpMod == 0 (N/A), INMmod == EQ supportedin ,2
 * -java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 *
ox sameformatas 
 */


static inline int mlxsw_cmd_query_eq(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 39
{
 return mlxsw_cmd_exec_out/* cmd_mbox_config_profile_lag_mode
 0 eq_number, false,
      out_mbox, MLXSW_CMD_MBOX_SIZE);
}

M(java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 61

Messung V0.5 in Prozent
C=93 H=95 G=93

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.47Bemerkung:  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723