From owner-svn-src-head@freebsd.org Fri Jan 24 12:17:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 11D66236AFF; Fri, 24 Jan 2020 12:17:07 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 483ynG0hXVz3xQ4; Fri, 24 Jan 2020 12:17:05 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 870E92601D7; Fri, 24 Jan 2020 13:17:02 +0100 (CET) Subject: Re: svn commit: r357012 - head/sys/net To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202001230147.00N1lh9g042266@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <0fc0f0d5-b339-fdd9-3cf9-febf58d802d9@selasky.org> Date: Fri, 24 Jan 2020 13:16:22 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <202001230147.00N1lh9g042266@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 483ynG0hXVz3xQ4 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-5.42 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE(-3.12)[ip: (-9.34), ipnet: 88.99.0.0/16(-4.71), asn: 24940(-1.55), country: DE(-0.02)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 12:17:07 -0000 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