From owner-svn-src-head@freebsd.org Sat Jul 18 20:20:16 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 B1AC1372D6F; Sat, 18 Jul 2020 20:20:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B8K9X4FdWz3S9c; Sat, 18 Jul 2020 20:20:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 5BBAB2674D; Sat, 18 Jul 2020 20:20:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 324B629D0D; Sat, 18 Jul 2020 22:20:14 +0200 (CEST) From: "Kristof Provost" To: "Konstantin Belousov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r363308 - head/sys/net Date: Sat, 18 Jul 2020 22:20:10 +0200 X-Mailer: MailMate (1.13.1r5671) Message-ID: <1E8C2818-9388-4722-A3A1-1F6B54A597A8@FreeBSD.org> In-Reply-To: <20200718184750.GY44314@kib.kiev.ua> References: <202007181243.06IChBTR073126@repo.freebsd.org> <20200718184750.GY44314@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 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: Sat, 18 Jul 2020 20:20:16 -0000 On 18 Jul 2020, at 20:47, Konstantin Belousov wrote: > On Sat, Jul 18, 2020 at 12:43:11PM +0000, Kristof Provost wrote: >> Author: kp >> Date: Sat Jul 18 12:43:11 2020 >> New Revision: 363308 >> URL: https://svnweb.freebsd.org/changeset/base/363308 >> >> Log: >> bridge: Don't sleep during epoch >> >> While it doesn't trigger INVARIANTS or WITNESS on head it does in >> stable/12. >> There's also no reason for it, as we can easily report the out of >> memory error >> to the caller (i.e. userspace). All of these can already fail. > This makes syscalls (ioctl) fail randomly. Can you pre-allocate the > buffers > before entering epoch, instead ? > Not easily, no. The bridge ioctl handling is all done via bridge_ioctl(), which enters epoch and dispatches to the bridge_control_table. We’d have to modify every single ioctl function. These are also not the only ioctl functions that can return ENOMEM (or EINVAL). bridge_ioctl_add() already did, for example. Best regards, Kristof