Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Oct 2019 16:21:05 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r353349 - head/sys/kern
Message-ID:  <201910091621.x99GL5Ul063081@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Oct  9 16:21:05 2019
New Revision: 353349
URL: https://svnweb.freebsd.org/changeset/base/353349

Log:
  Enter network epoch in domain callouts.

Modified:
  head/sys/kern/uipc_domain.c

Modified: head/sys/kern/uipc_domain.c
==============================================================================
--- head/sys/kern/uipc_domain.c	Wed Oct  9 15:35:22 2019	(r353348)
+++ head/sys/kern/uipc_domain.c	Wed Oct  9 16:21:05 2019	(r353349)
@@ -47,6 +47,8 @@ __FBSDID("$FreeBSD$");
 #include <sys/systm.h>
 
 #include <net/vnet.h>
+#include <net/if.h>		/* XXXGL: net_epoch should move out there */
+#include <net/if_var.h>		/* XXXGL: net_epoch should move out there */
 
 /*
  * System initialization
@@ -499,25 +501,31 @@ pfctlinput2(int cmd, struct sockaddr *sa, void *ctlpar
 static void
 pfslowtimo(void *arg)
 {
+	struct epoch_tracker et;
 	struct domain *dp;
 	struct protosw *pr;
 
+	NET_EPOCH_ENTER(et);
 	for (dp = domains; dp; dp = dp->dom_next)
 		for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
 			if (pr->pr_slowtimo)
 				(*pr->pr_slowtimo)();
+	NET_EPOCH_EXIT(et);
 	callout_reset(&pfslow_callout, hz/2, pfslowtimo, NULL);
 }
 
 static void
 pffasttimo(void *arg)
 {
+	struct epoch_tracker et;
 	struct domain *dp;
 	struct protosw *pr;
 
+	NET_EPOCH_ENTER(et);
 	for (dp = domains; dp; dp = dp->dom_next)
 		for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
 			if (pr->pr_fasttimo)
 				(*pr->pr_fasttimo)();
+	NET_EPOCH_EXIT(et);
 	callout_reset(&pffast_callout, hz/5, pffasttimo, NULL);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910091621.x99GL5Ul063081>