diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2018-07-04 02:47:16 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2018-07-04 02:47:16 +0000 |
commit | 6573d7580b851d794b6c3cbd5ee3d7bf0b4c0ccb (patch) | |
tree | 884d51d2f53b01ffe726dcba11e11ef5cc78b962 /sys/netinet/in_gif.c | |
parent | e98bd7507385206baca6b18e25a98cc0732bccfb (diff) | |
download | src-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/in_gif.c')
-rw-r--r-- | sys/netinet/in_gif.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c index 06b567400297..4b609294cbe8 100644 --- a/sys/netinet/in_gif.c +++ b/sys/netinet/in_gif.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/sysctl.h> #include <sys/malloc.h> +#include <sys/proc.h> #include <net/ethernet.h> #include <net/if.h> @@ -224,7 +225,7 @@ in_gif_output(struct ifnet *ifp, struct mbuf *m, int proto, uint8_t ecn) int len; /* prepend new IP header */ - MPASS(in_epoch()); + MPASS(in_epoch(net_epoch_preempt)); len = sizeof(struct ip); #ifndef __NO_STRICT_ALIGNMENT if (proto == IPPROTO_ETHERIP) @@ -263,7 +264,7 @@ in_gif_input(struct mbuf *m, int off, int proto, void *arg) struct ip *ip; uint8_t ecn; - MPASS(in_epoch()); + MPASS(in_epoch(net_epoch_preempt)); if (sc == NULL) { m_freem(m); KMOD_IPSTAT_INC(ips_nogif); @@ -292,7 +293,7 @@ in_gif_lookup(const struct mbuf *m, int off, int proto, void **arg) if (V_ipv4_hashtbl == NULL) return (0); - MPASS(in_epoch()); + MPASS(in_epoch(net_epoch_preempt)); ip = mtod(m, const struct ip *); /* * NOTE: it is safe to iterate without any locking here, because softc |