aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip_encap.c
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2018-07-04 02:47:16 +0000
committerMatt Macy <mmacy@FreeBSD.org>2018-07-04 02:47:16 +0000
commit6573d7580b851d794b6c3cbd5ee3d7bf0b4c0ccb (patch)
tree884d51d2f53b01ffe726dcba11e11ef5cc78b962 /sys/netinet/ip_encap.c
parente98bd7507385206baca6b18e25a98cc0732bccfb (diff)
downloadsrc-6573d7580b851d794b6c3cbd5ee3d7bf0b4c0ccb.tar.gz
src-6573d7580b851d794b6c3cbd5ee3d7bf0b4c0ccb.zip
epoch(9): allow preemptible epochs to compose
- Add tracker argument to preemptible epochs - Inline epoch read path in kernel and tied modules - Change in_epoch to take an epoch as argument - Simplify tfb_tcp_do_segment to not take a ti_locked argument, there's no longer any benefit to dropping the pcbinfo lock and trying to do so just adds an error prone branchfest to these functions - Remove cases of same function recursion on the epoch as recursing is no longer free. - Remove the the TAILQ_ENTRY and epoch_section from struct thread as the tracker field is now stack or heap allocated as appropriate. Tested by: pho and Limelight Networks Reviewed by: kbowling at llnw dot com Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16066
Notes
Notes: svn path=/head/; revision=335924
Diffstat (limited to 'sys/netinet/ip_encap.c')
-rw-r--r--sys/netinet/ip_encap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_encap.c b/sys/netinet/ip_encap.c
index 7679d4202bae..9d98fcfe9cff 100644
--- a/sys/netinet/ip_encap.c
+++ b/sys/netinet/ip_encap.c
@@ -112,8 +112,8 @@ static struct mtx encapmtx;
MTX_SYSINIT(encapmtx, &encapmtx, "encapmtx", MTX_DEF);
#define ENCAP_WLOCK() mtx_lock(&encapmtx)
#define ENCAP_WUNLOCK() mtx_unlock(&encapmtx)
-#define ENCAP_RLOCK() epoch_enter_preempt(net_epoch_preempt)
-#define ENCAP_RUNLOCK() epoch_exit_preempt(net_epoch_preempt)
+#define ENCAP_RLOCK() struct epoch_tracker encap_et; epoch_enter_preempt(net_epoch_preempt, &encap_et)
+#define ENCAP_RUNLOCK() epoch_exit_preempt(net_epoch_preempt, &encap_et)
#define ENCAP_WAIT() epoch_wait_preempt(net_epoch_preempt)
static struct encaptab *