The route_table_change() callback is currently used to determine if any locally relevant routing table has changed since the last time the notifier was run.
If we already found at least one relevant changed routing table we can avoid lookups for each and every subsequent route events in the current run. Signed-off-by: Dumitru Ceara <dce...@redhat.com> --- controller/route-table-notify.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/controller/route-table-notify.c b/controller/route-table-notify.c index 9f66a645ac..a052a7e8df 100644 --- a/controller/route-table-notify.c +++ b/controller/route-table-notify.c @@ -134,6 +134,13 @@ find_watch_entry(uint32_t table_id) static void route_table_change(const void *change_, void *aux OVS_UNUSED) { + /* We currently track whether at least one recent route table change + * was detected. If that's the case already there's no need to + * continue. */ + if (any_route_table_changed) { + return; + } + const struct route_table_msg *change = change_; if (change && change->rd.rtm_protocol != RTPROT_OVN) { if (find_watch_entry(change->rd.rta_table_id)) { -- 2.49.0 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev