Skip to content

Commit 89e4198

Browse files
pmachatadavem330
authored andcommitted
mlxsw: reg: Give mlxsw_reg_ratr_pack a type parameter
To support IPIP, the driver needs to be able to construct an IPIP adjacency. Change mlxsw_reg_ratr_pack to take an adjacency type as an argument. Adjust the one existing caller. Signed-off-by: Petr Machata <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9571e82 commit 89e4198

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/net/ethernet/mellanox/mlxsw/reg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4483,11 +4483,13 @@ MLXSW_ITEM32(reg, ratr, ipip_ipv6_ptr, 0x1C, 0, 24);
44834483
static inline void
44844484
mlxsw_reg_ratr_pack(char *payload,
44854485
enum mlxsw_reg_ratr_op op, bool valid,
4486+
enum mlxsw_reg_ratr_type type,
44864487
u32 adjacency_index, u16 egress_rif)
44874488
{
44884489
MLXSW_REG_ZERO(ratr, payload);
44894490
mlxsw_reg_ratr_op_set(payload, op);
44904491
mlxsw_reg_ratr_v_set(payload, valid);
4492+
mlxsw_reg_ratr_type_set(payload, type);
44914493
mlxsw_reg_ratr_adjacency_index_low_set(payload, adjacency_index);
44924494
mlxsw_reg_ratr_adjacency_index_high_set(payload, adjacency_index >> 16);
44934495
mlxsw_reg_ratr_egress_router_interface_set(payload, egress_rif);

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1928,7 +1928,8 @@ static int mlxsw_sp_nexthop_mac_update(struct mlxsw_sp *mlxsw_sp, u32 adj_index,
19281928
char ratr_pl[MLXSW_REG_RATR_LEN];
19291929

19301930
mlxsw_reg_ratr_pack(ratr_pl, MLXSW_REG_RATR_OP_WRITE_WRITE_ENTRY,
1931-
true, adj_index, neigh_entry->rif);
1931+
true, MLXSW_REG_RATR_TYPE_ETHERNET,
1932+
adj_index, neigh_entry->rif);
19321933
mlxsw_reg_ratr_eth_entry_pack(ratr_pl, neigh_entry->ha);
19331934
return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ratr), ratr_pl);
19341935
}

0 commit comments

Comments
 (0)