From nobody Sun Dec 04 23:33:02 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NQNJv21gsz4jtYD; Sun, 4 Dec 2022 23:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NQNJv16dxz4JKJ; Sun, 4 Dec 2022 23:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670196783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+CZh38rVI8lIYhVhlaok2e1KUipGEy0wJ0pRxj0rVk=; b=lT42FEVmgmvDmaVaOAl/koL53csX5q7NsWptRfwbZRH36kDa4W7pkVIEEfc3rkw/x0TmmN sTJ/cmpT+javXUAD8mtHaubK1ZIwdh4PXJnmm41c3LWf55zUbcK+lwyNzRAcV2L8GPSoXX VK2KvU51pzLrnm28pxMu5TEWuvv7SfMMu3m03cq97h2g7bTptl+uJdypR2HvZPKRBuGZkg GoTcvn5pFfOjhKf+ZQoOq+UaOrut8uIfVv6rI+6Dzl9fnOpy6ILYc2RYscUdr6qA4m2ldo C3Wjcd2JMn9iUmc8X5dgDruvRlzce8CQVcFKAxyh2RkASjQou4uIizwrVuc+Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670196783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+CZh38rVI8lIYhVhlaok2e1KUipGEy0wJ0pRxj0rVk=; b=K0PFQrqhZt9gOE3dXbL2+5QMIA6kCIlQbQOdhLQYjqnEU797rWaGfoUWNViiubYkpLL/6j FS/mqpDi5m9b74nAkOI2EBWxycVSddCHt9Hbbgu+4jKXFiaY0z+i86HHa2BV7+6AYM3yEE S+slPjtn1ajWSTNBBn1pUKWVcXaAySB4cX+JUnRwXonMRpi9CcDocOJyIkFkm9N2IDRC15 EotCHSxmY++goiEHH77/FTMLu2n8+xz7eHTJCRPBo3dpEDYh6Yz0n7LvLfLW8KxWBi1TGt 25fgvAtne201GMEQrw7WFiafplMCRngoF5Rh8q+tuH18chHBTwcxLwayxun3Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670196783; a=rsa-sha256; cv=none; b=xHYi/ZuhVEEmUGVc+Sxgwaw1jznns3hGCzNYE5II/TdcAbX4SNaEiPZr4wZchEzibsxieP VYLh9GNr1USj9DUvN3q7ricMst7+x4X9sR+68GTMHHHYaSHTAvWv31UZyzn2pYTcXOrx6/ Yu5xHeawbuGMMwx+RM5+HouDAzlmjia4rljoTT2IjFUqyCHGrkfKPJO2FyApZ7erLlkA15 2NBENZ3DlT7UqCQNf4gW9sqXMbMD39q3SvbLHNntLeFIt59aT3NICsX8T/7nDPVTiQUcFt Jt5frmRxTd9j903ERAcecqZ0EHlbDBPhN8w0whqAhlhmPaaG0I7Qf6H0dp3gZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NQNJv08vCzcRV; Sun, 4 Dec 2022 23:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2B4NX290089159; Sun, 4 Dec 2022 23:33:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B4NX2it089158; Sun, 4 Dec 2022 23:33:02 GMT (envelope-from git) Date: Sun, 4 Dec 2022 23:33:02 GMT Message-Id: <202212042333.2B4NX2it089158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 68c3f0302106 - main - newbus: Change attach failure behavior List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68c3f0302106643207dcdfe3b414810e245228e5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=68c3f0302106643207dcdfe3b414810e245228e5 commit 68c3f0302106643207dcdfe3b414810e245228e5 Author: Warner Losh AuthorDate: 2022-12-04 23:22:43 +0000 Commit: Warner Losh CommitDate: 2022-12-04 23:29:03 +0000 newbus: Change attach failure behavior In the rare case that we succeed in probing, but fail to attach, flip the default to be to disable the device. hw.bus.disable_failed_devices=false is no required to restore the old behavior. The old behavior dates form a time when dynamic control of devices wasn't yet present (devctl didn't exist). Now that one can retry probe/attach the device with devctl, the default doesn't make sense: The more desirable behaivor is to have stable device numbers when one has several instances of the same device in a system (common for NICs or HBAs). Reviewed by: jhb (verbal) Sponsored by: Netflix --- UPDATING | 8 ++++++++ sys/kern/subr_bus.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 564336295e7b..e14e609e30b7 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20221204: + hw.bus.disable_failed_devices has changed from 'false' to 'true' by + default. Now if newbus succeeds in probing a device, but fails to attach + the device, we'll disable the device. In the past, we'd keep retrying + the device on each new driver loaded. To get that behavior now, one + needs to use devctl to re-enable the device, and repobe it (or set + the sysctl/tunable hw.bus.disable_failed_devices=false). + 20221122: pf no longer accepts 'scrub fragment crop' or 'scrub fragment drop-ovl'. These configurations are no longer automatically reinterpreted as diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index b9615b033007..6a5ec4efc38d 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -69,7 +69,7 @@ SYSCTL_NODE(_hw, OID_AUTO, bus, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, SYSCTL_ROOT_NODE(OID_AUTO, dev, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, NULL); -static bool disable_failed_devs = false; +static bool disable_failed_devs = true; SYSCTL_BOOL(_hw_bus, OID_AUTO, disable_failed_devices, CTLFLAG_RWTUN, &disable_failed_devs, 0, "Do not retry attaching devices that return an error from DEVICE_ATTACH the first time");