Skip to content

Commit 3faf6ed

Browse files
committed
Merge branch 'mlxsw-fixes'
Ido Schimmel says: ==================== mlxsw: Couple of fixes This patch set contains two fixes for mlxsw. Please consider both for stable. Patch #1 from Amit fixes a wrong check during MAC validation when creating router interfaces (RIFs). Given a particular order of configuration this can result in the driver refusing to create new RIFs. Patch #2 fixes a wrong trap configuration in which VRRP packets and routing exceptions were policed by the same policer towards the CPU. In certain situations this can prevent VRRP packets from reaching the CPU. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents bd6f485 + acca789 commit 3faf6ed

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5472,6 +5472,7 @@ enum mlxsw_reg_htgt_trap_group {
54725472
MLXSW_REG_HTGT_TRAP_GROUP_SP_LBERROR,
54735473
MLXSW_REG_HTGT_TRAP_GROUP_SP_PTP0,
54745474
MLXSW_REG_HTGT_TRAP_GROUP_SP_PTP1,
5475+
MLXSW_REG_HTGT_TRAP_GROUP_SP_VRRP,
54755476

54765477
__MLXSW_REG_HTGT_TRAP_GROUP_MAX,
54775478
MLXSW_REG_HTGT_TRAP_GROUP_MAX = __MLXSW_REG_HTGT_TRAP_GROUP_MAX - 1

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4542,8 +4542,8 @@ static const struct mlxsw_listener mlxsw_sp_listener[] = {
45424542
MLXSW_SP_RXL_MARK(ROUTER_ALERT_IPV6, TRAP_TO_CPU, ROUTER_EXP, false),
45434543
MLXSW_SP_RXL_MARK(IPIP_DECAP_ERROR, TRAP_TO_CPU, ROUTER_EXP, false),
45444544
MLXSW_SP_RXL_MARK(DECAP_ECN0, TRAP_TO_CPU, ROUTER_EXP, false),
4545-
MLXSW_SP_RXL_MARK(IPV4_VRRP, TRAP_TO_CPU, ROUTER_EXP, false),
4546-
MLXSW_SP_RXL_MARK(IPV6_VRRP, TRAP_TO_CPU, ROUTER_EXP, false),
4545+
MLXSW_SP_RXL_MARK(IPV4_VRRP, TRAP_TO_CPU, VRRP, false),
4546+
MLXSW_SP_RXL_MARK(IPV6_VRRP, TRAP_TO_CPU, VRRP, false),
45474547
/* PKT Sample trap */
45484548
MLXSW_RXL(mlxsw_sp_rx_listener_sample_func, PKT_SAMPLE, MIRROR_TO_CPU,
45494549
false, SP_IP2ME, DISCARD),
@@ -4626,6 +4626,10 @@ static int mlxsw_sp_cpu_policers_set(struct mlxsw_core *mlxsw_core)
46264626
rate = 19 * 1024;
46274627
burst_size = 12;
46284628
break;
4629+
case MLXSW_REG_HTGT_TRAP_GROUP_SP_VRRP:
4630+
rate = 360;
4631+
burst_size = 7;
4632+
break;
46294633
default:
46304634
continue;
46314635
}
@@ -4665,6 +4669,7 @@ static int mlxsw_sp_trap_groups_set(struct mlxsw_core *mlxsw_core)
46654669
case MLXSW_REG_HTGT_TRAP_GROUP_SP_OSPF:
46664670
case MLXSW_REG_HTGT_TRAP_GROUP_SP_PIM:
46674671
case MLXSW_REG_HTGT_TRAP_GROUP_SP_PTP0:
4672+
case MLXSW_REG_HTGT_TRAP_GROUP_SP_VRRP:
46684673
priority = 5;
46694674
tc = 5;
46704675
break;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7079,6 +7079,9 @@ static int mlxsw_sp_router_port_check_rif_addr(struct mlxsw_sp *mlxsw_sp,
70797079

70807080
for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); i++) {
70817081
rif = mlxsw_sp->router->rifs[i];
7082+
if (rif && rif->ops &&
7083+
rif->ops->type == MLXSW_SP_RIF_TYPE_IPIP_LB)
7084+
continue;
70827085
if (rif && rif->dev && rif->dev != dev &&
70837086
!ether_addr_equal_masked(rif->dev->dev_addr, dev_addr,
70847087
mlxsw_sp->mac_mask)) {

0 commit comments

Comments
 (0)