svn commit: r357012 - head/sys/net
Hans Petter Selasky
hps at selasky.org
Fri Jan 24 12:17:07 UTC 2020
On 2020-01-23 02:47, Gleb Smirnoff wrote:
> Author: glebius
> Date: Thu Jan 23 01:47:43 2020
> New Revision: 357012
> URL: https://svnweb.freebsd.org/changeset/base/357012
>
> Log:
> Stop entering the network epoch in ether_input(), unless driver
> is marked with IFF_NEEDSEPOCH.
>
> Modified:
> head/sys/net/if_ethersubr.c
>
> Modified: head/sys/net/if_ethersubr.c
> ==============================================================================
> --- head/sys/net/if_ethersubr.c Thu Jan 23 01:46:05 2020 (r357011)
> +++ head/sys/net/if_ethersubr.c Thu Jan 23 01:47:43 2020 (r357012)
> @@ -809,7 +809,8 @@ ether_input(struct ifnet *ifp, struct mbuf *m)
> * them up. This allows the drivers to amortize the receive lock.
> */
> CURVNET_SET_QUIET(ifp->if_vnet);
> - NET_EPOCH_ENTER(et);
> + if (__predict_false(ifp->if_flags & IFF_NEEDSEPOCH))
> + NET_EPOCH_ENTER(et);
> while (m) {
> mn = m->m_nextpkt;
> m->m_nextpkt = NULL;
> @@ -824,7 +825,8 @@ ether_input(struct ifnet *ifp, struct mbuf *m)
> netisr_dispatch(NETISR_ETHER, m);
> m = mn;
> }
> - NET_EPOCH_EXIT(et);
> + if (__predict_false(ifp->if_flags & IFF_NEEDSEPOCH))
> + NET_EPOCH_EXIT(et);
> CURVNET_RESTORE();
> }
>
>
Can we do it like this instead:
https://reviews.freebsd.org/D23348
--HPS
More information about the svn-src-all
mailing list