summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2019-03-22 18:31:20 +0100
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2019-04-20 17:33:22 +0200
commitd889ab755c94076fc6c487fabebf34df87f502a4 (patch)
tree16b7ee21198f5573220c1bbfa00c80c1c11aa23c
parentpimd: header changes to cache MLAG information needed for pim-vxlan (diff)
downloadfrr-d889ab755c94076fc6c487fabebf34df87f502a4.tar.xz
frr-d889ab755c94076fc6c487fabebf34df87f502a4.zip
pimd: header changes for pim-vxlan staggered processing
pim-vxlan work is maintained in a lists and processing staggered. One such work is the generation of periodic null registers for the local VTEP-IP. This info is instance agnostic and maintained in a global cache. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
-rw-r--r--pimd/pim_vxlan.c2
-rw-r--r--pimd/pim_vxlan.h22
2 files changed, 24 insertions, 0 deletions
diff --git a/pimd/pim_vxlan.c b/pimd/pim_vxlan.c
index 893f9f0e5..b35bc70c7 100644
--- a/pimd/pim_vxlan.c
+++ b/pimd/pim_vxlan.c
@@ -39,6 +39,8 @@
#include "pim_zebra.h"
#include "pim_vxlan.h"
+/* pim-vxlan global info */
+struct pim_vxlan vxlan_info, *pim_vxlan_p = &vxlan_info;
/************************** vxlan SG cache management ************************/
static unsigned int pim_vxlan_sg_hash_key_make(void *p)
diff --git a/pimd/pim_vxlan.h b/pimd/pim_vxlan.h
index 383adb6d9..ba783928c 100644
--- a/pimd/pim_vxlan.h
+++ b/pimd/pim_vxlan.h
@@ -22,6 +22,15 @@
#ifndef PIM_VXLAN_H
#define PIM_VXLAN_H
+/* global timer used for miscellaneous staggered processing */
+#define PIM_VXLAN_WORK_TIME 1
+/* number of SG entries processed at one shot */
+#define PIM_VXLAN_WORK_MAX 500
+/* frequency of periodic NULL registers */
+#define PIM_VXLAN_NULL_REG_INTERVAL 60 /* seconds */
+
+#define vxlan_mlag (vxlan_info.mlag)
+
enum pim_vxlan_sg_flags {
PIM_VXLAN_SGF_NONE = 0,
PIM_VXLAN_SGF_DEL_IN_PROG = (1 << 0),
@@ -37,6 +46,7 @@ struct pim_vxlan_sg {
enum pim_vxlan_sg_flags flags;
struct pim_upstream *up;
+ struct listnode *work_node; /* to pim_vxlan.work_list */
/* termination info (only applicable to termination XG mroutes)
* term_if - termination device ipmr-lo is added to the OIL
@@ -73,7 +83,19 @@ struct pim_vxlan_mlag {
struct in_addr reg_addr;
};
+enum pim_vxlan_flags {
+ PIM_VXLANF_NONE = 0,
+ PIM_VXLANF_WORK_INITED = (1 << 0)
+};
+
struct pim_vxlan {
+ enum pim_vxlan_flags flags;
+
+ struct thread *work_timer;
+ struct list *work_list;
+ struct listnode *next_work;
+ int max_work_cnt;
+
struct pim_vxlan_mlag mlag;
};