Skip to contentSkip to conversation

mlxsw: spectrum_router: Don't log an error on missing neighbor

PATCH In review Jiri Pirko 2 participants 2 messages Jan 24, 2018

Subsystems (3)
lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

PATCH 1/1 mlxsw: spectrum_router: Don't log an error on missing neighbor

From: Yuval Mintz <[email protected]>

Driver periodically samples all neighbors configured in device in order to update the kernel regarding their state. When finding an entry configured in HW that doesn't show in neigh_lookup() driver logs an error message.
This introduces a race when removing multiple neighbors - it's possible that a given entry would still be configured in HW as its removal is still being processed but is already removed from the kernel's neighbor tables.

Simply remove the error message and gracefully accept such events.

Fixes c723c735fa6b ("mlxsw: spectrum_router: Periodically update the kernel's neigh table")
Fixes 60f040ca11b9 ("mlxsw: spectrum_router: Periodically dump active IPv6 neighbours")
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +2 -8
index 6c0391c13fe0..7042c855a5d6 100644
@@ -1942,11 +1942,8 @@ static void mlxsw_sp_router_neigh_ent_ipv4_process(struct mlxsw_sp *mlxsw_sp,
 	dipn = htonl(dip);
 	dev = mlxsw_sp->router->rifs[rif]->dev;
 	n = neigh_lookup(&arp_tbl, &dipn, dev);
-	if (!n) {
-		netdev_err(dev, "Failed to find matching neighbour for IP=%pI4h\n",
-			   &dip);
+	if (!n)
 		return;
-	}
 
 	netdev_dbg(dev, "Updating neighbour with IP=%pI4h\n", &dip);
 	neigh_event_send(n, NULL);
@@ -1973,11 +1970,8 @@ static void mlxsw_sp_router_neigh_ent_ipv6_process(struct mlxsw_sp *mlxsw_sp,
 
 	dev = mlxsw_sp->router->rifs[rif]->dev;
 	n = neigh_lookup(&nd_tbl, &dip, dev);
-	if (!n) {
-		netdev_err(dev, "Failed to find matching neighbour for IP=%pI6c\n",
-			   &dip);
+	if (!n)
 		return;
-	}
 
 	netdev_dbg(dev, "Updating neighbour with IP=%pI6c\n", &dip);
 	neigh_event_send(n, NULL);
Signature · 1 line
2.14.3
maintainer
#1 lore raw

From: Jiri Pirko <[email protected]>
Date: Wed, 24 Jan 2018 10:02:09 +0100

Quoted 11 lines

From: Yuval Mintz <[email protected]>

Driver periodically samples all neighbors configured in device in order to update the kernel regarding their state. When finding an entry configured in HW that doesn't show in neigh_lookup() driver logs an error message.
This introduces a race when removing multiple neighbors - it's possible that a given entry would still be configured in HW as its removal is still being processed but is already removed from the kernel's neighbor tables.

Quoted 7 lines

Simply remove the error message and gracefully accept such events.

Fixes c723c735fa6b ("mlxsw: spectrum_router: Periodically update the kernel's neigh table")
Fixes 60f040ca11b9 ("mlxsw: spectrum_router: Periodically dump active IPv6 neighbours")

Applied and queued up for -stable, thanks.