summaryrefslogtreecommitdiff
path: root/zebra/rt.h
diff options
context:
space:
mode:
authorMark Stapp <mstapp@nvidia.com>2022-02-10 13:29:59 -0500
committerMark Stapp <mstapp@nvidia.com>2022-02-11 17:03:26 -0500
commit348698095d1e1dc9904e13c86ce8492d89558a8d (patch)
treec848def37627fbd81f8304196c948fbc5d1c2dd7 /zebra/rt.h
parent70d79c359b321337c3791944ef068917b24748b6 (diff)
zebra: make netlink object hash threadsafe
The recently-added hashtable of nlsock objects needs to be thread-safe: it's accessed from the main and dplane pthreads. Add a mutex for it, use wrapper apis when accessing it. Add a per-OS init/terminate api so we can do init that's not per-vrf or per-namespace. Signed-off-by: Mark Stapp <mstapp@nvidia.com>
Diffstat (limited to 'zebra/rt.h')
-rw-r--r--zebra/rt.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/rt.h b/zebra/rt.h
index 90148d2c0d..5e626928d9 100644
--- a/zebra/rt.h
+++ b/zebra/rt.h
@@ -78,6 +78,10 @@ extern int kernel_interface_set_master(struct interface *master,
extern int mpls_kernel_init(void);
+/* Global init and deinit for platform-/OS-specific things */
+void kernel_router_init(void);
+void kernel_router_terminate(void);
+
extern uint32_t kernel_get_speed(struct interface *ifp, int *error);
extern int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *mroute);