Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145560312
D55239.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55239.id.diff
View Options
diff --git a/sys/net/route.h b/sys/net/route.h
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -32,6 +32,9 @@
#ifndef _NET_ROUTE_H_
#define _NET_ROUTE_H_
+#ifdef _KERNEL
+#include <sys/_eventhandler.h>
+#endif
#include <net/vnet.h>
/*
@@ -124,6 +127,9 @@
#define V_fib_hash_outbound VNET(fib_hash_outbound)
VNET_DECLARE(u_int, fib_hash_outbound);
+typedef void (*rtnumfibs_change_t)(void *, uint32_t);
+EVENTHANDLER_DECLARE(rtnumfibs_change, rtnumfibs_change_t);
+
/* Outbound flowid generation rules */
#ifdef RSS
diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c
--- a/sys/net/route/route_tables.c
+++ b/sys/net/route/route_tables.c
@@ -33,10 +33,10 @@
* Which is the new name for an in kernel routing (next hop) table. *
***********************************************************************/
-#include <sys/cdefs.h>
#include "opt_route.h"
#include <sys/param.h>
+#include <sys/eventhandler.h>
#include <sys/socket.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@@ -268,6 +268,8 @@
old_rt_tables = V_rt_tables;
V_rt_tables = new_rt_tables;
+ EVENTHANDLER_INVOKE(rtnumfibs_change, num_tables);
+
/* Wait till all cpus see new pointers */
atomic_thread_fence_rel();
NET_EPOCH_WAIT();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 22, 12:05 PM (43 m, 25 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28937081
Default Alt Text
D55239.id.diff (1 KB)
Attached To
Mode
D55239: net/route: Add an eventhandler for rt_numfibs changes
Attached
Detach File
Event Timeline
Log In to Comment