From nobody Mon Jun 13 15:35:38 2022 X-Original-To: dev-commits-src-all@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 CD0A285149E; Mon, 13 Jun 2022 15:35:38 +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 4LMFyL5SYnz4bSm; Mon, 13 Jun 2022 15:35:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655134538; 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=D5V8+nImpLqHstOh0pn+CO05n8CzJvNbPCcZ39qq9EQ=; b=dvhERDCS/v0M3/9peOWp0vld57yYjMFOJExLc6hjzLF4PBvKpOCq9fOxGwf2JNMF5wpB/L YTjwTbn07e36npWGmgug1E1JJrqlQyGk9IHWVNA5gt4tFSOjakYiSSWaJ63Vg/ZMmbjukr UQFKzLW6CRh5mVu8WEkxgmCXY7rTyLC5crzv9Zyc6BHLaeVBizvLgL6U3asTgJRRH6LUHc 8LL7spKCIo58kps9m610srdw+xogqWNc+mTTXaj0s+WZu/2Ps6GJqA8UD2sO7bTgrgpAjV rllMQbb7slfCsTHslT+S4yBrXRULunLLecnrr6mRZhSQn9oEv0gs8cnNlHHGRg== 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 9C301186A8; Mon, 13 Jun 2022 15:35:38 +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 25DFZcQs099130; Mon, 13 Jun 2022 15:35:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25DFZcil099129; Mon, 13 Jun 2022 15:35:38 GMT (envelope-from git) Date: Mon, 13 Jun 2022 15:35:38 GMT Message-Id: <202206131535.25DFZcil099129@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 43c72c45a185 - main - lacp: Remove racy kassert List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43c72c45a1856c6cdf25a22d259528d5a4040973 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655134538; 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=D5V8+nImpLqHstOh0pn+CO05n8CzJvNbPCcZ39qq9EQ=; b=MB0P7LQ2/lOhdmu7PG2oFsjPDyir0uyOunvoesDTJ/LlGmeNdxU2FGQypeMemv8PrH0Mkx Hdu8z20VtzuxXDlQTLd9802kXiXKtX7B6Z15yu9pRReE1OAhGDWT7nCgk9JQxyI6mFSbhp dXPeB32KQ51qGUFG1LhpkYfWkM4tq5jQt1a2+9aEj0DPUln164uRYconG3VPx9QI060aVX K6/AC2ZRvEH4Fx3Md53LGlHcawDkYlq27NEfZ7UAqpSqd4FOoyZc5suhHhQCBSjDYaxiuq qjUky2zVlx1QgRmofnROT5K+ROWM8AicrEDcekXIkCkGkVyoW21JOg1aOo8ZHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655134538; a=rsa-sha256; cv=none; b=nsI+QWwtlenE/aiGuPEyr/7ZP1UZOD1a9/zec9yW+IocORmj1V7/E+DUnFLSsdQF5knLya ikxvK1shJOmRRG1hOsGuUH4j7I7YqqNGwa+FSyzbLSL6yKxQmm7hz0xsNFy5FBtvFJNkVy zruGwGmfuCPIMVIaeY8LT0gSka1Ig6IrEsz393PPeWPqJ3YmdNZ55uvBiuCM/7VBdQGP7n H9xHu8Mg8AK66FmMO8bidO1lVjLv24cT6vx8aTVhdWQdFtcTLD5nM4D7IB3vLROEtuA5Rc yA5nwNERrxd3jbA52N1/EXclAtSSyTPF375mOWI9yuhcCW4RDf6V7PX+JVMd3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=43c72c45a1856c6cdf25a22d259528d5a4040973 commit 43c72c45a1856c6cdf25a22d259528d5a4040973 Author: Andrew Gallatin AuthorDate: 2022-06-13 15:32:10 +0000 Commit: Andrew Gallatin CommitDate: 2022-06-13 15:32:10 +0000 lacp: Remove racy kassert In lacp_select_tx_port_by_hash(), we assert that the selected port is DISTRIBUTING. However, the port state is protected by the LACP_LOCK(), which is not held around lacp_select_tx_port_by_hash(). So this assertion is racy, and can result in a spurious panic when links are flapping. It is certainly possible to fix it by acquiring LACP_LOCK(), but this seems like an early development assert, and it seems best to just remove it, rather than add complexity inside an ifdef INVARIANTS. Sponsored by: Netflix Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D35396 --- sys/net/ieee8023ad_lacp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c index 6656ebb2b400..65b3a337eedc 100644 --- a/sys/net/ieee8023ad_lacp.c +++ b/sys/net/ieee8023ad_lacp.c @@ -876,9 +876,6 @@ lacp_select_tx_port_by_hash(struct lagg_softc *sc, uint32_t hash, hash %= count; lp = map[hash]; - KASSERT((lp->lp_state & LACP_STATE_DISTRIBUTING) != 0, - ("aggregated port is not distributing")); - return (lp->lp_lagg); }