From: Roi Dayan Date: Mon, 13 Nov 2017 16:07:50 +0000 (+0200) Subject: net/mlx5e: Skip redundant checks when providing NUD lastuse feedback X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e36d4810f2e98110e2b0de11ffc60f71a0a26805;p=openwrt%2Fstaging%2Fblogic.git net/mlx5e: Skip redundant checks when providing NUD lastuse feedback It's redundant to continue the loop if we found one flow whose lastuse value being newer than the last one we reported, since this is enough for us to trigger a NUD update (neigh_event_send()). Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index b94276db3ce9..9b0e3ccffa66 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -982,6 +982,8 @@ void mlx5e_tc_update_neigh_used_value(struct mlx5e_neigh_hash_entry *nhe) } } } + if (neigh_used) + break; } if (neigh_used) {