summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_fpm.c
diff options
context:
space:
mode:
authorKishore Kunal <kishore.kunal@broadcom.com>2021-01-13 23:16:34 +0100
committerKishore Kunal <kishore.kunal@broadcom.com>2021-01-14 16:53:52 +0100
commite840edcacbc57844b71422cc882aab9b144063af (patch)
tree181e9730a36f15f205bf680ec8c77e05aebab8d9 /zebra/zebra_fpm.c
parentMerge pull request #7828 from mobash-rasool/pim-fixes-3 (diff)
downloadfrr-e840edcacbc57844b71422cc882aab9b144063af.tar.xz
frr-e840edcacbc57844b71422cc882aab9b144063af.zip
zebra: Scale setup RMAC is send multiple time to fpm
Thread zfpm_conn_up_thread_cb can Yield and send RMAC multiple times to FPM. Signed-off-by: Kishore Kunal <kishorekunal01@broadcom.com>
Diffstat (limited to 'zebra/zebra_fpm.c')
-rw-r--r--zebra/zebra_fpm.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index 2bf48c627..8f5e7e857 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -273,6 +273,11 @@ struct zfpm_glob {
* If non-zero, the last time when statistics were cleared.
*/
time_t last_stats_clear_time;
+
+ /*
+ * Flag to track the MAC dump status to FPM
+ */
+ bool fpm_mac_dump_done;
};
static struct zfpm_glob zfpm_glob_space;
@@ -528,8 +533,13 @@ static int zfpm_conn_up_thread_cb(struct thread *thread)
goto done;
}
- /* Enqueue FPM updates for all the RMAC entries */
- hash_iterate(zrouter.l3vni_table, zfpm_iterate_rmac_table, NULL);
+ if (!zfpm_g->fpm_mac_dump_done) {
+ /* Enqueue FPM updates for all the RMAC entries */
+ hash_iterate(zrouter.l3vni_table, zfpm_iterate_rmac_table,
+ NULL);
+ /* mark dump done so that its not repeated after yield */
+ zfpm_g->fpm_mac_dump_done = true;
+ }
while ((rnode = zfpm_rnodes_iter_next(iter))) {
dest = rib_dest_from_rnode(rnode);
@@ -578,6 +588,7 @@ static void zfpm_connection_up(const char *detail)
assert(!zfpm_g->t_conn_up);
zfpm_rnodes_iter_init(&zfpm_g->t_conn_up_state.iter);
+ zfpm_g->fpm_mac_dump_done = false;
zfpm_debug("Starting conn_up thread");
zfpm_g->t_conn_up = NULL;