Lines Matching +full:min +full:- +full:sample +full:- +full:time +full:- +full:nsecs

1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved */
29 #define MLXSW_REG_LEN(type) MLXSW_REG(type)->len
30 #define MLXSW_REG_ZERO(type, payload) memset(payload, 0, MLXSW_REG(type)->len)
32 /* SGCR - Switch General Configuration Register
33 * --------------------------------------------
55 /* SPAD - Switch Physical Address Register
56 * ---------------------------------------
72 /* SSPR - Switch System Port Record Register
73 * -----------------------------------------
82 * Master - if set, then the record describes the master system port.
104 * Currently, only single-ASIC configurations are supported, so we default to
118 /* SFDAT - Switch Filtering Database Aging Time
119 * --------------------------------------------
120 * Controls the Switch aging time. Aging time is able to be set per Switch
135 * Aging time in seconds
136 * Min - 10 seconds
137 * Max - 1,000,000 seconds
150 /* SFD - Switch Filtering Database
151 * -------------------------------
183 /* Add/modify. Aged-out records cannot be added. This command removes
189 * the learning notification and aged-out notifications
190 * of the {MAC, VID/FID}. The response provides current (pre-removal)
191 * entries as non-aged-out.
309 * Valid only if local port is a non-stacking port. Must be 0 if multichannel
318 * 0 - Do not update VID.
319 * 1 - Set VID.
320 * For Spectrum-2 when set_vid=0 and smpe_valid=1, the smpe will modify the vid.
330 * For SwitchX and SwitchX-2:
331 * - Dynamic entries (policy 2,3) use FID
332 * - Static entries (policy 0) use VID
333 * - When independent learning is configured, VID=FID
398 * 0 - Do not update VID.
399 * 1 - Set VID.
400 * For Spectrum-2 when set_vid=0 and smpe_valid=1, the smpe will modify the vid.
410 * For SwitchX and SwitchX-2:
411 * - Dynamic entries (policy 2,3) use FID
412 * - Static entries (policy 0) use VID
413 * - When independent learning is configured, VID=FID
431 * LAG Identifier - pointer into the LAG descriptor table.
457 * Multicast port group index - index into the port group table.
475 * Multicast identifier - global identifier that represents the multicast
580 /* SFN - Switch FDB Notification Register
581 * -------------------------------------------
607 * Request: Number of learned notifications and aged-out notification
636 /* Aged-out MAC address on a regular port. */
638 /* Aged-out MAC address on a LAG port. */
642 /* Aged-out unicast tunnel record. */
760 /* SPMS - Switch Port MSTP/RSTP State Register
761 * -------------------------------------------
784 * 0 - Do not change spanning tree state (used only when writing).
785 * 1 - Discarding. No learning or forwarding to/from this port (default).
786 * 2 - Learning. Port is learning, but not forwarding.
787 * 3 - Forwarding. Port is learning and forwarding.
804 /* SPVID - Switch Port VID
805 * -----------------------
815 * Reserved when SwitchX/-2 or Spectrum-1.
837 * Reserved when Spectrum-1.
845 * 0: ether_type0 - (default)
847 * 2: ether_type2 - Reserved when Spectrum-1, supported by Spectrum-2
869 /* SPVM - Switch Port VLAN Membership
870 * ----------------------------------
935 * Untagged - port is an untagged member - egress transmission uses untagged
955 int size = vid_end - vid_begin + 1; in mlxsw_reg_spvm_pack()
970 /* SPAFT - Switch Port Acceptable Frame Types
971 * ------------------------------------------
1023 /* SFGC - Switch Flooding Group Configuration
1024 * ------------------------------------------
1062 * Note: SwitchX-2 only supports 802.1Q mode.
1078 * Note: FID offset and FID types are not supported in SwitchX-2.
1123 /* SFDF - Switch Filtering DB Flush
1124 * --------------------------------
1152 * 0 - All SWID dynamic entries are flushed.
1153 * 1 - All FID dynamic entries are flushed.
1154 * 2 - All dynamic entries pointing to port are flushed.
1155 * 3 - All FID dynamic entries pointing to port are flushed.
1156 * 4 - All dynamic entries pointing to LAG are flushed.
1157 * 5 - All FID dynamic entries pointing to LAG are flushed.
1158 * 6 - All entries of type "Unicast Tunnel" or "Multicast Tunnel" are
1160 * 7 - All entries of type "Unicast Tunnel" or "Multicast Tunnel" are
1168 * 0 - Flush only dynamic entries.
1169 * 1 - Flush both dynamic and static entries.
1212 /* SLDR - Switch LAG Descriptor Register
1213 * -----------------------------------------
1216 * max_lag-1.
1224 /* Indicates a creation of a new LAG-ID, lag_id must be valid */
1262 * For Add / Remove operations - indicates the number of ports in the list.
1293 /* SLCR - Switch LAG Configuration 2 Register
1294 * -------------------------------------------
1340 /* SMAC - for IPv4 and IPv6 packets */
1342 /* SMAC - for non-IP packets */
1347 /* DMAC - for IPv4 and IPv6 packets */
1349 /* DMAC - for non-IP packets */
1354 /* Ethertype - for IPv4 and IPv6 packets */
1356 /* Ethertype - for non-IP packets */
1361 /* VLAN ID - for IPv4 and IPv6 packets */
1363 /* VLAN ID - for non-IP packets */
1380 /* SID - FCoE source ID */
1382 /* DID - FCoE destination ID */
1384 /* OXID - FCoE originator exchange ID */
1386 /* Destination QP number - for RoCE packets */
1413 /* SLCOR - Switch LAG Collector Register
1414 * -------------------------------------
1452 * Valid range is from 0 to cap_max_lag_members-1
1497 /* SPMLR - Switch Port MAC Learning Register
1498 * -----------------------------------------
1527 * 0 - Learning disabled.
1528 * 2 - Learning enabled.
1529 * 3 - Security mode.
1547 /* SVFA - Switch VID to FID Allocation Register
1548 * --------------------------------------------
1579 * 0 - VID to FID
1580 * 1 - {Port, VID} to FID
1583 * Note: Reserved for SwitchX-2.
1592 * Note: Reserved for SwitchX-2.
1612 * Note: Reserved for SwitchX-2.
1620 * Note: Reserved for SwitchX-2.
1634 * 0 - Ingress RIF is not valid, no ingress RIF assigned.
1635 * 1 - Ingress RIF valid.
1645 * Range is 0..cap_max_router_interfaces-1.
1694 /* SPVTR - Switch Port VLAN Stacking Register
1695 * ------------------------------------------
1708 * Note: Reserved when SwitchX/-2 or Spectrum-1.
1747 * Note: for SwitchX/-2 the DEI is not affected.
1749 * 1: use C-VLAN PCP and DEI.
1766 * Ingress Port VLAN-ID Mode.
1780 * Egress Port VLAN-ID Mode.
1797 /* SVPE - Switch Virtual-Port Enabling Register
1798 * --------------------------------------------
1816 * 0 - Disable, VLAN mode (VID to FID).
1817 * 1 - Enable, Virtual port mode ({Port, VID} to FID).
1830 /* SFMR - Switch FID Management Register
1831 * -------------------------------------
1846 * 0 - Create or edit FID.
1847 * 1 - Destroy FID.
1859 * Router sub-port flooding table.
1860 * 0 - Regular flooding table.
1861 * 1 - Router sub-port flooding table. For this FID the flooding is per
1862 * router-sub-port local_port. Must not be set for a FID which is not a
1863 * router-sub-port and must be set prior to enabling the relevant RIF.
1873 * 0 - type_0.
1874 * 1 - type_1.
1885 * the table is of type FID-Offset. Otherwise, this field is reserved.
1921 * FID. When unified bridge model is used, it configures only the FID->VNI,
1922 * the VNI->FID is done by SVFA.
1929 * 0 - Ingress RIF is not valid, no ingress RIF assigned.
1930 * 1 - Ingress RIF valid.
1940 * Range is 0..cap_max_router_interfaces-1.
1949 * Range: 0..(cap_max_pgt-1)
1952 * Note: Reserved when SwitchX/-2 and Spectrum-1.
1959 * Range 0..(max_cap_nve_flood_prf-1)
1962 * Note: Reserved when SwitchX/-2 and Spectrum-1
1968 * Range 0..(max_cap_nve_flood_prf-1)
1971 * Note: Reserved when SwitchX/-2 and Spectrum-1
1981 * Spectrum-1.
1987 * Range is 0..cap_max_rmpe-1
1991 * Spectrum-1.
2006 /* SPVMLR - Switch Port VLAN MAC Learning Register
2007 * -----------------------------------------------
2035 * 0 - Disable learning for {Port, VID}.
2036 * 1 - Enable learning for {Port, VID}.
2053 int num_rec = vid_end - vid_begin + 1; in mlxsw_reg_spvmlr_pack()
2068 /* SPFSR - Switch Port FDB Security Register
2069 * -----------------------------------------
2101 /* SPVC - Switch Port VLAN Classification Register
2102 * -----------------------------------------------
2199 /* SFFP - Switch FID Flooding Profiles Register
2200 * --------------------------------------------
2202 * flooding and Compressed-FID Flooding (CFF).
2204 * Reserved on Spectrum-1.
2213 * Range 0..max_cap_nve_flood_prf-1
2243 /* SPEVET - Switch Port Egress VLAN EtherType
2244 * ------------------------------------------
2263 * 0: ether_type0 - (default)
2278 /* SMPE - Switch Multicast Port to Egress VID
2279 * ------------------------------------------
2281 * {egress_port, SMPE index} -> {VID}.
2297 * Range is 0..cap_max_rmpe-1.
2317 /* SMID-V2 - Switch Multicast ID Version 2 Register
2318 * ------------------------------------------------
2335 * Multicast identifier - global identifier that represents the multicast group
2346 * Note: Reserved when legacy bridge model is used and on Spectrum-2.
2354 * Note: Reserved when legacy bridge model is used and on Spectrum-2.
2382 /* CWTP - Congetion WRED ECN TClass Profile
2383 * ----------------------------------------
2449 #define MLXSW_REG_CWTP_PROFILE_TO_INDEX(profile) (profile - 1)
2452 mlxsw_reg_cwtp_profile_pack(char *payload, u8 profile, u32 min, u32 max, in mlxsw_reg_cwtp_profile_pack() argument
2457 mlxsw_reg_cwtp_profile_min_set(payload, index, min); in mlxsw_reg_cwtp_profile_pack()
2462 /* CWTPM - Congestion WRED ECN TClass and Pool Mapping
2463 * ---------------------------------------------------
2486 * 0 - Disable
2487 * 1 - Enable
2494 * 0 - Disable
2495 * 1 - Enable
2525 * Non-TCP Green Profile.
2533 * Non-TCP Yellow Profile.
2541 * Non-TCP Red Profile.
2567 /* PGCR - Policy-Engine General Configuration Register
2568 * ---------------------------------------------------
2569 * This register configures general Policy-Engine settings.
2589 /* PPBT - Policy-Engine Port Binding Table
2590 * ---------------------------------------
2625 * group - When set, the binding is of an ACL group. When cleared,
2651 /* PACL - Policy-Engine ACL Register
2652 * ---------------------------------
2669 * Range 0 .. cap_max_acl_regions - 1
2693 /* PAGT - Policy-Engine ACL Group Table
2694 * ------------------------------------
2718 * An identifier (numbered from 0..cap_max_acl_groups-1) representing
2725 * Multi-ACL
2726 * 0 - This ACL is the last ACL in the multi-ACL
2727 * 1 - This ACL is part of a multi-ACL
2755 /* PTAR - Policy-Engine TCAM Allocation Register
2756 * ---------------------------------------------
2787 * For Spectrum and Spectrum-2, this is always type 2 - "flexible"
2794 MLXSW_REG_PTAR_KEY_TYPE_FLEX2 = 0x51, /* Spectrum-2 */
2807 * Allowed range 1 .. cap_max_rules-1
2815 * Range 0 .. cap_max_regions-1
2865 /* PPRR - Policy-Engine Port Range Register
2866 * ----------------------------------------
2912 * Range is 0..cap_max_acl_l4_port_range-1.
2937 /* PPBS - Policy-Engine Policy Based Switching Register
2938 * ----------------------------------------------------
2967 /* PRCR - Policy-Engine Rules Copy Register
2968 * ----------------------------------------
3043 /* PEFA - Policy-Engine Extended Flexible Action Register
3044 * ------------------------------------------------------
3079 * Action-set to perform when rule is matched.
3101 /* PEMRBT - Policy-Engine Multicast Router Binding Table Register
3102 * --------------------------------------------------------------
3105 * This register is not supported by SwitchX/-2 and Spectrum.
3124 * Range 0..cap_max_acl_groups-1
3138 /* PTCE-V2 - Policy-Engine TCAM Entry Register Version 2
3139 * -----------------------------------------------------
3143 * by SwitchX and SwitchX-2.
3172 * for new entries - Note write with v = 0 will delete the entry.
3192 * Priority of the rule, higher values win. The range is 1..cap_kvd_size-1.
3195 * between regions in a multi-region).
3217 * mask- in the same size as key. A bit that is set directs the TCAM
3245 /* PERPT - Policy-Engine ERP Table Register
3246 * ----------------------------------------
3256 * Range 0 .. cap_max_erp_table_banks - 1
3263 * Range is 0 .. cap_max_erp_table_bank_size - 1
3281 * 0 - The eRP is used only if bloom filter state is set for the given
3283 * 1 - The eRP is used regardless of bloom filter state.
3297 * Range is 0 .. cap_max_erp_table_banks - 1
3304 * Range is 0 .. cap_max_erp_table_bank_size - 1
3323 * 0 - A-TCAM will ignore the bit in key
3324 * 1 - A-TCAM will compare the bit in key
3357 /* PERAR - Policy-Engine Region Association Register
3358 * -------------------------------------------------
3369 * Range 0 .. cap_max_regions-1
3382 * Range 0 .. cap_max_regions-1
3398 /* PTCE-V3 - Policy-Engine TCAM Entry Register Version 3
3399 * -----------------------------------------------------
3400 * This register is a new version of PTCE-V2 in order to support the
3401 * A-TCAM. This register is not supported by SwitchX/-2 and Spectrum.
3434 * For Spectrum-2 range is 1..cap_kvd_size - 1
3463 * num_key_blocks * 36 - 8. Reserved when delta_mask = 0.
3470 * 0 - Ignore relevant bit in delta_value
3471 * 1 - Compare relevant bit in delta_value
3489 * 0 - NEED: Do a lookup using the eRP.
3490 * 1 - PRUNE: Do not perform a lookup using the eRP.
3492 * Note: In Spectrum-2, a region of 8 key blocks must be set to either
3499 * Pruning on C-TCAM. Used for reducing lookups.
3500 * 0 - NEED: Do a lookup in the C-TCAM.
3501 * 1 - PRUNE: Do not perform a lookup in the C-TCAM.
3509 * 0 - SINGLE: The large_entry_key_id is not currently in use.
3512 * 1 - NON_SINGLE: The large_entry_key_id is currently in use.
3524 * Range is 0..cap_max_pe_large_key_id - 1
3531 * Range is 0..cap_max_kvd_action_sets - 1
3560 /* PERCR - Policy-Engine Region Configuration Register
3561 * ---------------------------------------------------
3572 * Range 0..cap_max_regions-1
3578 * Ignore prune_vector by other A-TCAM rules. Used e.g., for a new rule.
3584 * Ignore prune_ctcam by other A-TCAM rules. Used e.g., for a new rule.
3591 * 0 - Bloom filter is used (default)
3592 * 1 - Bloom filter is bypassed. The bypass is an OR condition of
3600 * (both A-TCAM and C-TCAM). When there are no eRPs
3615 /* PERERP - Policy-Engine Region eRP Register
3616 * ------------------------------------------
3627 * Range 0..cap_max_regions-1
3633 * C-TCAM lookup enable. Reserved when erpt_pointer_valid = 0.
3645 * Pointer to eRP table bank. May be modified at any time.
3646 * Range 0..cap_max_erp_table_banks-1
3654 * Range 0..cap_max_erp_table_size-1
3701 /* PEABFE - Policy-Engine Algorithmic Bloom Filter Entries Register
3702 * ----------------------------------------------------------------
3724 * 0 - Clear
3725 * 1 - Set
3734 * Range 0..cap_max_erp_table_banks-1
3743 * Range 0..2^cap_max_bf_log-1
3767 /* IEDR - Infrastructure Entry Delete Register
3768 * ----------------------------------------------------
3828 /* QPTS - QoS Priority Trust State Register
3829 * ----------------------------------------
3866 /* QPCR - QoS Policer Configuration Register
3867 * -----------------------------------------
3868 * The QPCR register is used to create policers - that limit
3908 * 0 - packets
3909 * 1 - bytes
3921 * 1 - 10^3
3922 * 0 - 10^6
3942 * The policer is working with time slices of 50 nano sec. By default every
4032 /* QTCT - QoS Switch Traffic Class Table
4033 * -------------------------------------
4082 /* QEEC - QoS ETS Element Configuration Register
4083 * ---------------------------------------------
4107 * 0 - Port
4108 * 1 - Group
4109 * 2 - Subgroup
4110 * 3 - Traffic Class
4130 * Min shaper configuration enable. Enables configuration of the min
4132 * 0 - Disable
4133 * 1 - Enable
4145 * Supported only on Spectrum-1
4157 * 0 - Bytes mode
4158 * 1 - Packets mode
4166 /* The smallest permitted min shaper rate. */
4170 * Min shaper information rate.
4180 * 0 - Disable
4181 * 1 - Enable
4187 #define MLXSW_REG_QEEC_MAS_DIS ((1u << 31) - 1) /* Kbps */
4200 * 0 - Disable
4201 * 1 - Enable
4209 * 0 - Strict priority
4210 * 1 - DWRR
4228 * For Spectrum-1: Range is: 5..25
4229 * For Spectrum-2: Range is: 11..25
4261 /* QRWE - QoS ReWrite Enable
4262 * -------------------------
4299 /* QPDSM - QoS Priority to DSCP Mapping
4300 * ------------------------------------
4387 /* QPDP - QoS Port DSCP to Priority Mapping Register
4388 * -------------------------------------------------
4419 /* QPDPM - QoS Port DSCP to Priority Mapping Register
4420 * --------------------------------------------------
4470 /* QTCTM - QoS Switch Traffic Class Table is Multicast-Aware Register
4471 * ------------------------------------------------------------------
4506 /* QPSC - QoS PTP Shaper Configuration Register
4507 * --------------------------------------------
4509 * Supported only on Spectrum-1.
4530 * The base-time-interval for updating the shapers tokens (for all hierarchies).
4538 * The base-time-interval for updating the shapers tokens (for all hierarchies).
4568 * For non-split ports: range 1..112
4612 /* PMLP - Ports Module to Local Port Register
4613 * ------------------------------------------
4622 * 0 - Tx value is used for both Tx and Rx.
4623 * 1 - Rx value is taken from a separte field.
4635 * 0 - Unmap local port.
4636 * 1 - Lane 0 is used.
4637 * 2 - Lanes 0 and 1 are used.
4638 * 4 - Lanes 0, 1, 2 and 3 are used.
4639 * 8 - Lanes 0-7 are used.
4654 * In case of non-modular system only slot_index = 0 is available.
4678 /* PMTU - Port MTU Register
4679 * ------------------------
4729 /* PTYS - Port Type and Speed Register
4730 * -----------------------------------
4743 * 0 - Device doesn't support AN disable.
4744 * 1 - Device supports AN disable.
4760 * 0 - Infiniband.
4761 * 1 - Fibre Channel.
4762 * 2 - Ethernet.
4925 /* PPAD - Port Physical Address Register
4926 * -------------------------------------
4937 * 1: single_mac - mac of the local_port
4949 * If single_base_mac = 0 - base MAC address, mac[7:0] is reserved.
4950 * If single_base_mac = 1 - the per port MAC address
4963 /* PAOS - Ports Administrative and Operational Status Register
4964 * -----------------------------------------------------------
4989 * 1 - Up.
4990 * 2 - Down.
4991 * 3 - Up once. This means that in case of link failure, the port won't go
4992 * into polling mode, but will wait to be re-enabled by software.
4993 * 4 - Disabled by system. Can only be set by hardware.
5000 * 1 - Up.
5001 * 2 - Down.
5002 * 3 - Down by port failure. This means that the device will not let the
5023 * 0 - Do not generate event.
5024 * 1 - Generate Event.
5025 * 2 - Generate Single Event.
5043 /* PFCC - Ports Flow Control Configuration Register
5044 * ------------------------------------------------
5060 * 0 - Local port number.
5061 * 1 - IB / label port number.
5068 * 0 - No capability of sending Pause and PFC frames to higher layers.
5069 * 1 - Device has capability of sending Pause and PFC frames to higher
5077 * 0 - Pause and PFC frames are handled by the port (default).
5078 * 1 - Pause and PFC frames are handled by the port and also sent to
5086 * 0 - Disabled. Generate / ignore Pause frames based on pptx / pprtx.
5087 * 1 - Enabled. When auto-negotiation is performed, set the Pause policy
5088 * based on the auto-negotiation resolution.
5091 * Note: The auto-negotiation advertisement is set according to pptx and
5112 * 0 - Never generate Pause frames (default).
5113 * 1 - Generate Pause frames according to Rx buffer threshold.
5120 * 0 - Never generate Pause frames.
5121 * 1 - Generate Pause frames according to Rx buffer threshold.
5127 * Priority based flow control policy on Tx[7:0]. Per-priority bit mask:
5128 * 0 - Never generate priority Pause frames on the specified priority
5130 * 1 - Generate priority Pause frames according to Rx buffer threshold on
5140 * 0 - Ignore received Pause frames (default).
5141 * 1 - Respect received Pause frames.
5148 * 0 - Ignore received Pause frames.
5149 * 1 - Respect received Pause frames.
5155 * Priority based flow control policy on Rx[7:0]. Per-priority bit mask:
5156 * 0 - Ignore incoming priority Pause frames on the specified priority
5158 * 1 - Respect incoming priority Pause frames on the specified priority.
5179 /* PPCNT - Ports Performance Counters Register
5180 * -------------------------------------------
5208 * 0 - Local port number
5209 * 1 - IB port number
5262 * Priority for counter set that support per priority, valid values: 0-7.
5264 * valid values: 0- cap_max_tclass-1 .
5698 /* PPTB - Port Prio To Buffer Register
5699 * -----------------------------------
5715 * 0 - Map both unicast and multicast packets to the same buffer.
5716 * 1 - Map only unicast packets.
5717 * 2 - Map only multicast packets.
5720 * Note: SwitchX-2 only supports the first option.
5761 * Note: In SwitchX-2 this field must be mapped to buffer 8. Reserved for
5791 /* PBMC - Port Buffer Management Control Register
5792 * ----------------------------------------------
5809 * timer (time for the peer port to pause in quota-512 bit time).
5815 * The time before a new pause frame should be sent to refresh the pause RW
5816 * state. Using the same units as xoff_timer_value above (in quota-512 bit
5817 * time).
5826 * 0 - Lossless
5827 * 1 - Lossy
5901 /* PSPA - Port Switch Partition Allocation
5902 * ---------------------------------------
5938 /* PMAOS - Ports Module Administrative and Operational Status
5939 * ----------------------------------------------------------
5949 * Note: Setting reset while module is plugged-in will result in transition to
6020 /* PPLR - Port Physical Loopback Register
6021 * --------------------------------------
6056 /* PMTDB - Port Module To local DataBase Register
6057 * ----------------------------------------------
6058 * The PMTDB register allows to query the possible module<->local port
6119 /* PMECR - Ports Mapping Event Configuration Register
6120 * --------------------------------------------------
6182 /* PMPE - Port Module Plug/Unplug Event Register
6183 * ---------------------------------------------
6226 /* PDDR - Port Diagnostics Database Register
6227 * -----------------------------------------
6276 /* PMMP - Port Module Memory Map Properties Register
6277 * -------------------------------------------------
6299 * When set, will keep eeprom_override values after plug-out event.
6306 * 0 - Allow write
6307 * 1 - Ignore write
6332 /* PLLP - Port Local port to Label Port mapping Register
6333 * -----------------------------------------------------
6379 /* PMTM - Port Module Type Mapping Register
6380 * ----------------------------------------
6431 /* HTGT - Host Trap Group Table
6432 * ----------------------------
6490 MLXSW_REG_HTGT_TRAP_GROUP_MAX = __MLXSW_REG_HTGT_TRAP_GROUP_MAX - 1
6524 * 0 - Trap to CPU.
6525 * 1 - Trap to CPU and mirror to a mirroring agent.
6526 * 2 - Mirror to a mirroring agent and do not trap to CPU.
6546 * Supported values are 0-7, with 7 represnting the highest priority.
6549 * Note: In SwitchX-2 this field is ignored and the priority value is replaced
6597 /* HPKT - Host Packet Trap
6598 * -----------------------
6634 * 0 - No action. Forward to CPU based on switching rules.
6635 * 1 - Trap to CPU (CPU receives sole copy).
6636 * 2 - Mirror to CPU (CPU receives a replica of the packet).
6637 * 3 - Discard.
6638 * 4 - Soft discard (allow other traps to act on the packet).
6639 * 5 - Trap and soft discard (allow other traps to overwrite this trap).
6640 * 6 - Trap to CPU (CPU receives sole copy) and count it as error.
6641 * 15 - Restore the firmware's default action.
6672 * Ignored by SwitchX-2.
6673 * 0 - Keep factory defaults.
6674 * 1 - Do not use control buffer for this trap ID.
6675 * 2 - Use control buffer for this trap ID.
6694 /* RGCR - Router General Configuration Register
6695 * --------------------------------------------
6724 * 0 - Preserve the value of Switch Priority and packet color.
6725 * 1 - Recalculate the value of Switch Priority and packet color.
6728 * Note: Not supported by SwitchX and SwitchX-2.
6734 * 0 - Preserve the value of pcp_rewrite_en.
6735 * 2 - Disable PCP rewrite.
6736 * 3 - Enable PCP rewrite.
6739 * Note: Not supported by SwitchX and SwitchX-2.
6745 * 0 - Activity will be set when an entry is hit (default).
6746 * 1 - Activity will not be set when an entry is hit.
6748 * Bit 0 - Disable activity bit in Router Algorithmic LPM Unicast Entry
6750 * Bit 1 - Disable activity bit in Router Algorithmic LPM Unicast Host
6755 * Note: Not supported by SwitchX, SwitchX-2 and Switch-IB.
6767 /* RITR - Router Interface Table Register
6768 * --------------------------------------
6813 /* Sub-port interface. */
6832 * 0 - Create or edit RIF.
6833 * 1 - Delete RIF.
6834 * Reserved for SwitchX-2. For Spectrum, editing of interface properties
6835 * is not supported. An interface must be deleted and re-created in order
6851 * Not supported in SwitchX-2.
6860 * Not supported in SwitchX-2.
6882 * Loop-back filter enable for unicast packets.
6883 * If the flag is set then loop-back filter for unicast packets is
6885 * loop-back filtering.
6923 * Note: Reserved for RIF types other than VLAN, FID and Sub-port.
6930 * Note: Reserved for RIF types other than VLAN, FID and Sub-port.
6948 * Note: Reserved when legacy bridge model is used and on Spectrum-1.
6963 /* Sub-port Interface */
6981 * Used to connect the eRIF to a bridge if eRIF-ACL has modified the DMAC or
7002 /* IPinIP generic - used for Spectrum-2 underlay RIF */
7038 * Range is 0..cap_max_virtual_routers-1.
7039 * Reserved for Spectrum-2.
7070 * - Error and Discard counters.
7071 * - Unicast, Multicast and Broadcast counters. Sharing the
7222 /* RTAR - Router TCAM Allocation Register
7223 * --------------------------------------
7273 /* RATR - Router Adjacency Table Register
7274 * --------------------------------------
7275 * The RATR register is used to configure the Router Adjacency (next-hop)
7309 * Note: the device may need some time before reusing an invalidated
7310 * entry. During this time the entry can not be reused. It is
7345 * Reserved for SwitchX/-2.
7349 * Reserved for SwitchX/-2.
7362 * For SwitchX and SwitchX-2, the adjacency table is linear and
7370 * Range is 0 .. cap_max_router_interfaces - 1
7402 * Trap-ID is RTR_EGRESS0 or RTR_EGRESS1.
7409 * MAC address of the destination next-hop.
7510 /* RDPM - Router DSCP to Priority Mapping
7511 * --------------------------------------
7520 MLXSW_REG_RDPM_LEN - \
7530 -MLXSW_REG_RDPM_DSCP_ENTRY_REC_LEN, 0x00, false);
7537 -MLXSW_REG_RDPM_DSCP_ENTRY_REC_LEN, 0x00, false);
7546 /* RICNT - Router Interface Counter Register
7547 * -----------------------------------------
7565 * - Error and Discard counters.
7566 * - Unicast, Multicast and Broadcast counters. Sharing the
7640 * A count of non-errored frames that do not pass the router checks.
7654 * for non-errored frames that do not pass the router checks.
7669 /* RRCR - Router Rules Copy Register Layout
7670 * ----------------------------------------
7728 /* RALTA - Router Algorithmic LPM Tree Allocation Register
7729 * -------------------------------------------------------
7739 * 0 - allocate a tree
7740 * 1 - deallocate a tree
7758 * An identifier (numbered from 1..cap_shspm_max_trees-1) representing
7760 * Note that tree_id 0 is allocated for a default-route tree.
7775 /* RALST - Router Algorithmic LPM Structure Tree Register
7776 * ------------------------------------------------------
7792 * For a default-route tree configure 0xff
7798 * Tree identifier numbered from 1..(cap_shspm_max_trees-1).
7810 * Note that tree_id 0 is allocated for a default-route tree, bins are 0xff
7818 * Note that tree_id 0 is allocated for a default-route tree, bins are 0xff
7840 int bin_index = bin_number - 1; in mlxsw_reg_ralst_bin_pack()
7847 /* RALTB - Router Algorithmic LPM Tree Binding Register
7848 * ----------------------------------------------------
7858 * Range is 0..cap_max_virtual_routers-1
7871 * Tree identifier numbered from 1..(cap_shspm_max_trees-1).
7887 /* RALUE - Router Algorithmic LPM Unicast Entry Register
7888 * -----------------------------------------------------
7947 * Range is 0..cap_max_virtual_routers-1
7959 * This field is valid for update opcode, otherwise - reserved.
7992 * Note - for Marker entries, the action_type and action fields are reserved.
8017 * on a remote subnet connected through a next-hop router,
8048 * Points to the first entry of the group-based ECMP.
8057 * The valid range is 1-64, 512, 1024, 2048 and 4096.
8167 /* RAUHT - Router Algorithmic LPM Unicast Host Table Register
8168 * ----------------------------------------------------------
8260 * Trap-ID is RTR_EGRESS0 or RTR_EGRESS1.
8320 /* RALEU - Router Algorithmic LPM ECMP Update Register
8321 * ---------------------------------------------------
8339 * Range is 0..cap_max_virtual_routers-1
8384 /* RAUHTD - Router Algorithmic LPM Unicast Host Table Dump Register
8385 * ----------------------------------------------------------------
8387 * Table. For a given session an entry is dumped no more than one time. The
8409 * Bit0 - filter by activity: entry_a
8410 * Bit3 - filter by entry rip: entry_rif
8449 * 0 - IPv4
8450 * 1 - IPv6
8475 * 0 - 1 valid entry
8476 * 1 - 2 valid entries
8477 * 2 - 3 valid entries
8478 * 3 - 4 valid entries
8487 * 0 - IPv4
8488 * 1 - IPv6
8558 /* RTDP - Routing Tunnel Decap Properties Register
8559 * -----------------------------------------------
8588 * Valid range is from 0 to cap_max_router_interfaces - 1
8637 * - A packet received as IPinIP (without GRE) will always pass.
8638 * - A packet received as IPinGREinIP without a key will not pass the check.
8639 * - A packet received as IPinGREinIP with a key will pass the check only if the
8713 /* RIPS - Router IP version Six Register
8714 * -------------------------------------
8744 /* RATRAD - Router Adjacency Table Activity Dump Register
8745 * ------------------------------------------------------
8769 * Spectrum-1: 32-64, 512, 1024, 2048, 4096
8770 * Spectrum-2/3: 32-128, 256, 512, 1024, 2048, 4096
8798 /* RIGR-V2 - Router Interface Group Register Version 2
8799 * ---------------------------------------------------
8837 * Range 0 .. max_mid - 1
8846 * Note that low-entries must be set if high-entries are set. For
8849 * Index can be from 0 to cap_mc_erif_list_entries-1
8856 * Valid range is from 0 to cap_max_router_interfaces - 1
8857 * Index can be from 0 to MLXSW_REG_RIGR2_MAX_ERIFS - 1
8880 /* RECR-V2 - Router ECMP Configuration Version 2 Register
8881 * ------------------------------------------------------
8889 * Per-port configuration
9015 /* RMFT-V2 - Router Multicast Forwarding Table Version 2 Register
9016 * --------------------------------------------------------------
9044 * entries - Note write with v (Valid) 0 will delete the entry.
9071 * Virtual Router ID. Range from 0..cap_max_virtual_routers-1
9125 * action-set pointed from here are as follows:
9186 /* REIV - Router Egress Interface to VID Register
9187 * ----------------------------------------------
9188 * The REIV register maps {eRIF, egress_port} -> VID.
9191 * (for unicast/multicast/port-base multicast), regardless of eRIF type and
9208 * Port page - elport_record[0] is 256*port_page.
9215 * Range is 0..cap_max_router_interfaces-1.
9222 * 0 - Do not update the entry.
9223 * 1 - Update the entry.
9244 /* MFCR - Management Fan Control Register
9245 * --------------------------------------
9304 /* MFSC - Management Fan Speed Control Register
9305 * --------------------------------------------
9334 /* MFSM - Management Fan Speed Measurement
9335 * ---------------------------------------
9362 /* MFSL - Management Fan Speed Limit Register
9363 * ------------------------------------------
9366 * defined for both under-speed and over-speed.
9410 /* FORE - Fan Out of Range Event Register
9411 * --------------------------------------
9439 /* MTCAP - Management Temperature Capabilities
9440 * -------------------------------------------
9456 /* MTMP - Management Temperature
9457 * -----------------------------
9477 * 64-127 of sensor_index are mapped to the SFP+/QSFP modules sequentially
9505 * Max Temperature Enable - enables measuring the max temperature on a sensor.
9511 * Max Temperature Reset - clears the value of the max temperature register.
9525 * 0 - Do not generate event
9526 * 1 - Generate event
9527 * 2 - Generate single event
9602 /* MTWE - Management Temperature Warning Event
9603 * -------------------------------------------
9619 /* MTBR - Management Temperature Bulk Register
9620 * -------------------------------------------
9640 * Base sensors index to access (0 - ASIC sensor, 1-63 - ambient sensors,
9641 * 64-127 are mapped to the SFP+/QSFP modules sequentially).
9700 /* MCIA - Management Cable Info Access
9701 * -----------------------------------
9812 /* This is used to access the optional upper pages (1-3) in the QSFP+
9813 * memory map. Page 1 is available on offset 256 through 383, page 2 -
9814 * on offset 384 through 511, page 3 - on offset 512 through 639.
9816 #define MLXSW_REG_MCIA_PAGE_GET(off) (((off) - \
9833 /* MPAT - Monitoring Port Analyzer Table
9834 * -------------------------------------
9870 * 0: CONFIGURED - QoS parameters (Switch Priority, and encapsulation
9872 * 1: MAINTAIN - QoS parameters (Switch Priority, Color) are the
9925 /* Remote SPAN - Ethernet VLAN
9926 * - - - - - - - - - - - - - -
9935 /* Encapsulated Remote SPAN - Ethernet L2
9936 * - - - - - - - - - - - - - - - - - - -
9961 /* Encapsulated Remote SPAN - Ethernet L3
9962 * - - - - - - - - - - - - - - - - - - -
9977 * Encapsulation header Time-to-Live/HopLimit.
10057 /* MPAR - Monitoring Port Analyzer Register
10058 * ----------------------------------------
10102 * Value of 1 means "sample all". Default is 1.
10103 * Reserved when Spectrum-1.
10121 /* MGIR - Management General Information Register
10122 * ----------------------------------------------
10137 * When set, latency-TLV is supported.
10143 * When set, string-TLV is supported.
10187 /* MRSR - Management Reset and Shutdown Register
10188 * ---------------------------------------------
10208 * 0 - do nothing
10209 * 1 - software reset
10221 /* MLCR - Management LED Control Register
10222 * --------------------------------------
10240 * 0x0 - Will turn off the beacon.
10241 * 0xFFFF - Will turn on the beacon until explicitly turned off.
10248 * 0xFFFF indicates an infinite amount of time.
10262 /* MCION - Management Cable IO and Notifications Register
10263 * ------------------------------------------------------
10302 /* MTPPS - Management Pulse Per Second Register
10303 * --------------------------------------------
10305 * out modules and holds the PPS in time stamp.
10339 * When pin_mode = pps_in, the latched device time when it was triggered from
10342 * time to generate next output signal.
10343 * Time is in units of device clock.
10359 /* MTUTC - Management UTC Register
10360 * -------------------------------
10384 * 10^9 HW clocks for 1 HW second. Range is from -50,000,000 to +50,000,000.
10385 * In Spectrum-2, the field is reversed, positive values mean to decrease the
10400 * UTC nSecs.
10401 * Range 0..(10^9-1)
10403 * Reserved on Spectrum-1.
10409 * Time adjustment.
10411 * Range is from -32768 to +32767.
10413 * Reserved on Spectrum-1.
10430 /* MCQI - Management Component Query Information
10431 * ---------------------------------------------
10513 /* MCC - Management Component Control
10514 * ----------------------------------
10566 * the size may shorten the update time. Value 0x0 means that size is
10595 /* MCDA - Management Component Data Access
10596 * ---------------------------------------
10646 /* MCAM - Management Capabilities Mask Register
10647 * --------------------------------------------
10688 * #0-#31 and so on, so the access to the bits is simpler using bit array per
10721 /* MPSC - Monitoring Packet Sampling Configuration Register
10722 * --------------------------------------------------------
10761 /* MGPC - Monitoring General Purpose Counter Set Register
10816 /* MPRS - Monitoring Parsing State Register
10817 * ----------------------------------------
10819 * policy-engine and routing.
10829 * rules, traps, hash, etc. Default is 96 bytes. Reserved when SwitchX-2.
10836 * Bit 0 - Enable parsing of NVE of types VxLAN, VxLAN-GPE, GENEVE and
10837 * NVGRE. Default is enabled. Reserved when SwitchX-2.
10859 /* MOGCR - Monitoring Global Configuration Register
10860 * ------------------------------------------------
10871 * Reserved when IB switches and when SwitchX/-2, Spectrum-2
10880 * Reserved when IB switches and when SwitchX/-2, Spectrum-2
10888 * Reserved when SwitchX/-2, Switch-IB/2, Spectrum-1 and Quantum.
10893 /* MPAGR - Monitoring Port Analyzer Global Register
10894 * ------------------------------------------------
10896 * Note: This register is not supported by current FW versions for Spectrum-1.
10931 * Value of 1 means "sample all". Default is 1.
10946 /* MOMTE - Monitoring Mirror Trigger Enable Register
10947 * -------------------------------------------------
10995 /* MTPPPC - Time Precision Packet Port Configuration
10996 * -------------------------------------------------
11000 * Reserved when Spectrum-2.
11032 /* MTPPTR - Time Precision Packet Timestamping Reading
11033 * ---------------------------------------------------
11039 * Reserved when Spectrum-2.
11108 * clock time.
11109 * For Spectrum-1 the PLL clock is 156.25Mhz and PLL clock time is 6.4nSec.
11141 /* MTPTPT - Monitoring Precision Time Protocol Trap Register
11142 * ---------------------------------------------------------
11164 * non-sufficient condition since need to enable also per port. See MTPPPC.
11179 /* MTPCPC - Monitoring Time Precision Correction Port Configuration Register
11180 * -------------------------------------------------------------------------
11189 * 0: config is global. When reading - the local_port is 1.
11211 * Bitwise vector of PTP message types to update correction-field at ingress.
11220 * Bitwise vector of PTP message types to update correction-field at egress.
11240 /* MFGD - Monitoring FW General Debug Register
11241 * -------------------------------------------
11249 * 0 - don't check FW fatal (default)
11250 * 1 - check FW fatal - enable MFDE trap
11260 /* MGPIR - Management General Peripheral Information Register
11261 * ----------------------------------------------------------
11341 /* MBCT - Management Binary Code Transfer Register
11342 * -----------------------------------------------
11396 /* Error - trying to erase INI while it being used. */
11462 /* MDDT - Management DownStream Device Tunneling Register
11463 * ------------------------------------------------------
11485 * Read size in D-Words.
11491 * Write size in D-Words.
11536 int len = reg->len + MLXSW_REG_MDDT_PRM_REGISTER_HEADER_LEN; in mlxsw_reg_mddt_pack()
11539 len = MLXSW_REG_MDDT_LEN - MLXSW_REG_MDDT_PAYLOAD_OFFSET; in mlxsw_reg_mddt_pack()
11545 mlxsw_reg_mddt_register_id_set(payload, reg->id); in mlxsw_reg_mddt_pack()
11551 /* MDDQ - Management DownStream Device Query Register
11552 * --------------------------------------------------
11620 * can be sent from the switch ASIC to the line-card CPLD over Shift-Register.
11645 * Major user-configured version number of the current INI file.
11652 * User-configured version number of the current INI file.
11724 * Sub-minor FW version number.
11775 /* MDDC - Management DownStream Device Control Register
11776 * ----------------------------------------------------
11811 /* MFDE - Monitoring FW Debug Register
11812 * -----------------------------------
11886 * EMAD - register id, MAD - attibute id
11898 * 0 - New event
11899 * 1 - Old event, occurred before MFGD activation.
11917 * 0 - New event
11918 * 1 - Old event, occurred before MFGD activation.
11929 /* reg_mfde_fw_assert_var0-4
11952 * 0 - New event
11953 * 1 - Old event, occurred before MFGD activation.
11972 * A generated one-to-one identifier which is specific per-assert.
11996 /* TNGCR - Tunneling NVE General Configuration Register
11997 * ----------------------------------------------------
12055 /* Flow label is static. In Spectrum this means '0'. Spectrum-2
12093 * Spectrum uses LAG hash (SLCRv2). Spectrum-2 uses ECMP hash (RECRv2).
12130 * Reserved when Spectrum-2. See TNPC.
12137 * Reserved when Spectrum-2.
12180 /* TNUMT - Tunneling NVE Underlay Multicast Table Register
12181 * -------------------------------------------------------
12263 /* TNQCR - Tunneling NVE QoS Configuration Register
12264 * ------------------------------------------------
12275 * 0 - Copy the DSCP from the overlay (inner) IP header to the underlay
12277 * 1 - Set the DSCP field as TNQDR.dscp
12288 /* TNQDR - Tunneling NVE QoS Default Register
12289 * ------------------------------------------
12317 /* TNEEM - Tunneling NVE Encapsulation ECN Mapping Register
12318 * --------------------------------------------------------
12347 /* TNDEM - Tunneling NVE Decapsulation ECN Mapping Register
12348 * --------------------------------------------------------
12378 * 0 - No trap due to decap ECN
12379 * 1 - Trap enable with trap_id
12403 /* TNPC - Tunnel Port Configuration Register
12404 * -----------------------------------------
12441 /* TIGCR - Tunneling IPinIP General Configuration Register
12442 * -------------------------------------------------------
12471 /* TIEEM - Tunneling IPinIP Encapsulation ECN Mapping Register
12472 * -----------------------------------------------------------
12501 /* TIDEM - Tunneling IPinIP Decapsulation ECN Mapping Register
12502 * -----------------------------------------------------------
12532 * 0 - No trap due to decap ECN
12533 * 1 - Trap enable with trap_id
12557 /* SBPR - Shared Buffer Pools Register
12558 * -----------------------------------
12627 /* SBCM - Shared Buffer Class Management Register
12628 * ----------------------------------------------
12630 * and configuration according to Port-PG, including the binding to pool
12647 * PG buffer - Port PG (dir=ingress) / traffic class (dir=egress)
12648 * For PG buffer: range is 0..cap_max_pg_buffers - 1
12649 * For traffic class: range is 0..cap_max_tclass - 1
12679 * When the pool associated to the port-pg/tclass is configured to
12681 * When the pool associated to the port-pg/tclass is configured to
12685 * i: (1/128)*2^(i-1), for i=1..14
12693 * Association of the port-priority to a pool.
12713 /* SBPM - Shared Buffer Port Management Register
12714 * ---------------------------------------------
12716 * and configuration according to Port-Pool, including the definition
12753 * new max value is tracked from the time the clear was performed).
12772 * When the pool associated to the port-pg/tclass is configured to
12774 * When the pool associated to the port-pg/tclass is configured to
12778 * i: (1/128)*2^(i-1), for i=1..14
12804 /* SBMM - Shared Buffer Multicast Management Register
12805 * --------------------------------------------------
12807 * and configuration for MC packets according to Switch-Priority, including
12828 * When the pool associated to the port-pg/tclass is configured to
12830 * When the pool associated to the port-pg/tclass is configured to
12834 * i: (1/128)*2^(i-1), for i=1..14
12841 * Association of the port-priority to a pool.
12856 /* SBSR - Shared Buffer Status Register
12857 * ------------------------------------
12859 * Port-Pool. Note that this register enables reading a large amount of data.
12876 * field is cleared (and a new max value is tracked from the time the clear
12906 * Range is 0..cap_max_pg_buffers - 1
12925 * Range is 0..cap_max_tclass - 1
12961 /* SBIB - Shared Buffer Internal Buffer Register
12962 * ---------------------------------------------
12983 * Allowed range is 0 to (cap_max_headroom_size - 1)
13161 if (reg_info->id == reg_id) in mlxsw_reg_id_str()
13162 return reg_info->name; in mlxsw_reg_id_str()
13167 /* PUDE - Port Up / Down Event
13168 * ---------------------------
13187 * 1 - Up.
13188 * 2 - Down.
13189 * 3 - Up once. This means that in case of link failure, the port won't go
13190 * into polling mode, but will wait to be re-enabled by software.
13191 * 4 - Disabled by system. Can only be set by hardware.
13198 * 1 - Up.
13199 * 2 - Down.
13200 * 3 - Down by port failure. This means that the device will not let the