aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/reg.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index a2d7870ea60e..0cc148566677 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -4154,6 +4154,73 @@ static inline void mlxsw_reg_rauht_pack4(char *payload,
4154 mlxsw_reg_rauht_dip4_set(payload, dip); 4154 mlxsw_reg_rauht_dip4_set(payload, dip);
4155} 4155}
4156 4156
4157/* RALEU - Router Algorithmic LPM ECMP Update Register
4158 * ---------------------------------------------------
4159 * The register enables updating the ECMP section in the action for multiple
4160 * LPM Unicast entries in a single operation. The update is executed to
4161 * all entries of a {virtual router, protocol} tuple using the same ECMP group.
4162 */
4163#define MLXSW_REG_RALEU_ID 0x8015
4164#define MLXSW_REG_RALEU_LEN 0x28
4165
4166static const struct mlxsw_reg_info mlxsw_reg_raleu = {
4167 .id = MLXSW_REG_RALEU_ID,
4168 .len = MLXSW_REG_RALEU_LEN,
4169};
4170
4171/* reg_raleu_protocol
4172 * Protocol.
4173 * Access: Index
4174 */
4175MLXSW_ITEM32(reg, raleu, protocol, 0x00, 24, 4);
4176
4177/* reg_raleu_virtual_router
4178 * Virtual Router ID
4179 * Range is 0..cap_max_virtual_routers-1
4180 * Access: Index
4181 */
4182MLXSW_ITEM32(reg, raleu, virtual_router, 0x00, 0, 16);
4183
4184/* reg_raleu_adjacency_index
4185 * Adjacency Index used for matching on the existing entries.
4186 * Access: Index
4187 */
4188MLXSW_ITEM32(reg, raleu, adjacency_index, 0x10, 0, 24);
4189
4190/* reg_raleu_ecmp_size
4191 * ECMP Size used for matching on the existing entries.
4192 * Access: Index
4193 */
4194MLXSW_ITEM32(reg, raleu, ecmp_size, 0x14, 0, 13);
4195
4196/* reg_raleu_new_adjacency_index
4197 * New Adjacency Index.
4198 * Access: WO
4199 */
4200MLXSW_ITEM32(reg, raleu, new_adjacency_index, 0x20, 0, 24);
4201
4202/* reg_raleu_new_ecmp_size
4203 * New ECMP Size.
4204 * Access: WO
4205 */
4206MLXSW_ITEM32(reg, raleu, new_ecmp_size, 0x24, 0, 13);
4207
4208static inline void mlxsw_reg_raleu_pack(char *payload,
4209 enum mlxsw_reg_ralxx_protocol protocol,
4210 u16 virtual_router,
4211 u32 adjacency_index, u16 ecmp_size,
4212 u32 new_adjacency_index,
4213 u16 new_ecmp_size)
4214{
4215 MLXSW_REG_ZERO(raleu, payload);
4216 mlxsw_reg_raleu_protocol_set(payload, protocol);
4217 mlxsw_reg_raleu_virtual_router_set(payload, virtual_router);
4218 mlxsw_reg_raleu_adjacency_index_set(payload, adjacency_index);
4219 mlxsw_reg_raleu_ecmp_size_set(payload, ecmp_size);
4220 mlxsw_reg_raleu_new_adjacency_index_set(payload, new_adjacency_index);
4221 mlxsw_reg_raleu_new_ecmp_size_set(payload, new_ecmp_size);
4222}
4223
4157/* RAUHTD - Router Algorithmic LPM Unicast Host Table Dump Register 4224/* RAUHTD - Router Algorithmic LPM Unicast Host Table Dump Register
4158 * ---------------------------------------------------------------- 4225 * ----------------------------------------------------------------
4159 * The RAUHTD register allows dumping entries from the Router Unicast Host 4226 * The RAUHTD register allows dumping entries from the Router Unicast Host
@@ -5053,6 +5120,8 @@ static inline const char *mlxsw_reg_id_str(u16 reg_id)
5053 return "RALUE"; 5120 return "RALUE";
5054 case MLXSW_REG_RAUHT_ID: 5121 case MLXSW_REG_RAUHT_ID:
5055 return "RAUHT"; 5122 return "RAUHT";
5123 case MLXSW_REG_RALEU_ID:
5124 return "RALEU";
5056 case MLXSW_REG_RAUHTD_ID: 5125 case MLXSW_REG_RAUHTD_ID:
5057 return "RAUHTD"; 5126 return "RAUHTD";
5058 case MLXSW_REG_MFCR_ID: 5127 case MLXSW_REG_MFCR_ID: