diff options
| author | 2019-04-28 22:15:57 +0000 | |
|---|---|---|
| committer | 2019-04-28 22:15:57 +0000 | |
| commit | 96c4247ccbf78c38f00780e28567a99a63d7bf42 (patch) | |
| tree | 79d5e244376310b8fa18e3191a7ee50f295e17de /sys/netinet6/ip6_output.c | |
| parent | Support multiple occurances of the same argument. Use this for a new (diff) | |
| download | wireguard-openbsd-96c4247ccbf78c38f00780e28567a99a63d7bf42.tar.xz wireguard-openbsd-96c4247ccbf78c38f00780e28567a99a63d7bf42.zip | |
Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.
This redefines the ifp <-> bridge relationship. No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.
Tested by various, ok dlg@, visa@
Diffstat (limited to 'sys/netinet6/ip6_output.c')
| -rw-r--r-- | sys/netinet6/ip6_output.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 7db00f41ffa..bb470c8ff32 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.242 2019/04/23 11:01:54 bluhm Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.243 2019/04/28 22:15:58 mpi Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -2708,7 +2708,7 @@ in6_proto_cksum_out(struct mbuf *m, struct ifnet *ifp) if (m->m_pkthdr.csum_flags & M_TCP_CSUM_OUT) { if (!ifp || !(ifp->if_capabilities & IFCAP_CSUM_TCPv6) || ip6->ip6_nxt != IPPROTO_TCP || - ifp->if_bridgeport != NULL) { + ifp->if_bridgeidx != 0) { tcpstat_inc(tcps_outswcsum); in6_delayed_cksum(m, IPPROTO_TCP); m->m_pkthdr.csum_flags &= ~M_TCP_CSUM_OUT; /* Clear */ @@ -2716,7 +2716,7 @@ in6_proto_cksum_out(struct mbuf *m, struct ifnet *ifp) } else if (m->m_pkthdr.csum_flags & M_UDP_CSUM_OUT) { if (!ifp || !(ifp->if_capabilities & IFCAP_CSUM_UDPv6) || ip6->ip6_nxt != IPPROTO_UDP || - ifp->if_bridgeport != NULL) { + ifp->if_bridgeidx != 0) { udpstat_inc(udps_outswcsum); in6_delayed_cksum(m, IPPROTO_UDP); m->m_pkthdr.csum_flags &= ~M_UDP_CSUM_OUT; /* Clear */ |
