Lines Matching +full:has +full:- +full:supplementary +full:- +full:unicast

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.
112 * Currently, only single-ASIC configurations are supported, so we default to
127 /* SFDAT - Switch Filtering Database Aging Time
128 * --------------------------------------------
145 * Min - 10 seconds
146 * Max - 1,000,000 seconds
159 /* SFD - Switch Filtering Database
160 * -------------------------------
192 /* Add/modify. Aged-out records cannot be added. This command removes
198 * the learning notification and aged-out notifications
199 * of the {MAC, VID/FID}. The response provides current (pre-removal)
200 * entries as non-aged-out.
318 * Valid only if local port is a non-stacking port. Must be 0 if multichannel
327 * 0 - Do not update VID.
328 * 1 - Set VID.
329 * For Spectrum-2 when set_vid=0 and smpe_valid=1, the smpe will modify the vid.
339 * For SwitchX and SwitchX-2:
340 * - Dynamic entries (policy 2,3) use FID
341 * - Static entries (policy 0) use VID
342 * - When independent learning is configured, VID=FID
407 * 0 - Do not update VID.
408 * 1 - Set VID.
409 * For Spectrum-2 when set_vid=0 and smpe_valid=1, the smpe will modify the vid.
419 * For SwitchX and SwitchX-2:
420 * - Dynamic entries (policy 2,3) use FID
421 * - Static entries (policy 0) use VID
422 * - When independent learning is configured, VID=FID
440 * LAG Identifier - pointer into the LAG descriptor table.
466 * Multicast port group index - index into the port group table.
484 * Multicast identifier - global identifier that represents the multicast
575 /* Only static policy is supported for IPv6 unicast tunnel entry. */ in mlxsw_reg_sfd_uc_tunnel_pack6()
589 /* SFN - Switch FDB Notification Register
590 * -------------------------------------------
616 * Request: Number of learned notifications and aged-out notification
645 /* Aged-out MAC address on a regular port. */
647 /* Aged-out MAC address on a LAG port. */
649 /* Learned unicast tunnel record. */
651 /* Aged-out unicast tunnel record. */
769 /* SPMS - Switch Port MSTP/RSTP State Register
770 * -------------------------------------------
793 * 0 - Do not change spanning tree state (used only when writing).
794 * 1 - Discarding. No learning or forwarding to/from this port (default).
795 * 2 - Learning. Port is learning, but not forwarding.
796 * 3 - Forwarding. Port is learning and forwarding.
813 /* SPVID - Switch Port VID
814 * -----------------------
824 * Reserved when SwitchX/-2 or Spectrum-1.
846 * Reserved when Spectrum-1.
854 * 0: ether_type0 - (default)
856 * 2: ether_type2 - Reserved when Spectrum-1, supported by Spectrum-2
878 /* SPVM - Switch Port VLAN Membership
879 * ----------------------------------
944 * Untagged - port is an untagged member - egress transmission uses untagged
964 int size = vid_end - vid_begin + 1; in mlxsw_reg_spvm_pack()
979 /* SPAFT - Switch Port Acceptable Frame Types
980 * ------------------------------------------
1032 /* SFGC - Switch Flooding Group Configuration
1033 * ------------------------------------------
1069 * Note: SwitchX-2 only supports 802.1Q mode.
1085 * Note: FID offset and FID types are not supported in SwitchX-2.
1130 /* SFDF - Switch Filtering DB Flush
1131 * --------------------------------
1159 * 0 - All SWID dynamic entries are flushed.
1160 * 1 - All FID dynamic entries are flushed.
1161 * 2 - All dynamic entries pointing to port are flushed.
1162 * 3 - All FID dynamic entries pointing to port are flushed.
1163 * 4 - All dynamic entries pointing to LAG are flushed.
1164 * 5 - All FID dynamic entries pointing to LAG are flushed.
1165 * 6 - All entries of type "Unicast Tunnel" or "Multicast Tunnel" are
1167 * 7 - All entries of type "Unicast Tunnel" or "Multicast Tunnel" are
1175 * 0 - Flush only dynamic entries.
1176 * 1 - Flush both dynamic and static entries.
1219 /* SLDR - Switch LAG Descriptor Register
1220 * -----------------------------------------
1223 * max_lag-1.
1231 /* Indicates a creation of a new LAG-ID, lag_id must be valid */
1269 * For Add / Remove operations - indicates the number of ports in the list.
1300 /* SLCR - Switch LAG Configuration 2 Register
1301 * -------------------------------------------
1347 /* SMAC - for IPv4 and IPv6 packets */
1349 /* SMAC - for non-IP packets */
1354 /* DMAC - for IPv4 and IPv6 packets */
1356 /* DMAC - for non-IP packets */
1361 /* Ethertype - for IPv4 and IPv6 packets */
1363 /* Ethertype - for non-IP packets */
1368 /* VLAN ID - for IPv4 and IPv6 packets */
1370 /* VLAN ID - for non-IP packets */
1387 /* SID - FCoE source ID */
1389 /* DID - FCoE destination ID */
1391 /* OXID - FCoE originator exchange ID */
1393 /* Destination QP number - for RoCE packets */
1420 /* SLCOR - Switch LAG Collector Register
1421 * -------------------------------------
1459 * Valid range is from 0 to cap_max_lag_members-1
1504 /* SPMLR - Switch Port MAC Learning Register
1505 * -----------------------------------------
1534 * 0 - Learning disabled.
1535 * 2 - Learning enabled.
1536 * 3 - Security mode.
1554 /* SVFA - Switch VID to FID Allocation Register
1555 * --------------------------------------------
1586 * 0 - VID to FID
1587 * 1 - {Port, VID} to FID
1590 * Note: Reserved for SwitchX-2.
1599 * Note: Reserved for SwitchX-2.
1619 * Note: Reserved for SwitchX-2.
1627 * Note: Reserved for SwitchX-2.
1641 * 0 - Ingress RIF is not valid, no ingress RIF assigned.
1642 * 1 - Ingress RIF valid.
1652 * Range is 0..cap_max_router_interfaces-1.
1701 /* SPVTR - Switch Port VLAN Stacking Register
1702 * ------------------------------------------
1715 * Note: Reserved when SwitchX/-2 or Spectrum-1.
1754 * Note: for SwitchX/-2 the DEI is not affected.
1756 * 1: use C-VLAN PCP and DEI.
1757 * Has no effect when ipvid_mode = 0.
1773 * Ingress Port VLAN-ID Mode.
1787 * Egress Port VLAN-ID Mode.
1804 /* SVPE - Switch Virtual-Port Enabling Register
1805 * --------------------------------------------
1823 * 0 - Disable, VLAN mode (VID to FID).
1824 * 1 - Enable, Virtual port mode ({Port, VID} to FID).
1837 /* SFMR - Switch FID Management Register
1838 * -------------------------------------
1853 * 0 - Create or edit FID.
1854 * 1 - Destroy FID.
1866 * Router sub-port flooding table.
1867 * 0 - Regular flooding table.
1868 * 1 - Router sub-port flooding table. For this FID the flooding is per
1869 * router-sub-port local_port. Must not be set for a FID which is not a
1870 * router-sub-port and must be set prior to enabling the relevant RIF.
1879 * 0 - type_0.
1880 * 1 - type_1.
1890 * the table is of type FID-Offset. Otherwise, this field is reserved.
1924 * FID. When unified bridge model is used, it configures only the FID->VNI,
1925 * the VNI->FID is done by SVFA.
1932 * 0 - Ingress RIF is not valid, no ingress RIF assigned.
1933 * 1 - Ingress RIF valid.
1943 * Range is 0..cap_max_router_interfaces-1.
1955 * Spectrum-1.
1961 * Range is 0..cap_max_rmpe-1
1965 * Spectrum-1.
1987 /* SPVMLR - Switch Port VLAN MAC Learning Register
1988 * -----------------------------------------------
2016 * 0 - Disable learning for {Port, VID}.
2017 * 1 - Enable learning for {Port, VID}.
2034 int num_rec = vid_end - vid_begin + 1; in mlxsw_reg_spvmlr_pack()
2049 /* SPVC - Switch Port VLAN Classification Register
2050 * -----------------------------------------------
2147 /* SPEVET - Switch Port Egress VLAN EtherType
2148 * ------------------------------------------
2167 * 0: ether_type0 - (default)
2182 /* SMPE - Switch Multicast Port to Egress VID
2183 * ------------------------------------------
2185 * {egress_port, SMPE index} -> {VID}.
2201 * Range is 0..cap_max_rmpe-1.
2221 /* SMID-V2 - Switch Multicast ID Version 2 Register
2222 * ------------------------------------------------
2239 * Multicast identifier - global identifier that represents the multicast group
2250 * Note: Reserved when legacy bridge model is used and on Spectrum-2.
2258 * Note: Reserved when legacy bridge model is used and on Spectrum-2.
2286 /* CWTP - Congetion WRED ECN TClass Profile
2287 * ----------------------------------------
2353 #define MLXSW_REG_CWTP_PROFILE_TO_INDEX(profile) (profile - 1)
2366 /* CWTPM - Congestion WRED ECN TClass and Pool Mapping
2367 * ---------------------------------------------------
2390 * 0 - Disable
2391 * 1 - Enable
2398 * 0 - Disable
2399 * 1 - Enable
2429 * Non-TCP Green Profile.
2437 * Non-TCP Yellow Profile.
2445 * Non-TCP Red Profile.
2471 /* PGCR - Policy-Engine General Configuration Register
2472 * ---------------------------------------------------
2473 * This register configures general Policy-Engine settings.
2481 * Default action pointer base. Each region has a default action pointer
2493 /* PPBT - Policy-Engine Port Binding Table
2494 * ---------------------------------------
2529 * group - When set, the binding is of an ACL group. When cleared,
2555 /* PACL - Policy-Engine ACL Register
2556 * ---------------------------------
2573 * Range 0 .. cap_max_acl_regions - 1
2597 /* PAGT - Policy-Engine ACL Group Table
2598 * ------------------------------------
2622 * An identifier (numbered from 0..cap_max_acl_groups-1) representing
2629 * Multi-ACL
2630 * 0 - This ACL is the last ACL in the multi-ACL
2631 * 1 - This ACL is part of a multi-ACL
2659 /* PTAR - Policy-Engine TCAM Allocation Register
2660 * ---------------------------------------------
2691 * For Spectrum and Spectrum-2, this is always type 2 - "flexible"
2698 MLXSW_REG_PTAR_KEY_TYPE_FLEX2 = 0x51, /* Spectrum-2 */
2711 * Allowed range 1 .. cap_max_rules-1
2719 * Range 0 .. cap_max_regions-1
2769 /* PPBS - Policy-Engine Policy Based Switching Register
2770 * ----------------------------------------------------
2799 /* PRCR - Policy-Engine Rules Copy Register
2800 * ----------------------------------------
2875 /* PEFA - Policy-Engine Extended Flexible Action Register
2876 * ------------------------------------------------------
2895 * Set if a packet lookup has hit on the specific entry
2911 * Action-set to perform when rule is matched.
2933 /* PEMRBT - Policy-Engine Multicast Router Binding Table Register
2934 * --------------------------------------------------------------
2937 * This register is not supported by SwitchX/-2 and Spectrum.
2956 * Range 0..cap_max_acl_groups-1
2970 /* PTCE-V2 - Policy-Engine TCAM Entry Register Version 2
2971 * -----------------------------------------------------
2975 * by SwitchX and SwitchX-2.
2989 * Activity. Set if a packet lookup has hit on the specific entry.
3004 * for new entries - Note write with v = 0 will delete the entry.
3024 * Priority of the rule, higher values win. The range is 1..cap_kvd_size-1.
3027 * between regions in a multi-region).
3049 * mask- in the same size as key. A bit that is set directs the TCAM
3077 /* PERPT - Policy-Engine ERP Table Register
3078 * ----------------------------------------
3088 * Range 0 .. cap_max_erp_table_banks - 1
3095 * Range is 0 .. cap_max_erp_table_bank_size - 1
3113 * 0 - The eRP is used only if bloom filter state is set for the given
3115 * 1 - The eRP is used regardless of bloom filter state.
3129 * Range is 0 .. cap_max_erp_table_banks - 1
3136 * Range is 0 .. cap_max_erp_table_bank_size - 1
3155 * 0 - A-TCAM will ignore the bit in key
3156 * 1 - A-TCAM will compare the bit in key
3189 /* PERAR - Policy-Engine Region Association Register
3190 * -------------------------------------------------
3201 * Range 0 .. cap_max_regions-1
3214 * Range 0 .. cap_max_regions-1
3230 /* PTCE-V3 - Policy-Engine TCAM Entry Register Version 3
3231 * -----------------------------------------------------
3232 * This register is a new version of PTCE-V2 in order to support the
3233 * A-TCAM. This register is not supported by SwitchX/-2 and Spectrum.
3266 * For Spectrum-2 range is 1..cap_kvd_size - 1
3295 * num_key_blocks * 36 - 8. Reserved when delta_mask = 0.
3302 * 0 - Ignore relevant bit in delta_value
3303 * 1 - Compare relevant bit in delta_value
3321 * 0 - NEED: Do a lookup using the eRP.
3322 * 1 - PRUNE: Do not perform a lookup using the eRP.
3324 * Note: In Spectrum-2, a region of 8 key blocks must be set to either
3331 * Pruning on C-TCAM. Used for reducing lookups.
3332 * 0 - NEED: Do a lookup in the C-TCAM.
3333 * 1 - PRUNE: Do not perform a lookup in the C-TCAM.
3341 * 0 - SINGLE: The large_entry_key_id is not currently in use.
3344 * 1 - NON_SINGLE: The large_entry_key_id is currently in use.
3353 * A key for 12 key blocks rules. Reserved when region has less than 12 key
3356 * Range is 0..cap_max_pe_large_key_id - 1
3363 * Range is 0..cap_max_kvd_action_sets - 1
3392 /* PERCR - Policy-Engine Region Configuration Register
3393 * ---------------------------------------------------
3404 * Range 0..cap_max_regions-1
3410 * Ignore prune_vector by other A-TCAM rules. Used e.g., for a new rule.
3416 * Ignore prune_ctcam by other A-TCAM rules. Used e.g., for a new rule.
3423 * 0 - Bloom filter is used (default)
3424 * 1 - Bloom filter is bypassed. The bypass is an OR condition of
3432 * (both A-TCAM and C-TCAM). When there are no eRPs
3447 /* PERERP - Policy-Engine Region eRP Register
3448 * ------------------------------------------
3459 * Range 0..cap_max_regions-1
3465 * C-TCAM lookup enable. Reserved when erpt_pointer_valid = 0.
3478 * Range 0..cap_max_erp_table_banks-1
3486 * Range 0..cap_max_erp_table_size-1
3533 /* PEABFE - Policy-Engine Algorithmic Bloom Filter Entries Register
3534 * ----------------------------------------------------------------
3556 * 0 - Clear
3557 * 1 - Set
3566 * Range 0..cap_max_erp_table_banks-1
3575 * Range 0..2^cap_max_bf_log-1
3599 /* IEDR - Infrastructure Entry Delete Register
3600 * ----------------------------------------------------
3660 /* QPTS - QoS Priority Trust State Register
3661 * ----------------------------------------
3698 /* QPCR - QoS Policer Configuration Register
3699 * -----------------------------------------
3700 * The QPCR register is used to create policers - that limit
3740 * 0 - packets
3741 * 1 - bytes
3753 * 1 - 10^3
3754 * 0 - 10^6
3864 /* QTCT - QoS Switch Traffic Class Table
3865 * -------------------------------------
3914 /* QEEC - QoS ETS Element Configuration Register
3915 * ---------------------------------------------
3939 * 0 - Port
3940 * 1 - Group
3941 * 2 - Subgroup
3942 * 3 - Traffic Class
3964 * 0 - Disable
3965 * 1 - Enable
3977 * Supported only on Spectrum-1
3989 * 0 - Bytes mode
3990 * 1 - Packets mode
4012 * 0 - Disable
4013 * 1 - Enable
4019 #define MLXSW_REG_QEEC_MAS_DIS ((1u << 31) - 1) /* Kbps */
4032 * 0 - Disable
4033 * 1 - Enable
4041 * 0 - Strict priority
4042 * 1 - DWRR
4060 * For Spectrum-1: Range is: 5..25
4061 * For Spectrum-2: Range is: 11..25
4093 /* QRWE - QoS ReWrite Enable
4094 * -------------------------
4131 /* QPDSM - QoS Priority to DSCP Mapping
4132 * ------------------------------------
4219 /* QPDP - QoS Port DSCP to Priority Mapping Register
4220 * -------------------------------------------------
4251 /* QPDPM - QoS Port DSCP to Priority Mapping Register
4252 * --------------------------------------------------
4302 /* QTCTM - QoS Switch Traffic Class Table is Multicast-Aware Register
4303 * ------------------------------------------------------------------
4338 /* QPSC - QoS PTP Shaper Configuration Register
4339 * --------------------------------------------
4341 * Supported only on Spectrum-1.
4362 * The base-time-interval for updating the shapers tokens (for all hierarchies).
4370 * The base-time-interval for updating the shapers tokens (for all hierarchies).
4400 * For non-split ports: range 1..112
4444 /* PMLP - Ports Module to Local Port Register
4445 * ------------------------------------------
4454 * 0 - Tx value is used for both Tx and Rx.
4455 * 1 - Rx value is taken from a separte field.
4467 * 0 - Unmap local port.
4468 * 1 - Lane 0 is used.
4469 * 2 - Lanes 0 and 1 are used.
4470 * 4 - Lanes 0, 1, 2 and 3 are used.
4471 * 8 - Lanes 0-7 are used.
4486 * In case of non-modular system only slot_index = 0 is available.
4510 /* PMTU - Port MTU Register
4511 * ------------------------
4561 /* PTYS - Port Type and Speed Register
4562 * -----------------------------------
4575 * 0 - Device doesn't support AN disable.
4576 * 1 - Device supports AN disable.
4592 * 0 - Infiniband.
4593 * 1 - Fibre Channel.
4594 * 2 - Ethernet.
4756 /* PPAD - Port Physical Address Register
4757 * -------------------------------------
4768 * 1: single_mac - mac of the local_port
4780 * If single_base_mac = 0 - base MAC address, mac[7:0] is reserved.
4781 * If single_base_mac = 1 - the per port MAC address
4794 /* PAOS - Ports Administrative and Operational Status Register
4795 * -----------------------------------------------------------
4820 * 1 - Up.
4821 * 2 - Down.
4822 * 3 - Up once. This means that in case of link failure, the port won't go
4823 * into polling mode, but will wait to be re-enabled by software.
4824 * 4 - Disabled by system. Can only be set by hardware.
4831 * 1 - Up.
4832 * 2 - Down.
4833 * 3 - Down by port failure. This means that the device will not let the
4854 * 0 - Do not generate event.
4855 * 1 - Generate Event.
4856 * 2 - Generate Single Event.
4874 /* PFCC - Ports Flow Control Configuration Register
4875 * ------------------------------------------------
4891 * 0 - Local port number.
4892 * 1 - IB / label port number.
4899 * 0 - No capability of sending Pause and PFC frames to higher layers.
4900 * 1 - Device has capability of sending Pause and PFC frames to higher
4908 * 0 - Pause and PFC frames are handled by the port (default).
4909 * 1 - Pause and PFC frames are handled by the port and also sent to
4917 * 0 - Disabled. Generate / ignore Pause frames based on pptx / pprtx.
4918 * 1 - Enabled. When auto-negotiation is performed, set the Pause policy
4919 * based on the auto-negotiation resolution.
4922 * Note: The auto-negotiation advertisement is set according to pptx and
4943 * 0 - Never generate Pause frames (default).
4944 * 1 - Generate Pause frames according to Rx buffer threshold.
4951 * 0 - Never generate Pause frames.
4952 * 1 - Generate Pause frames according to Rx buffer threshold.
4958 * Priority based flow control policy on Tx[7:0]. Per-priority bit mask:
4959 * 0 - Never generate priority Pause frames on the specified priority
4961 * 1 - Generate priority Pause frames according to Rx buffer threshold on
4971 * 0 - Ignore received Pause frames (default).
4972 * 1 - Respect received Pause frames.
4979 * 0 - Ignore received Pause frames.
4980 * 1 - Respect received Pause frames.
4986 * Priority based flow control policy on Rx[7:0]. Per-priority bit mask:
4987 * 0 - Ignore incoming priority Pause frames on the specified priority
4989 * 1 - Respect incoming priority Pause frames on the specified priority.
5010 /* PPCNT - Ports Performance Counters Register
5011 * -------------------------------------------
5039 * 0 - Local port number
5040 * 1 - IB port number
5093 * Priority for counter set that support per priority, valid values: 0-7.
5095 * valid values: 0- cap_max_tclass-1 .
5494 * The number of unicast packets dropped due to lack of shared
5529 /* PPTB - Port Prio To Buffer Register
5530 * -----------------------------------
5546 * 0 - Map both unicast and multicast packets to the same buffer.
5547 * 1 - Map only unicast packets.
5548 * 2 - Map only multicast packets.
5551 * Note: SwitchX-2 only supports the first option.
5592 * Note: In SwitchX-2 this field must be mapped to buffer 8. Reserved for
5622 /* PBMC - Port Buffer Management Control Register
5623 * ----------------------------------------------
5640 * timer (time for the peer port to pause in quota-512 bit time).
5647 * state. Using the same units as xoff_timer_value above (in quota-512 bit
5657 * 0 - Lossless
5658 * 1 - Lossy
5732 /* PSPA - Port Switch Partition Allocation
5733 * ---------------------------------------
5769 /* PMAOS - Ports Module Administrative and Operational Status
5770 * ----------------------------------------------------------
5780 * Note: Setting reset while module is plugged-in will result in transition to
5851 /* PPLR - Port Physical Loopback Register
5852 * --------------------------------------
5887 /* PMTDB - Port Module To local DataBase Register
5888 * ----------------------------------------------
5889 * The PMTDB register allows to query the possible module<->local port
5950 /* PMECR - Ports Mapping Event Configuration Register
5951 * --------------------------------------------------
5984 * (if applicable according to e configuration). This is supplementary
6013 /* PMPE - Port Module Plug/Unplug Event Register
6014 * ---------------------------------------------
6057 /* PDDR - Port Diagnostics Database Register
6058 * -----------------------------------------
6107 /* PMMP - Port Module Memory Map Properties Register
6108 * -------------------------------------------------
6130 * When set, will keep eeprom_override values after plug-out event.
6137 * 0 - Allow write
6138 * 1 - Ignore write
6163 /* PLLP - Port Local port to Label Port mapping Register
6164 * -----------------------------------------------------
6210 /* PMTM - Port Module Type Mapping Register
6211 * ----------------------------------------
6262 /* HTGT - Host Trap Group Table
6263 * ----------------------------
6320 MLXSW_REG_HTGT_TRAP_GROUP_MAX = __MLXSW_REG_HTGT_TRAP_GROUP_MAX - 1
6354 * 0 - Trap to CPU.
6355 * 1 - Trap to CPU and mirror to a mirroring agent.
6356 * 2 - Mirror to a mirroring agent and do not trap to CPU.
6376 * Supported values are 0-7, with 7 represnting the highest priority.
6379 * Note: In SwitchX-2 this field is ignored and the priority value is replaced
6427 /* HPKT - Host Packet Trap
6428 * -----------------------
6464 * 0 - No action. Forward to CPU based on switching rules.
6465 * 1 - Trap to CPU (CPU receives sole copy).
6466 * 2 - Mirror to CPU (CPU receives a replica of the packet).
6467 * 3 - Discard.
6468 * 4 - Soft discard (allow other traps to act on the packet).
6469 * 5 - Trap and soft discard (allow other traps to overwrite this trap).
6470 * 6 - Trap to CPU (CPU receives sole copy) and count it as error.
6471 * 15 - Restore the firmware's default action.
6502 * Ignored by SwitchX-2.
6503 * 0 - Keep factory defaults.
6504 * 1 - Do not use control buffer for this trap ID.
6505 * 2 - Use control buffer for this trap ID.
6524 /* RGCR - Router General Configuration Register
6525 * --------------------------------------------
6554 * 0 - Preserve the value of Switch Priority and packet color.
6555 * 1 - Recalculate the value of Switch Priority and packet color.
6558 * Note: Not supported by SwitchX and SwitchX-2.
6564 * 0 - Preserve the value of pcp_rewrite_en.
6565 * 2 - Disable PCP rewrite.
6566 * 3 - Enable PCP rewrite.
6569 * Note: Not supported by SwitchX and SwitchX-2.
6575 * 0 - Activity will be set when an entry is hit (default).
6576 * 1 - Activity will not be set when an entry is hit.
6578 * Bit 0 - Disable activity bit in Router Algorithmic LPM Unicast Entry
6580 * Bit 1 - Disable activity bit in Router Algorithmic LPM Unicast Host
6585 * Note: Not supported by SwitchX, SwitchX-2 and Switch-IB.
6597 /* RITR - Router Interface Table Register
6598 * --------------------------------------
6643 /* Sub-port interface. */
6662 * 0 - Create or edit RIF.
6663 * 1 - Delete RIF.
6664 * Reserved for SwitchX-2. For Spectrum, editing of interface properties
6665 * is not supported. An interface must be deleted and re-created in order
6681 * Not supported in SwitchX-2.
6690 * Not supported in SwitchX-2.
6712 * Loop-back filter enable for unicast packets.
6713 * If the flag is set then loop-back filter for unicast packets is
6715 * loop-back filtering.
6753 * Note: Reserved for RIF types other than VLAN, FID and Sub-port.
6760 * Note: Reserved for RIF types other than VLAN, FID and Sub-port.
6778 * Note: Reserved when legacy bridge model is used and on Spectrum-1.
6793 /* Sub-port Interface */
6811 * Used to connect the eRIF to a bridge if eRIF-ACL has modified the DMAC or
6828 /* IPinIP IPv4 underlay Unicast */
6830 /* IPinIP IPv6 underlay Unicast */
6832 /* IPinIP generic - used for Spectrum-2 underlay RIF */
6868 * Range is 0..cap_max_virtual_routers-1.
6869 * Reserved for Spectrum-2.
6900 * - Error and Discard counters.
6901 * - Unicast, Multicast and Broadcast counters. Sharing the
7052 /* RTAR - Router TCAM Allocation Register
7053 * --------------------------------------
7103 /* RATR - Router Adjacency Table Register
7104 * --------------------------------------
7105 * The RATR register is used to configure the Router Adjacency (next-hop)
7122 * direct feedback if the write has succeeded or not, however
7152 * Activity. Set for new entries. Set if a packet lookup has hit on
7161 /* IPoIB Unicast without GRH.
7165 /* IPoIB Unicast with GRH. Supported only in table 0 (Ethernet unicast
7175 * Reserved for SwitchX/-2.
7179 * Reserved for SwitchX/-2.
7192 * For SwitchX and SwitchX-2, the adjacency table is linear and
7200 * Range is 0 .. cap_max_router_interfaces - 1
7232 * Trap-ID is RTR_EGRESS0 or RTR_EGRESS1.
7239 * MAC address of the destination next-hop.
7340 /* RDPM - Router DSCP to Priority Mapping
7341 * --------------------------------------
7350 MLXSW_REG_RDPM_LEN - \
7360 -MLXSW_REG_RDPM_DSCP_ENTRY_REC_LEN, 0x00, false);
7367 -MLXSW_REG_RDPM_DSCP_ENTRY_REC_LEN, 0x00, false);
7376 /* RICNT - Router Interface Counter Register
7377 * -----------------------------------------
7395 * - Error and Discard counters.
7396 * - Unicast, Multicast and Broadcast counters. Sharing the
7425 * good unicast packets.
7444 * for good unicast frames.
7470 * A count of non-errored frames that do not pass the router checks.
7484 * for non-errored frames that do not pass the router checks.
7499 /* RRCR - Router Rules Copy Register Layout
7500 * ----------------------------------------
7558 /* RALTA - Router Algorithmic LPM Tree Allocation Register
7559 * -------------------------------------------------------
7569 * 0 - allocate a tree
7570 * 1 - deallocate a tree
7588 * An identifier (numbered from 1..cap_shspm_max_trees-1) representing
7590 * Note that tree_id 0 is allocated for a default-route tree.
7605 /* RALST - Router Algorithmic LPM Structure Tree Register
7606 * ------------------------------------------------------
7622 * For a default-route tree configure 0xff
7628 * Tree identifier numbered from 1..(cap_shspm_max_trees-1).
7640 * Note that tree_id 0 is allocated for a default-route tree, bins are 0xff
7648 * Note that tree_id 0 is allocated for a default-route tree, bins are 0xff
7670 int bin_index = bin_number - 1; in mlxsw_reg_ralst_bin_pack()
7677 /* RALTB - Router Algorithmic LPM Tree Binding Register
7678 * ----------------------------------------------------
7688 * Range is 0..cap_max_virtual_routers-1
7701 * Tree identifier numbered from 1..(cap_shspm_max_trees-1).
7702 * By default, all Unicast IPv4 and IPv6 are bound to tree_id 0.
7717 /* RALUE - Router Algorithmic LPM Unicast Entry Register
7718 * -----------------------------------------------------
7720 * the Unicast protocols.
7767 * Activity. Set for new entries. Set if a packet lookup has hit on the
7777 * Range is 0..cap_max_virtual_routers-1
7789 * This field is valid for update opcode, otherwise - reserved.
7822 * Note - for Marker entries, the action_type and action fields are reserved.
7847 * on a remote subnet connected through a next-hop router,
7878 * Points to the first entry of the group-based ECMP.
7887 * The valid range is 1-64, 512, 1024, 2048 and 4096.
7997 /* RAUHT - Router Algorithmic LPM Unicast Host Table Register
7998 * ----------------------------------------------------------
7999 * The RAUHT register is used to configure and query the Unicast Host table in
8049 * Activity. Set for new entries. Set if a packet lookup has hit on
8090 * Trap-ID is RTR_EGRESS0 or RTR_EGRESS1.
8150 /* RALEU - Router Algorithmic LPM ECMP Update Register
8151 * ---------------------------------------------------
8153 * LPM Unicast entries in a single operation. The update is executed to
8169 * Range is 0..cap_max_virtual_routers-1
8214 /* RAUHTD - Router Algorithmic LPM Unicast Host Table Dump Register
8215 * ----------------------------------------------------------------
8216 * The RAUHTD register allows dumping entries from the Router Unicast Host
8221 * or the last session if a new session has not started.
8239 * Bit0 - filter by activity: entry_a
8240 * Bit3 - filter by entry rip: entry_rif
8258 * For IPv4, each record has 4 entries at request and up to 4 entries
8266 * Dump only if activity has value of entry_a
8279 * 0 - IPv4
8280 * 1 - IPv6
8286 * Dump only if RIF has value of entry_rif
8305 * 0 - 1 valid entry
8306 * 1 - 2 valid entries
8307 * 2 - 3 valid entries
8308 * 3 - 4 valid entries
8317 * 0 - IPv4
8318 * 1 - IPv6
8327 * Activity. Set for new entries. Set if a packet lookup has hit on the
8351 * Activity. Set for new entries. Set if a packet lookup has hit on the
8388 /* RTDP - Routing Tunnel Decap Properties Register
8389 * -----------------------------------------------
8418 * Valid range is from 0 to cap_max_router_interfaces - 1
8467 * - A packet received as IPinIP (without GRE) will always pass.
8468 * - A packet received as IPinGREinIP without a key will not pass the check.
8469 * - A packet received as IPinGREinIP with a key will pass the check only if the
8543 /* RIPS - Router IP version Six Register
8544 * -------------------------------------
8574 /* RATRAD - Router Adjacency Table Activity Dump Register
8575 * ------------------------------------------------------
8599 * Spectrum-1: 32-64, 512, 1024, 2048, 4096
8600 * Spectrum-2/3: 32-128, 256, 512, 1024, 2048, 4096
8628 /* RIGR-V2 - Router Interface Group Register Version 2
8629 * ---------------------------------------------------
8667 * Range 0 .. max_mid - 1
8676 * Note that low-entries must be set if high-entries are set. For
8679 * Index can be from 0 to cap_mc_erif_list_entries-1
8686 * Valid range is from 0 to cap_max_router_interfaces - 1
8687 * Index can be from 0 to MLXSW_REG_RIGR2_MAX_ERIFS - 1
8710 /* RECR-V2 - Router ECMP Configuration Version 2 Register
8711 * ------------------------------------------------------
8719 * Per-port configuration
8845 /* RMFT-V2 - Router Multicast Forwarding Table Version 2 Register
8846 * --------------------------------------------------------------
8874 * entries - Note write with v (Valid) 0 will delete the entry.
8888 * Activity. Set for new entries. Set if a packet lookup has hit on the specific
8901 * Virtual Router ID. Range from 0..cap_max_virtual_routers-1
8955 * action-set pointed from here are as follows:
9016 /* REIV - Router Egress Interface to VID Register
9017 * ----------------------------------------------
9018 * The REIV register maps {eRIF, egress_port} -> VID.
9021 * (for unicast/multicast/port-base multicast), regardless of eRIF type and
9022 * regardless of bridge decisions (e.g. SFD for unicast or SMPE).
9038 * Port page - elport_record[0] is 256*port_page.
9045 * Range is 0..cap_max_router_interfaces-1.
9052 * 0 - Do not update the entry.
9053 * 1 - Update the entry.
9074 /* MFCR - Management Fan Control Register
9075 * --------------------------------------
9134 /* MFSC - Management Fan Speed Control Register
9135 * --------------------------------------------
9164 /* MFSM - Management Fan Speed Measurement
9165 * ---------------------------------------
9192 /* MFSL - Management Fan Speed Limit Register
9193 * ------------------------------------------
9196 * defined for both under-speed and over-speed.
9240 /* FORE - Fan Out of Range Event Register
9241 * --------------------------------------
9269 /* MTCAP - Management Temperature Capabilities
9270 * -------------------------------------------
9286 /* MTMP - Management Temperature
9287 * -----------------------------
9307 * 64-127 of sensor_index are mapped to the SFP+/QSFP modules sequentially
9335 * Max Temperature Enable - enables measuring the max temperature on a sensor.
9341 * Max Temperature Reset - clears the value of the max temperature register.
9355 * 0 - Do not generate event
9356 * 1 - Generate event
9357 * 2 - Generate single event
9432 /* MTWE - Management Temperature Warning Event
9433 * -------------------------------------------
9449 /* MTBR - Management Temperature Bulk Register
9450 * -------------------------------------------
9470 * Base sensors index to access (0 - ASIC sensor, 1-63 - ambient sensors,
9471 * 64-127 are mapped to the SFP+/QSFP modules sequentially).
9530 /* MCIA - Management Cable Info Access
9531 * -----------------------------------
9651 /* This is used to access the optional upper pages (1-3) in the QSFP+
9652 * memory map. Page 1 is available on offset 256 through 383, page 2 -
9653 * on offset 384 through 511, page 3 - on offset 512 through 639.
9655 #define MLXSW_REG_MCIA_PAGE_GET(off) (((off) - \
9674 /* MPAT - Monitoring Port Analyzer Table
9675 * -------------------------------------
9711 * 0: CONFIGURED - QoS parameters (Switch Priority, and encapsulation
9713 * 1: MAINTAIN - QoS parameters (Switch Priority, Color) are the
9714 * same as in the original packet that has triggered the mirroring. For
9766 /* Remote SPAN - Ethernet VLAN
9767 * - - - - - - - - - - - - - -
9776 /* Encapsulated Remote SPAN - Ethernet L2
9777 * - - - - - - - - - - - - - - - - - - -
9802 /* Encapsulated Remote SPAN - Ethernet L3
9803 * - - - - - - - - - - - - - - - - - - -
9818 * Encapsulation header Time-to-Live/HopLimit.
9898 /* MPAR - Monitoring Port Analyzer Register
9899 * ----------------------------------------
9944 * Reserved when Spectrum-1.
9962 /* MGIR - Management General Information Register
9963 * ----------------------------------------------
10016 /* MRSR - Management Reset and Shutdown Register
10017 * ---------------------------------------------
10028 * 0 - do nothing
10029 * 1 - software reset
10040 /* MLCR - Management LED Control Register
10041 * --------------------------------------
10059 * 0x0 - Will turn off the beacon.
10060 * 0xFFFF - Will turn on the beacon until explicitly turned off.
10081 /* MCION - Management Cable IO and Notifications Register
10082 * ------------------------------------------------------
10121 /* MTPPS - Management Pulse Per Second Register
10122 * --------------------------------------------
10178 /* MTUTC - Management UTC Register
10179 * -------------------------------
10203 * 10^9 HW clocks for 1 HW second. Range is from -50,000,000 to +50,000,000.
10204 * In Spectrum-2, the field is reversed, positive values mean to decrease the
10220 * Range 0..(10^9-1)
10222 * Reserved on Spectrum-1.
10230 * Range is from -32768 to +32767.
10232 * Reserved on Spectrum-1.
10249 /* MCQI - Management Component Query Information
10250 * ---------------------------------------------
10332 /* MCC - Management Component Control
10333 * ----------------------------------
10414 /* MCDA - Management Component Data Access
10415 * ---------------------------------------
10465 /* MPSC - Monitoring Packet Sampling Configuration Register
10466 * --------------------------------------------------------
10505 /* MGPC - Monitoring General Purpose Counter Set Register
10560 /* MPRS - Monitoring Parsing State Register
10561 * ----------------------------------------
10563 * policy-engine and routing.
10573 * rules, traps, hash, etc. Default is 96 bytes. Reserved when SwitchX-2.
10580 * Bit 0 - Enable parsing of NVE of types VxLAN, VxLAN-GPE, GENEVE and
10581 * NVGRE. Default is enabled. Reserved when SwitchX-2.
10603 /* MOGCR - Monitoring Global Configuration Register
10604 * ------------------------------------------------
10615 * Reserved when IB switches and when SwitchX/-2, Spectrum-2
10624 * Reserved when IB switches and when SwitchX/-2, Spectrum-2
10632 * Reserved when SwitchX/-2, Switch-IB/2, Spectrum-1 and Quantum.
10637 /* MPAGR - Monitoring Port Analyzer Global Register
10638 * ------------------------------------------------
10640 * Note: This register is not supported by current FW versions for Spectrum-1.
10690 /* MOMTE - Monitoring Mirror Trigger Enable Register
10691 * -------------------------------------------------
10739 /* MTPPPC - Time Precision Packet Port Configuration
10740 * -------------------------------------------------
10744 * Reserved when Spectrum-2.
10776 /* MTPPTR - Time Precision Packet Timestamping Reading
10777 * ---------------------------------------------------
10783 * Reserved when Spectrum-2.
10851 * Timestamp of when the PTP packet has passed through the port Units of PLL
10853 * For Spectrum-1 the PLL clock is 156.25Mhz and PLL clock time is 6.4nSec.
10885 /* MTPTPT - Monitoring Precision Time Protocol Trap Register
10886 * ---------------------------------------------------------
10908 * non-sufficient condition since need to enable also per port. See MTPPPC.
10923 /* MTPCPC - Monitoring Time Precision Correction Port Configuration Register
10924 * -------------------------------------------------------------------------
10933 * 0: config is global. When reading - the local_port is 1.
10955 * Bitwise vector of PTP message types to update correction-field at ingress.
10964 * Bitwise vector of PTP message types to update correction-field at egress.
10984 /* MFGD - Monitoring FW General Debug Register
10985 * -------------------------------------------
10993 * 0 - don't check FW fatal (default)
10994 * 1 - check FW fatal - enable MFDE trap
11004 /* MGPIR - Management General Peripheral Information Register
11005 * ----------------------------------------------------------
11085 /* MBCT - Management Binary Code Transfer Register
11086 * -----------------------------------------------
11128 * was executed and the fsm_state has changed.
11140 /* Error - trying to erase INI while it being used. */
11206 /* MDDT - Management DownStream Device Tunneling Register
11207 * ------------------------------------------------------
11229 * Read size in D-Words.
11235 * Write size in D-Words.
11280 int len = reg->len + MLXSW_REG_MDDT_PRM_REGISTER_HEADER_LEN; in mlxsw_reg_mddt_pack()
11283 len = MLXSW_REG_MDDT_LEN - MLXSW_REG_MDDT_PAYLOAD_OFFSET; in mlxsw_reg_mddt_pack()
11289 mlxsw_reg_mddt_register_id_set(payload, reg->id); in mlxsw_reg_mddt_pack()
11295 /* MDDQ - Management DownStream Device Query Register
11296 * --------------------------------------------------
11364 * can be sent from the switch ASIC to the line-card CPLD over Shift-Register.
11383 * If set, the FW has completed the MDDC.device_enable command.
11389 * Major user-configured version number of the current INI file.
11396 * User-configured version number of the current INI file.
11468 * Sub-minor FW version number.
11519 /* MDDC - Management DownStream Device Control Register
11520 * ----------------------------------------------------
11555 /* MFDE - Monitoring FW Debug Register
11556 * -----------------------------------
11630 * EMAD - register id, MAD - attibute id
11642 * 0 - New event
11643 * 1 - Old event, occurred before MFGD activation.
11661 * 0 - New event
11662 * 1 - Old event, occurred before MFGD activation.
11673 /* reg_mfde_fw_assert_var0-4
11696 * 0 - New event
11697 * 1 - Old event, occurred before MFGD activation.
11716 * A generated one-to-one identifier which is specific per-assert.
11740 /* TNGCR - Tunneling NVE General Configuration Register
11741 * ----------------------------------------------------
11771 * The TTL for NVE tunnel encapsulation underlay unicast packets.
11799 /* Flow label is static. In Spectrum this means '0'. Spectrum-2
11837 * Spectrum uses LAG hash (SLCRv2). Spectrum-2 uses ECMP hash (RECRv2).
11874 * Reserved when Spectrum-2. See TNPC.
11881 * Reserved when Spectrum-2.
11924 /* TNUMT - Tunneling NVE Underlay Multicast Table Register
11925 * -------------------------------------------------------
12007 /* TNQCR - Tunneling NVE QoS Configuration Register
12008 * ------------------------------------------------
12019 * 0 - Copy the DSCP from the overlay (inner) IP header to the underlay
12021 * 1 - Set the DSCP field as TNQDR.dscp
12032 /* TNQDR - Tunneling NVE QoS Default Register
12033 * ------------------------------------------
12061 /* TNEEM - Tunneling NVE Encapsulation ECN Mapping Register
12062 * --------------------------------------------------------
12091 /* TNDEM - Tunneling NVE Decapsulation ECN Mapping Register
12092 * --------------------------------------------------------
12122 * 0 - No trap due to decap ECN
12123 * 1 - Trap enable with trap_id
12147 /* TNPC - Tunnel Port Configuration Register
12148 * -----------------------------------------
12185 /* TIGCR - Tunneling IPinIP General Configuration Register
12186 * -------------------------------------------------------
12202 * The TTL for IPinIP Tunnel encapsulation of unicast packets if
12215 /* TIEEM - Tunneling IPinIP Encapsulation ECN Mapping Register
12216 * -----------------------------------------------------------
12245 /* TIDEM - Tunneling IPinIP Decapsulation ECN Mapping Register
12246 * -----------------------------------------------------------
12276 * 0 - No trap due to decap ECN
12277 * 1 - Trap enable with trap_id
12301 /* SBPR - Shared Buffer Pools Register
12302 * -----------------------------------
12371 /* SBCM - Shared Buffer Class Management Register
12372 * ----------------------------------------------
12374 * and configuration according to Port-PG, including the binding to pool
12391 * PG buffer - Port PG (dir=ingress) / traffic class (dir=egress)
12392 * For PG buffer: range is 0..cap_max_pg_buffers - 1
12393 * For traffic class: range is 0..cap_max_tclass - 1
12423 * When the pool associated to the port-pg/tclass is configured to
12425 * When the pool associated to the port-pg/tclass is configured to
12429 * i: (1/128)*2^(i-1), for i=1..14
12437 * Association of the port-priority to a pool.
12457 /* SBPM - Shared Buffer Port Management Register
12458 * ---------------------------------------------
12460 * and configuration according to Port-Pool, including the definition
12516 * When the pool associated to the port-pg/tclass is configured to
12518 * When the pool associated to the port-pg/tclass is configured to
12522 * i: (1/128)*2^(i-1), for i=1..14
12548 /* SBMM - Shared Buffer Multicast Management Register
12549 * --------------------------------------------------
12551 * and configuration for MC packets according to Switch-Priority, including
12572 * When the pool associated to the port-pg/tclass is configured to
12574 * When the pool associated to the port-pg/tclass is configured to
12578 * i: (1/128)*2^(i-1), for i=1..14
12585 * Association of the port-priority to a pool.
12600 /* SBSR - Shared Buffer Status Register
12601 * ------------------------------------
12603 * Port-Pool. Note that this register enables reading a large amount of data.
12650 * Range is 0..cap_max_pg_buffers - 1
12669 * Range is 0..cap_max_tclass - 1
12705 /* SBIB - Shared Buffer Internal Buffer Register
12706 * ---------------------------------------------
12727 * Allowed range is 0 to (cap_max_headroom_size - 1)
12901 if (reg_info->id == reg_id) in mlxsw_reg_id_str()
12902 return reg_info->name; in mlxsw_reg_id_str()
12907 /* PUDE - Port Up / Down Event
12908 * ---------------------------
12927 * 1 - Up.
12928 * 2 - Down.
12929 * 3 - Up once. This means that in case of link failure, the port won't go
12930 * into polling mode, but will wait to be re-enabled by software.
12931 * 4 - Disabled by system. Can only be set by hardware.
12938 * 1 - Up.
12939 * 2 - Down.
12940 * 3 - Down by port failure. This means that the device will not let the