summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_mlag_private.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-10-05 18:24:10 +0200
committerDonald Sharp <sharpd@nvidia.com>2020-10-13 22:02:05 +0200
commitca3491262b13f700ee37e985f51447866f64a3b1 (patch)
tree9d280172c11dd1515f5d7f78f25187f18f0c1e59 /zebra/zebra_mlag_private.c
parentRevert "zebra: the mlag_rd_buf_offset variable was write only" (diff)
downloadfrr-ca3491262b13f700ee37e985f51447866f64a3b1.tar.xz
frr-ca3491262b13f700ee37e985f51447866f64a3b1.zip
zebra: Isolate mlag_rd_buf_offset to the actual using function
Isolate the mlag_rd_buf_offset variable to the actual used function, instead of having it a global. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to '')
-rw-r--r--zebra/zebra_mlag_private.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zebra/zebra_mlag_private.c b/zebra/zebra_mlag_private.c
index d39b0c0ae..8a66d6de7 100644
--- a/zebra/zebra_mlag_private.c
+++ b/zebra/zebra_mlag_private.c
@@ -74,6 +74,7 @@ static void zebra_mlag_sched_read(void)
static int zebra_mlag_read(struct thread *thread)
{
+ static uint32_t mlag_rd_buf_offset;
uint32_t *msglen;
uint32_t h_msglen;
uint32_t tot_len, curr_len = mlag_rd_buf_offset;
@@ -159,6 +160,7 @@ static int zebra_mlag_read(struct thread *thread)
/* Register read thread. */
zebra_mlag_reset_read_buffer();
+ mlag_rd_buf_offset = 0;
zebra_mlag_sched_read();
return 0;
}