From owner-svn-src-head@freebsd.org Tue Oct 8 12:53:43 2019 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 0E5501475C5; Tue, 8 Oct 2019 12:53:43 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46ncjL6hNfz3PvH; Tue, 8 Oct 2019 12:53:42 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 872858D4A218; Tue, 8 Oct 2019 12:53:41 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 05967E7083A; Tue, 8 Oct 2019 12:53:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id g8dM2Gqc2O3V; Tue, 8 Oct 2019 12:53:38 +0000 (UTC) Received: from [192.168.2.110] (unknown [IPv6:fde9:577b:c1a9:31:4d5f:285f:ca38:521f]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id CA93BE707C8; Tue, 8 Oct 2019 12:53:38 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Hans Petter Selasky" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r353302 - head/sys/net Date: Tue, 08 Oct 2019 12:53:37 +0000 X-Mailer: MailMate (2.0BETAr6142) Message-ID: <68CDD3DA-3E39-401C-8402-C54D37AFADBC@lists.zabbadoz.net> In-Reply-To: <201910081106.x98B6OBB013578@repo.freebsd.org> References: <201910081106.x98B6OBB013578@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 46ncjL6hNfz3PvH X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] 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: Tue, 08 Oct 2019 12:53:43 -0000 On 8 Oct 2019, at 11:06, Hans Petter Selasky wrote: > Author: hselasky > Date: Tue Oct 8 11:06:24 2019 > New Revision: 353302 > URL: https://svnweb.freebsd.org/changeset/base/353302 > > Log: > Fix regression issue after r353274: > > Make sure the vnet_shutdown field is not set until after all > VNET_SYSUNINIT()'s in the SI_SUB_VNET_DONE subsystem have been > executed. Especially the vnet_if_return() functions requires that > if_move() is still operational. Which basically means that the boolean suggestion I suggested to you in the end isn’t right either as now some parts of the shutdown run without shutdown being set and checking state boundaries was the right thing. Now to know whether it is a startup or a shutdown you probably need both together? > Reported by: lwhsu@ > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > head/sys/net/vnet.c > > Modified: head/sys/net/vnet.c > ============================================================================== > --- head/sys/net/vnet.c Tue Oct 8 10:50:16 2019 (r353301) > +++ head/sys/net/vnet.c Tue Oct 8 11:06:24 2019 (r353302) > @@ -279,9 +279,6 @@ vnet_destroy(struct vnet *vnet) > LIST_REMOVE(vnet, vnet_le); > VNET_LIST_WUNLOCK(); > > - /* Signal that VNET is being shutdown. */ > - vnet->vnet_shutdown = 1; > - > CURVNET_SET_QUIET(vnet); > vnet_sysuninit(); > CURVNET_RESTORE(); > @@ -353,15 +350,15 @@ vnet_data_startup(void *dummy __unused) > } > SYSINIT(vnet_data, SI_SUB_KLD, SI_ORDER_FIRST, vnet_data_startup, > NULL); > > -/* Dummy VNET_SYSINIT to make sure we always reach the final end > state. */ > static void > -vnet_sysinit_done(void *unused __unused) > +vnet_sysuninit_shutdown(void *unused __unused) > { > > - return; > + /* Signal that VNET is being shutdown. */ > + curvnet->vnet_shutdown = 1; > } > -VNET_SYSINIT(vnet_sysinit_done, SI_SUB_VNET_DONE, SI_ORDER_ANY, > - vnet_sysinit_done, NULL); > +VNET_SYSUNINIT(vnet_sysuninit_shutdown, SI_SUB_VNET_DONE, > SI_ORDER_FIRST, > + vnet_sysuninit_shutdown, NULL); > > /* > * When a module is loaded and requires storage for a virtualized > global