summaryrefslogtreecommitdiff
path: root/zebra/zebra_router.h
diff options
context:
space:
mode:
authorSatheesh Kumar K <sathk@cumulusnetworks.com>2019-08-26 04:35:37 -0700
committerSatheesh Kumar K <sathk@cumulusnetworks.com>2019-09-24 01:42:31 -0700
commit40d9d1cc444bc77847a45629c58c65044ce48efa (patch)
treee373b310373fe19f1956e856debb26a9a7223e6b /zebra/zebra_router.h
parent5fdca4ded5794dcf97235fa3f2d1f0e7e0969c29 (diff)
Zebra: adding support for Zebra MLAG Functionality
This includes: 1. Processing client Registrations for MLAG 2. storing client Interests for MLAG updates 3. Opening communication channel to MLAG with First client reg 4. Closing Communication channel with last client De-reg 5. Spawning a new thread for handling MLAG updates peocessing 6. adding Test code 7. advertising MLAG Updates to clients based on their interests Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_router.h')
-rw-r--r--zebra/zebra_router.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/zebra/zebra_router.h b/zebra/zebra_router.h
index e50f8a1186..141b2579e2 100644
--- a/zebra/zebra_router.h
+++ b/zebra/zebra_router.h
@@ -71,6 +71,35 @@ struct zebra_mlag_info {
/* The system mac being used */
struct ethaddr mac;
+ /*
+ * Zebra will open the communication channel with MLAGD only if any
+ * clients are interested and it is controlled dynamically based on
+ * client registers & un-registers.
+ */
+ uint32_t clients_interested_cnt;
+
+ /* coomunication channel with MLAGD is established */
+ bool connected;
+
+ /* connection retry timer is running */
+ bool timer_running;
+
+ /* Holds the client data(unencoded) that need to be pushed to MCLAGD*/
+ struct stream_fifo *mlag_fifo;
+
+ /*
+ * A new Kernel thread will be created to post the data to MCLAGD.
+ * where as, read will be performed from the zebra main thread, because
+ * read involves accessing client registartion data structures.
+ */
+ struct frr_pthread *zebra_pth_mlag;
+
+ /* MLAG Thread context 'master' */
+ struct thread_master *th_master;
+
+ /* Threads for read/write. */
+ struct thread *t_read;
+ struct thread *t_write;
};
struct zebra_router {