net/mlx5e: Skip redundant checks when providing NUD lastuse feedback
authorRoi Dayan <roid@mellanox.com>
Mon, 13 Nov 2017 16:07:50 +0000 (18:07 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 14 May 2018 22:10:21 +0000 (15:10 -0700)
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 <roid@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index b94276db3ce939225b282996ce0f382a2f36fa63..9b0e3ccffa66e12501fc5eceffa7366fd1ee0d12 100644 (file)
@@ -982,6 +982,8 @@ void mlx5e_tc_update_neigh_used_value(struct mlx5e_neigh_hash_entry *nhe)
                                }
                        }
                }
+               if (neigh_used)
+                       break;
        }
 
        if (neigh_used) {