mlxsw: spectrum_router: Enable IPv6 router
Before we add IPv6 constructs like traps and router interfaces, we first need to enable IPv6 routing in the device. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
7f81ff0402
Коммит
e29237e7bb
|
@ -3953,10 +3953,12 @@ MLXSW_ITEM32(reg, rgcr, pcp_rw, 0x18, 16, 2);
|
|||
*/
|
||||
MLXSW_ITEM32(reg, rgcr, activity_dis, 0x20, 0, 8);
|
||||
|
||||
static inline void mlxsw_reg_rgcr_pack(char *payload, bool ipv4_en)
|
||||
static inline void mlxsw_reg_rgcr_pack(char *payload, bool ipv4_en,
|
||||
bool ipv6_en)
|
||||
{
|
||||
MLXSW_REG_ZERO(rgcr, payload);
|
||||
mlxsw_reg_rgcr_ipv4_en_set(payload, ipv4_en);
|
||||
mlxsw_reg_rgcr_ipv6_en_set(payload, ipv6_en);
|
||||
}
|
||||
|
||||
/* RITR - Router Interface Table Register
|
||||
|
|
|
@ -3697,7 +3697,7 @@ static int __mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp)
|
|||
return -EIO;
|
||||
max_rifs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS);
|
||||
|
||||
mlxsw_reg_rgcr_pack(rgcr_pl, true);
|
||||
mlxsw_reg_rgcr_pack(rgcr_pl, true, true);
|
||||
mlxsw_reg_rgcr_max_router_interfaces_set(rgcr_pl, max_rifs);
|
||||
err = mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(rgcr), rgcr_pl);
|
||||
if (err)
|
||||
|
@ -3709,7 +3709,7 @@ static void __mlxsw_sp_router_fini(struct mlxsw_sp *mlxsw_sp)
|
|||
{
|
||||
char rgcr_pl[MLXSW_REG_RGCR_LEN];
|
||||
|
||||
mlxsw_reg_rgcr_pack(rgcr_pl, false);
|
||||
mlxsw_reg_rgcr_pack(rgcr_pl, false, false);
|
||||
mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(rgcr), rgcr_pl);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче