svn commit: r333469 - in head/sys: conf net
Matt Macy
mmacy at FreeBSD.org
Thu May 10 19:13:02 UTC 2018
Author: mmacy
Date: Thu May 10 19:13:00 2018
New Revision: 333469
URL: https://svnweb.freebsd.org/changeset/base/333469
Log:
Allocate epoch for networking at startup
Additionally add CK to include paths for modules
Approved by: sbruno@
Modified:
head/sys/conf/kmod.mk
head/sys/net/if.c
head/sys/net/if_var.h
Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk Thu May 10 18:53:39 2018 (r333468)
+++ head/sys/conf/kmod.mk Thu May 10 19:13:00 2018 (r333469)
@@ -122,7 +122,7 @@ CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNB
# Add -I paths for system headers. Individual module makefiles don't
# need any -I paths for this. Similar defaults for .PATH can't be
# set because there are no standard paths for non-headers.
-CFLAGS+= -I. -I${SYSDIR}
+CFLAGS+= -I. -I${SYSDIR} -I${SYSDIR}/contrib/ck/include
CFLAGS.gcc+= -finline-limit=${INLINE_LIMIT}
CFLAGS.gcc+= -fms-extensions
Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c Thu May 10 18:53:39 2018 (r333468)
+++ head/sys/net/if.c Thu May 10 19:13:00 2018 (r333469)
@@ -104,6 +104,7 @@
_Static_assert(sizeof(((struct ifreq *)0)->ifr_name) ==
offsetof(struct ifreq, ifr_ifru), "gap between ifr_name and ifr_ifru");
+epoch_t net_epoch;
#ifdef COMPAT_FREEBSD32
#include <sys/mount.h>
#include <compat/freebsd32/freebsd32.h>
@@ -903,6 +904,7 @@ if_attachdomain(void *dummy)
{
struct ifnet *ifp;
+ net_epoch = epoch_alloc();
TAILQ_FOREACH(ifp, &V_ifnet, if_link)
if_attachdomain1(ifp);
}
Modified: head/sys/net/if_var.h
==============================================================================
--- head/sys/net/if_var.h Thu May 10 18:53:39 2018 (r333468)
+++ head/sys/net/if_var.h Thu May 10 19:13:00 2018 (r333469)
@@ -76,6 +76,8 @@ struct netdump_methods;
#include <sys/mbuf.h> /* ifqueue only? */
#include <sys/buf_ring.h>
#include <net/vnet.h>
+#include <ck_queue.h>
+#include <sys/epoch.h>
#endif /* _KERNEL */
#include <sys/counter.h>
#include <sys/lock.h> /* XXX */
@@ -104,6 +106,7 @@ VNET_DECLARE(struct hhook_head *, ipsec_hhh_in[HHOOK_I
VNET_DECLARE(struct hhook_head *, ipsec_hhh_out[HHOOK_IPSEC_COUNT]);
#define V_ipsec_hhh_in VNET(ipsec_hhh_in)
#define V_ipsec_hhh_out VNET(ipsec_hhh_out)
+extern epoch_t net_epoch;
#endif /* _KERNEL */
typedef enum {
More information about the svn-src-all
mailing list