]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Fixing Comments in MLAG Read scheduling Events
authorSatheesh Kumar K <sathk@cumulusnetworks.com>
Fri, 22 Nov 2019 04:33:42 +0000 (20:33 -0800)
committerSatheesh Kumar K <sathk@cumulusnetworks.com>
Fri, 22 Nov 2019 04:39:35 +0000 (20:39 -0800)
Zebra MLAG is using "t_read" for multiple tasks, such as

1. For opening Communication channel with MLAG
2. In case conncetion fails, same event is used for retries
3. after the connection establishment, same event is used to
   read the data from MLAG

since all these taks will never schedule together, this will not
cause any issues.

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
zebra/zebra_mlag_private.c
zebra/zebra_router.h

index 6a31d47055cc1bef19976a29fe464034e4463b2b..4df7b6dd114cc746c64149b6a371b77a6014dd81 100644 (file)
@@ -166,8 +166,6 @@ static int zebra_mlag_connect(struct thread *thread)
        /* Reset the Timer-running flag */
        zrouter.mlag_info.timer_running = false;
 
-       /* Reset, sothat Next task can be scheduled */
-       zrouter.mlag_info.t_read = NULL;
        svr.sun_family = AF_UNIX;
 #define MLAG_SOCK_NAME "/var/run/clag-zebra.socket"
        strlcpy(svr.sun_path, MLAG_SOCK_NAME, sizeof(MLAG_SOCK_NAME) + 1);
index 437cab5bbd242cd1ec6ab2c8ea98a560976917fe..d8ad8a68646d778cfbba94438aa39ebaad3afe07 100644 (file)
@@ -97,8 +97,14 @@ struct zebra_mlag_info {
        /* MLAG Thread context 'master' */
        struct thread_master *th_master;
 
-       /* Threads for read/write. */
+       /*
+        * Event for Initial MLAG Connection setup & Data Read
+        * Read can be performed only after successful connection establishment,
+        * so no issues.
+        *
+        */
        struct thread *t_read;
+       /* Event for MLAG write */
        struct thread *t_write;
 };