From owner-svn-src-all@freebsd.org Tue Oct 8 13:05:00 2019 Return-Path: Delivered-To: svn-src-all@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 34D80147B21; Tue, 8 Oct 2019 13:05:00 +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 46ncyL71F7z3QR9; Tue, 8 Oct 2019 13:04:58 +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 4ABC68D4A218; Tue, 8 Oct 2019 13:04:57 +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 B9A4BE7083A; Tue, 8 Oct 2019 13:04:56 +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 fGeFbp-vhmQZ; Tue, 8 Oct 2019 13:04:54 +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 34C05E7081F; Tue, 8 Oct 2019 13:04:54 +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: r353274 - in head/sys: net sys Date: Tue, 08 Oct 2019 13:04:53 +0000 X-Mailer: MailMate (2.0BETAr6142) Message-ID: <09893B30-4961-411C-854D-7547EBB96470@lists.zabbadoz.net> In-Reply-To: <41bf4178-689e-573c-2684-450ee02d8de4@selasky.org> References: <201910071415.x97EFfiN064058@repo.freebsd.org> <41bf4178-689e-573c-2684-450ee02d8de4@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 46ncyL71F7z3QR9 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 195.201.62.131 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net X-Spamd-Result: default: False [-5.09 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:195.201.62.131]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zabbadoz.net]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-2.79)[ip: (-8.62), ipnet: 195.201.0.0/16(-3.54), asn: 24940(-1.81), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:195.201.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Oct 2019 13:05:00 -0000 On 8 Oct 2019, at 12:50, Hans Petter Selasky wrote: > On 2019-10-08 14:48, Bjoern A. Zeeb wrote: >> On 7 Oct 2019, at 14:15, Hans Petter Selasky wrote: >> >>> Author: hselasky >>> Date: Mon Oct  7 14:15:41 2019 >>> New Revision: 353274 >>> URL: https://svnweb.freebsd.org/changeset/base/353274 >>> >>> Log: >>>   Factor out VNET shutdown check into an own vnet structure field. >>>   Remove the now obsolete vnet_state field. This greatly simplifies >>> the >>>   detection of VNET shutdown and avoids code duplication. >> >> I think I tried to say that the vnet_state is extremely helpful for >> debugging as you know where each of the stacks is during >> initialisation/shutdown, especially with loadable  modules and that >> it should stay and I cannot remember that I removed it in the patch >> that I suggested. >> >> I didn’t re-used a field but extended the structure.  What you did >> means you cannot MFC this easily.  Also it means that all previous >> vnet consumers got invalidated and the VNET_MAGIC_N should have been >> bumped and all modules need a re-compile. >> >> > > OK I can fix that, but should VNET_MAGIC_N be bumped when adding the > new vnet_shutdown boolean to this structure? Thanks! Yes, I guess it should be though it is technically not needed. But also see my other follow-up email to the bool flag. I think we are back to the point of “is the vnet in a stable state or not?” whereas for your further frag6 change your question only is “is the vnet shutting down or not because resources might be freed already otherwise?”. For your https://reviews.freebsd.org/D19622 the boolean shutdown flag as it was originally in my patch should be fine. The fact that if_vmove() and related are not happy is my fault. Sorry. There’s yet another problem by the fact that the interfaces go away first, as that doesn’t allow us to properly shutdown connections anymore. However if they do not go first packets will continue to come in and a clean shutdown without any packet processing will be even harder. I think (in a quite moment of a day or two, maybe with a whiteboard) we should re-hash that decision I had to make a few years ago in the light of epoch(9) now. Probably that will almost be the same problem as the mbuf carrying the ifp along. (for another day…). /bz