Lines Matching +full:route +full:- +full:ptp

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 * --------------------------------------------
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)
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.
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
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
4132 * 0 - Disable
4133 * 1 - Enable
4139 * PTP shaper
4141 * 1: PTP oriented shaper
4145 * Supported only on Spectrum-1
4157 * 0 - Bytes mode
4158 * 1 - Packets mode
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.
4928 /* PPAD - Port Physical Address Register
4929 * -------------------------------------
4940 * 1: single_mac - mac of the local_port
4952 * If single_base_mac = 0 - base MAC address, mac[7:0] is reserved.
4953 * If single_base_mac = 1 - the per port MAC address
4966 /* PAOS - Ports Administrative and Operational Status Register
4967 * -----------------------------------------------------------
4992 * 1 - Up.
4993 * 2 - Down.
4994 * 3 - Up once. This means that in case of link failure, the port won't go
4995 * into polling mode, but will wait to be re-enabled by software.
4996 * 4 - Disabled by system. Can only be set by hardware.
5003 * 1 - Up.
5004 * 2 - Down.
5005 * 3 - Down by port failure. This means that the device will not let the
5026 * 0 - Do not generate event.
5027 * 1 - Generate Event.
5028 * 2 - Generate Single Event.
5046 /* PFCC - Ports Flow Control Configuration Register
5047 * ------------------------------------------------
5063 * 0 - Local port number.
5064 * 1 - IB / label port number.
5071 * 0 - No capability of sending Pause and PFC frames to higher layers.
5072 * 1 - Device has capability of sending Pause and PFC frames to higher
5080 * 0 - Pause and PFC frames are handled by the port (default).
5081 * 1 - Pause and PFC frames are handled by the port and also sent to
5089 * 0 - Disabled. Generate / ignore Pause frames based on pptx / pprtx.
5090 * 1 - Enabled. When auto-negotiation is performed, set the Pause policy
5091 * based on the auto-negotiation resolution.
5094 * Note: The auto-negotiation advertisement is set according to pptx and
5115 * 0 - Never generate Pause frames (default).
5116 * 1 - Generate Pause frames according to Rx buffer threshold.
5123 * 0 - Never generate Pause frames.
5124 * 1 - Generate Pause frames according to Rx buffer threshold.
5130 * Priority based flow control policy on Tx[7:0]. Per-priority bit mask:
5131 * 0 - Never generate priority Pause frames on the specified priority
5133 * 1 - Generate priority Pause frames according to Rx buffer threshold on
5143 * 0 - Ignore received Pause frames (default).
5144 * 1 - Respect received Pause frames.
5151 * 0 - Ignore received Pause frames.
5152 * 1 - Respect received Pause frames.
5158 * Priority based flow control policy on Rx[7:0]. Per-priority bit mask:
5159 * 0 - Ignore incoming priority Pause frames on the specified priority
5161 * 1 - Respect incoming priority Pause frames on the specified priority.
5182 /* PPCNT - Ports Performance Counters Register
5183 * -------------------------------------------
5211 * 0 - Local port number
5212 * 1 - IB port number
5265 * Priority for counter set that support per priority, valid values: 0-7.
5267 * valid values: 0- cap_max_tclass-1 .
5701 /* PPTB - Port Prio To Buffer Register
5702 * -----------------------------------
5718 * 0 - Map both unicast and multicast packets to the same buffer.
5719 * 1 - Map only unicast packets.
5720 * 2 - Map only multicast packets.
5723 * Note: SwitchX-2 only supports the first option.
5764 * Note: In SwitchX-2 this field must be mapped to buffer 8. Reserved for
5794 /* PBMC - Port Buffer Management Control Register
5795 * ----------------------------------------------
5812 * timer (time for the peer port to pause in quota-512 bit time).
5819 * state. Using the same units as xoff_timer_value above (in quota-512 bit
5829 * 0 - Lossless
5830 * 1 - Lossy
5904 /* PSPA - Port Switch Partition Allocation
5905 * ---------------------------------------
5941 /* PMAOS - Ports Module Administrative and Operational Status
5942 * ----------------------------------------------------------
5952 * Note: Setting reset while module is plugged-in will result in transition to
6023 /* PPLR - Port Physical Loopback Register
6024 * --------------------------------------
6059 /* PMTDB - Port Module To local DataBase Register
6060 * ----------------------------------------------
6061 * The PMTDB register allows to query the possible module<->local port
6122 /* PMECR - Ports Mapping Event Configuration Register
6123 * --------------------------------------------------
6185 /* PMPE - Port Module Plug/Unplug Event Register
6186 * ---------------------------------------------
6229 /* PDDR - Port Diagnostics Database Register
6230 * -----------------------------------------
6279 /* PMMP - Port Module Memory Map Properties Register
6280 * -------------------------------------------------
6302 * When set, will keep eeprom_override values after plug-out event.
6309 * 0 - Allow write
6310 * 1 - Ignore write
6335 /* PLLP - Port Local port to Label Port mapping Register
6336 * -----------------------------------------------------
6382 /* PMTM - Port Module Type Mapping Register
6383 * ----------------------------------------
6434 /* HTGT - Host Trap Group Table
6435 * ----------------------------
6493 MLXSW_REG_HTGT_TRAP_GROUP_MAX = __MLXSW_REG_HTGT_TRAP_GROUP_MAX - 1
6527 * 0 - Trap to CPU.
6528 * 1 - Trap to CPU and mirror to a mirroring agent.
6529 * 2 - Mirror to a mirroring agent and do not trap to CPU.
6549 * Supported values are 0-7, with 7 represnting the highest priority.
6552 * Note: In SwitchX-2 this field is ignored and the priority value is replaced
6600 /* HPKT - Host Packet Trap
6601 * -----------------------
6637 * 0 - No action. Forward to CPU based on switching rules.
6638 * 1 - Trap to CPU (CPU receives sole copy).
6639 * 2 - Mirror to CPU (CPU receives a replica of the packet).
6640 * 3 - Discard.
6641 * 4 - Soft discard (allow other traps to act on the packet).
6642 * 5 - Trap and soft discard (allow other traps to overwrite this trap).
6643 * 6 - Trap to CPU (CPU receives sole copy) and count it as error.
6644 * 15 - Restore the firmware's default action.
6675 * Ignored by SwitchX-2.
6676 * 0 - Keep factory defaults.
6677 * 1 - Do not use control buffer for this trap ID.
6678 * 2 - Use control buffer for this trap ID.
6697 /* RGCR - Router General Configuration Register
6698 * --------------------------------------------
6727 * 0 - Preserve the value of Switch Priority and packet color.
6728 * 1 - Recalculate the value of Switch Priority and packet color.
6731 * Note: Not supported by SwitchX and SwitchX-2.
6737 * 0 - Preserve the value of pcp_rewrite_en.
6738 * 2 - Disable PCP rewrite.
6739 * 3 - Enable PCP rewrite.
6742 * Note: Not supported by SwitchX and SwitchX-2.
6748 * 0 - Activity will be set when an entry is hit (default).
6749 * 1 - Activity will not be set when an entry is hit.
6751 * Bit 0 - Disable activity bit in Router Algorithmic LPM Unicast Entry
6753 * Bit 1 - Disable activity bit in Router Algorithmic LPM Unicast Host
6758 * Note: Not supported by SwitchX, SwitchX-2 and Switch-IB.
6770 /* RITR - Router Interface Table Register
6771 * --------------------------------------
6816 /* Sub-port interface. */
6835 * 0 - Create or edit RIF.
6836 * 1 - Delete RIF.
6837 * Reserved for SwitchX-2. For Spectrum, editing of interface properties
6838 * is not supported. An interface must be deleted and re-created in order
6854 * Not supported in SwitchX-2.
6863 * Not supported in SwitchX-2.
6885 * Loop-back filter enable for unicast packets.
6886 * If the flag is set then loop-back filter for unicast packets is
6888 * loop-back filtering.
6926 * Note: Reserved for RIF types other than VLAN, FID and Sub-port.
6933 * Note: Reserved for RIF types other than VLAN, FID and Sub-port.
6951 * Note: Reserved when legacy bridge model is used and on Spectrum-1.
6966 /* Sub-port Interface */
6984 * Used to connect the eRIF to a bridge if eRIF-ACL has modified the DMAC or
7005 /* IPinIP generic - used for Spectrum-2 underlay RIF */
7041 * Range is 0..cap_max_virtual_routers-1.
7042 * Reserved for Spectrum-2.
7073 * - Error and Discard counters.
7074 * - Unicast, Multicast and Broadcast counters. Sharing the
7225 /* RTAR - Router TCAM Allocation Register
7226 * --------------------------------------
7276 /* RATR - Router Adjacency Table Register
7277 * --------------------------------------
7278 * The RATR register is used to configure the Router Adjacency (next-hop)
7348 * Reserved for SwitchX/-2.
7352 * Reserved for SwitchX/-2.
7365 * For SwitchX and SwitchX-2, the adjacency table is linear and
7373 * Range is 0 .. cap_max_router_interfaces - 1
7405 * Trap-ID is RTR_EGRESS0 or RTR_EGRESS1.
7412 * MAC address of the destination next-hop.
7513 /* RDPM - Router DSCP to Priority Mapping
7514 * --------------------------------------
7523 MLXSW_REG_RDPM_LEN - \
7533 -MLXSW_REG_RDPM_DSCP_ENTRY_REC_LEN, 0x00, false);
7540 -MLXSW_REG_RDPM_DSCP_ENTRY_REC_LEN, 0x00, false);
7549 /* RICNT - Router Interface Counter Register
7550 * -----------------------------------------
7568 * - Error and Discard counters.
7569 * - Unicast, Multicast and Broadcast counters. Sharing the
7643 * A count of non-errored frames that do not pass the router checks.
7657 * for non-errored frames that do not pass the router checks.
7672 /* RRCR - Router Rules Copy Register Layout
7673 * ----------------------------------------
7674 * This register is used for moving and copying route entry rules.
7731 /* RALTA - Router Algorithmic LPM Tree Allocation Register
7732 * -------------------------------------------------------
7742 * 0 - allocate a tree
7743 * 1 - deallocate a tree
7761 * An identifier (numbered from 1..cap_shspm_max_trees-1) representing
7763 * Note that tree_id 0 is allocated for a default-route tree.
7778 /* RALST - Router Algorithmic LPM Structure Tree Register
7779 * ------------------------------------------------------
7795 * For a default-route tree configure 0xff
7801 * Tree identifier numbered from 1..(cap_shspm_max_trees-1).
7813 * Note that tree_id 0 is allocated for a default-route tree, bins are 0xff
7821 * Note that tree_id 0 is allocated for a default-route tree, bins are 0xff
7843 int bin_index = bin_number - 1; in mlxsw_reg_ralst_bin_pack()
7850 /* RALTB - Router Algorithmic LPM Tree Binding Register
7851 * ----------------------------------------------------
7861 * Range is 0..cap_max_virtual_routers-1
7874 * Tree identifier numbered from 1..(cap_shspm_max_trees-1).
7890 /* RALUE - Router Algorithmic LPM Unicast Entry Register
7891 * -----------------------------------------------------
7918 /* Update operation. Used to update an existing route entry and
7941 * specific entry, only if the entry is a route. To clear the a bit, use
7950 * Range is 0..cap_max_virtual_routers-1
7962 * This field is valid for update opcode, otherwise - reserved.
7969 * Number of bits in the prefix of the LPM route.
7977 * The prefix of the route or of the marker that the object of the LPM
7995 * Note - for Marker entries, the action_type and action fields are reserved.
8020 * on a remote subnet connected through a next-hop router,
8051 * Points to the first entry of the group-based ECMP.
8060 * The valid range is 1-64, 512, 1024, 2048 and 4096.
8170 /* RAUHT - Router Algorithmic LPM Unicast Host Table Register
8171 * ----------------------------------------------------------
8202 /* Update action. Used to update an existing route entry and
8263 * Trap-ID is RTR_EGRESS0 or RTR_EGRESS1.
8323 /* RALEU - Router Algorithmic LPM ECMP Update Register
8324 * ---------------------------------------------------
8342 * Range is 0..cap_max_virtual_routers-1
8387 /* RAUHTD - Router Algorithmic LPM Unicast Host Table Dump Register
8388 * ----------------------------------------------------------------
8412 * Bit0 - filter by activity: entry_a
8413 * Bit3 - filter by entry rip: entry_rif
8452 * 0 - IPv4
8453 * 1 - IPv6
8478 * 0 - 1 valid entry
8479 * 1 - 2 valid entries
8480 * 2 - 3 valid entries
8481 * 3 - 4 valid entries
8490 * 0 - IPv4
8491 * 1 - IPv6
8561 /* RTDP - Routing Tunnel Decap Properties Register
8562 * -----------------------------------------------
8591 * Valid range is from 0 to cap_max_router_interfaces - 1
8640 * - A packet received as IPinIP (without GRE) will always pass.
8641 * - A packet received as IPinGREinIP without a key will not pass the check.
8642 * - A packet received as IPinGREinIP with a key will pass the check only if the
8716 /* RIPS - Router IP version Six Register
8717 * -------------------------------------
8747 /* RATRAD - Router Adjacency Table Activity Dump Register
8748 * ------------------------------------------------------
8772 * Spectrum-1: 32-64, 512, 1024, 2048, 4096
8773 * Spectrum-2/3: 32-128, 256, 512, 1024, 2048, 4096
8801 /* RIGR-V2 - Router Interface Group Register Version 2
8802 * ---------------------------------------------------
8840 * Range 0 .. max_mid - 1
8849 * Note that low-entries must be set if high-entries are set. For
8852 * Index can be from 0 to cap_mc_erif_list_entries-1
8859 * Valid range is from 0 to cap_max_router_interfaces - 1
8860 * Index can be from 0 to MLXSW_REG_RIGR2_MAX_ERIFS - 1
8883 /* RECR-V2 - Router ECMP Configuration Version 2 Register
8884 * ------------------------------------------------------
8892 * Per-port configuration
9018 /* RMFT-V2 - Router Multicast Forwarding Table Version 2 Register
9019 * --------------------------------------------------------------
9047 * entries - Note write with v (Valid) 0 will delete the entry.
9074 * Virtual Router ID. Range from 0..cap_max_virtual_routers-1
9128 * action-set pointed from here are as follows:
9189 /* REIV - Router Egress Interface to VID Register
9190 * ----------------------------------------------
9191 * The REIV register maps {eRIF, egress_port} -> VID.
9194 * (for unicast/multicast/port-base multicast), regardless of eRIF type and
9211 * Port page - elport_record[0] is 256*port_page.
9218 * Range is 0..cap_max_router_interfaces-1.
9225 * 0 - Do not update the entry.
9226 * 1 - Update the entry.
9247 /* MFCR - Management Fan Control Register
9248 * --------------------------------------
9307 /* MFSC - Management Fan Speed Control Register
9308 * --------------------------------------------
9337 /* MFSM - Management Fan Speed Measurement
9338 * ---------------------------------------
9365 /* MFSL - Management Fan Speed Limit Register
9366 * ------------------------------------------
9369 * defined for both under-speed and over-speed.
9413 /* FORE - Fan Out of Range Event Register
9414 * --------------------------------------
9442 /* MTCAP - Management Temperature Capabilities
9443 * -------------------------------------------
9459 /* MTMP - Management Temperature
9460 * -----------------------------
9480 * 64-127 of sensor_index are mapped to the SFP+/QSFP modules sequentially
9508 * Max Temperature Enable - enables measuring the max temperature on a sensor.
9514 * Max Temperature Reset - clears the value of the max temperature register.
9528 * 0 - Do not generate event
9529 * 1 - Generate event
9530 * 2 - Generate single event
9605 /* MTWE - Management Temperature Warning Event
9606 * -------------------------------------------
9622 /* MTBR - Management Temperature Bulk Register
9623 * -------------------------------------------
9643 * Base sensors index to access (0 - ASIC sensor, 1-63 - ambient sensors,
9644 * 64-127 are mapped to the SFP+/QSFP modules sequentially).
9703 /* MCIA - Management Cable Info Access
9704 * -----------------------------------
9815 /* This is used to access the optional upper pages (1-3) in the QSFP+
9816 * memory map. Page 1 is available on offset 256 through 383, page 2 -
9817 * on offset 384 through 511, page 3 - on offset 512 through 639.
9819 #define MLXSW_REG_MCIA_PAGE_GET(off) (((off) - \
9836 /* MPAT - Monitoring Port Analyzer Table
9837 * -------------------------------------
9873 * 0: CONFIGURED - QoS parameters (Switch Priority, and encapsulation
9875 * 1: MAINTAIN - QoS parameters (Switch Priority, Color) are the
9928 /* Remote SPAN - Ethernet VLAN
9929 * - - - - - - - - - - - - - -
9938 /* Encapsulated Remote SPAN - Ethernet L2
9939 * - - - - - - - - - - - - - - - - - - -
9964 /* Encapsulated Remote SPAN - Ethernet L3
9965 * - - - - - - - - - - - - - - - - - - -
9980 * Encapsulation header Time-to-Live/HopLimit.
10060 /* MPAR - Monitoring Port Analyzer Register
10061 * ----------------------------------------
10106 * Reserved when Spectrum-1.
10124 /* MGIR - Management General Information Register
10125 * ----------------------------------------------
10140 * When set, latency-TLV is supported.
10146 * When set, string-TLV is supported.
10190 /* MRSR - Management Reset and Shutdown Register
10191 * ---------------------------------------------
10211 * 0 - do nothing
10212 * 1 - software reset
10224 /* MLCR - Management LED Control Register
10225 * --------------------------------------
10243 * 0x0 - Will turn off the beacon.
10244 * 0xFFFF - Will turn on the beacon until explicitly turned off.
10265 /* MCION - Management Cable IO and Notifications Register
10266 * ------------------------------------------------------
10305 /* MTPPS - Management Pulse Per Second Register
10306 * --------------------------------------------
10362 /* MTUTC - Management UTC Register
10363 * -------------------------------
10387 * 10^9 HW clocks for 1 HW second. Range is from -50,000,000 to +50,000,000.
10388 * In Spectrum-2, the field is reversed, positive values mean to decrease the
10404 * Range 0..(10^9-1)
10406 * Reserved on Spectrum-1.
10414 * Range is from -32768 to +32767.
10416 * Reserved on Spectrum-1.
10433 /* MCQI - Management Component Query Information
10434 * ---------------------------------------------
10516 /* MCC - Management Component Control
10517 * ----------------------------------
10598 /* MCDA - Management Component Data Access
10599 * ---------------------------------------
10649 /* MCAM - Management Capabilities Mask Register
10650 * --------------------------------------------
10693 * #0-#31 and so on, so the access to the bits is simpler using bit array per
10726 /* MPSC - Monitoring Packet Sampling Configuration Register
10727 * --------------------------------------------------------
10766 /* MGPC - Monitoring General Purpose Counter Set Register
10821 /* MPRS - Monitoring Parsing State Register
10822 * ----------------------------------------
10824 * policy-engine and routing.
10834 * rules, traps, hash, etc. Default is 96 bytes. Reserved when SwitchX-2.
10841 * Bit 0 - Enable parsing of NVE of types VxLAN, VxLAN-GPE, GENEVE and
10842 * NVGRE. Default is enabled. Reserved when SwitchX-2.
10864 /* MOGCR - Monitoring Global Configuration Register
10865 * ------------------------------------------------
10873 * PTP Ingress FIFO Trap Clear
10876 * Reserved when IB switches and when SwitchX/-2, Spectrum-2
10882 * PTP Egress FIFO Trap Clear
10885 * Reserved when IB switches and when SwitchX/-2, Spectrum-2
10893 * Reserved when SwitchX/-2, Switch-IB/2, Spectrum-1 and Quantum.
10898 /* MPAGR - Monitoring Port Analyzer Global Register
10899 * ------------------------------------------------
10901 * Note: This register is not supported by current FW versions for Spectrum-1.
10951 /* MOMTE - Monitoring Mirror Trigger Enable Register
10952 * -------------------------------------------------
11000 /* MTPPPC - Time Precision Packet Port Configuration
11001 * -------------------------------------------------
11002 * This register serves for configuration of which PTP messages should be
11005 * Reserved when Spectrum-2.
11013 * Bitwise vector of PTP message types to timestamp at ingress.
11022 * Bitwise vector of PTP message types to timestamp at egress.
11037 /* MTPPTR - Time Precision Packet Timestamping Reading
11038 * ---------------------------------------------------
11039 * The MTPPTR is used for reading the per port PTP timestamp FIFO.
11044 * Reserved when Spectrum-2.
11112 * Timestamp of when the PTP packet has passed through the port Units of PLL
11114 * For Spectrum-1 the PLL clock is 156.25Mhz and PLL clock time is 6.4nSec.
11146 /* MTPTPT - Monitoring Precision Time Protocol Trap Register
11147 * ---------------------------------------------------------
11148 * This register is used for configuring under which trap to deliver PTP
11168 * Bitwise vector of PTP message types to trap. This is a necessary but
11169 * non-sufficient condition since need to enable also per port. See MTPPPC.
11184 /* MTPCPC - Monitoring Time Precision Correction Port Configuration Register
11185 * -------------------------------------------------------------------------
11194 * 0: config is global. When reading - the local_port is 1.
11209 * Enable PTP traps.
11216 * Bitwise vector of PTP message types to update correction-field at ingress.
11225 * Bitwise vector of PTP message types to update correction-field at egress.
11245 /* MFGD - Monitoring FW General Debug Register
11246 * -------------------------------------------
11254 * 0 - don't check FW fatal (default)
11255 * 1 - check FW fatal - enable MFDE trap
11265 /* MGPIR - Management General Peripheral Information Register
11266 * ----------------------------------------------------------
11346 /* MBCT - Management Binary Code Transfer Register
11347 * -----------------------------------------------
11401 /* Error - trying to erase INI while it being used. */
11467 /* MDDT - Management DownStream Device Tunneling Register
11468 * ------------------------------------------------------
11490 * Read size in D-Words.
11496 * Write size in D-Words.
11541 int len = reg->len + MLXSW_REG_MDDT_PRM_REGISTER_HEADER_LEN; in mlxsw_reg_mddt_pack()
11544 len = MLXSW_REG_MDDT_LEN - MLXSW_REG_MDDT_PAYLOAD_OFFSET; in mlxsw_reg_mddt_pack()
11550 mlxsw_reg_mddt_register_id_set(payload, reg->id); in mlxsw_reg_mddt_pack()
11556 /* MDDQ - Management DownStream Device Query Register
11557 * --------------------------------------------------
11625 * can be sent from the switch ASIC to the line-card CPLD over Shift-Register.
11650 * Major user-configured version number of the current INI file.
11657 * User-configured version number of the current INI file.
11729 * Sub-minor FW version number.
11780 /* MDDC - Management DownStream Device Control Register
11781 * ----------------------------------------------------
11816 /* MFDE - Monitoring FW Debug Register
11817 * -----------------------------------
11891 * EMAD - register id, MAD - attibute id
11903 * 0 - New event
11904 * 1 - Old event, occurred before MFGD activation.
11922 * 0 - New event
11923 * 1 - Old event, occurred before MFGD activation.
11934 /* reg_mfde_fw_assert_var0-4
11957 * 0 - New event
11958 * 1 - Old event, occurred before MFGD activation.
11977 * A generated one-to-one identifier which is specific per-assert.
12001 /* TNGCR - Tunneling NVE General Configuration Register
12002 * ----------------------------------------------------
12060 /* Flow label is static. In Spectrum this means '0'. Spectrum-2
12098 * Spectrum uses LAG hash (SLCRv2). Spectrum-2 uses ECMP hash (RECRv2).
12135 * Reserved when Spectrum-2. See TNPC.
12142 * Reserved when Spectrum-2.
12185 /* TNUMT - Tunneling NVE Underlay Multicast Table Register
12186 * -------------------------------------------------------
12268 /* TNQCR - Tunneling NVE QoS Configuration Register
12269 * ------------------------------------------------
12280 * 0 - Copy the DSCP from the overlay (inner) IP header to the underlay
12282 * 1 - Set the DSCP field as TNQDR.dscp
12293 /* TNQDR - Tunneling NVE QoS Default Register
12294 * ------------------------------------------
12322 /* TNEEM - Tunneling NVE Encapsulation ECN Mapping Register
12323 * --------------------------------------------------------
12352 /* TNDEM - Tunneling NVE Decapsulation ECN Mapping Register
12353 * --------------------------------------------------------
12383 * 0 - No trap due to decap ECN
12384 * 1 - Trap enable with trap_id
12408 /* TNPC - Tunnel Port Configuration Register
12409 * -----------------------------------------
12446 /* TIGCR - Tunneling IPinIP General Configuration Register
12447 * -------------------------------------------------------
12476 /* TIEEM - Tunneling IPinIP Encapsulation ECN Mapping Register
12477 * -----------------------------------------------------------
12506 /* TIDEM - Tunneling IPinIP Decapsulation ECN Mapping Register
12507 * -----------------------------------------------------------
12537 * 0 - No trap due to decap ECN
12538 * 1 - Trap enable with trap_id
12562 /* SBPR - Shared Buffer Pools Register
12563 * -----------------------------------
12632 /* SBCM - Shared Buffer Class Management Register
12633 * ----------------------------------------------
12635 * and configuration according to Port-PG, including the binding to pool
12652 * PG buffer - Port PG (dir=ingress) / traffic class (dir=egress)
12653 * For PG buffer: range is 0..cap_max_pg_buffers - 1
12654 * For traffic class: range is 0..cap_max_tclass - 1
12684 * When the pool associated to the port-pg/tclass is configured to
12686 * When the pool associated to the port-pg/tclass is configured to
12690 * i: (1/128)*2^(i-1), for i=1..14
12698 * Association of the port-priority to a pool.
12718 /* SBPM - Shared Buffer Port Management Register
12719 * ---------------------------------------------
12721 * and configuration according to Port-Pool, including the definition
12777 * When the pool associated to the port-pg/tclass is configured to
12779 * When the pool associated to the port-pg/tclass is configured to
12783 * i: (1/128)*2^(i-1), for i=1..14
12809 /* SBMM - Shared Buffer Multicast Management Register
12810 * --------------------------------------------------
12812 * and configuration for MC packets according to Switch-Priority, including
12833 * When the pool associated to the port-pg/tclass is configured to
12835 * When the pool associated to the port-pg/tclass is configured to
12839 * i: (1/128)*2^(i-1), for i=1..14
12846 * Association of the port-priority to a pool.
12861 /* SBSR - Shared Buffer Status Register
12862 * ------------------------------------
12864 * Port-Pool. Note that this register enables reading a large amount of data.
12911 * Range is 0..cap_max_pg_buffers - 1
12930 * Range is 0..cap_max_tclass - 1
12966 /* SBIB - Shared Buffer Internal Buffer Register
12967 * ---------------------------------------------
12988 * Allowed range is 0 to (cap_max_headroom_size - 1)
13166 if (reg_info->id == reg_id) in mlxsw_reg_id_str()
13167 return reg_info->name; in mlxsw_reg_id_str()
13172 /* PUDE - Port Up / Down Event
13173 * ---------------------------
13192 * 1 - Up.
13193 * 2 - Down.
13194 * 3 - Up once. This means that in case of link failure, the port won't go
13195 * into polling mode, but will wait to be re-enabled by software.
13196 * 4 - Disabled by system. Can only be set by hardware.
13203 * 1 - Up.
13204 * 2 - Down.
13205 * 3 - Down by port failure. This means that the device will not let the