From nobody Tue Sep 24 15:58:00 2024 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 4XCkzD1m8Sz5Xwn0; Tue, 24 Sep 2024 15:58:00 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XCkzD1DLzz4Jjd; Tue, 24 Sep 2024 15:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727193480; 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=OukdR4d4mSqQ7m4paToZRfkyh7x2O10rZM04Fjp0geQ=; b=KVXVdJ34toLGcQykrR8t/2aH94VkYWbDOEbMJDzvnCD9N1FmMEKxaIXeb8JZs/NKsGCE0Y skOmsH49NN7QGicdXpJ18UmmaL3QLiIKZThXoVFdI90755cO9H+PQZWfHXTrDbBHtjW5Jl MAo8SrPtNUpPkOm0YE0cnK0B8enAvep54mSigLthOSBm728P7MBDEI/VqCDGdd18siFWaD X6rSmYRCVlWHslp8GTGOGI9XiJHE62u5D48GphKCSkuc4MA2BbLMoJXS98k94xk7iVhwmg KrwbeJtkh388hHhMWi/0FbaA3QIIENoM4U6xcrJmBpEyx9MtPCZXgphPSupuEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727193480; a=rsa-sha256; cv=none; b=HHw3lmjtiXXjgeIyAfV68GXXtbDNc9wNFyuw5kngruivm6+4jIW4JHxTIhtxSruzAXAr+Y Rk8u4EUr9TwtVpezRu+MJ2acGGUDn8B2dCH8V+LzRn0Eq7/AfxiKzDCK5J8WbumwCLxTkQ dFDExzYI3ne8geFRFH2aZx3RT2wa5PpfLdnqDBXZW/+7HXwQ0qToRXy6QBrrU8ngR1Ftk/ xxXlJb4C0gmfEtkxm8Ol6AODMCnbRiGK24W9IJWW0vTu302pckYb5ZX4ldYjh3irp6Ob59 EcheCEZjVCq/e/Afa68hjU/MEz9DNjtjpqitIHm6jLxWgO5LLAhz3HKN1QEtpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727193480; 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=OukdR4d4mSqQ7m4paToZRfkyh7x2O10rZM04Fjp0geQ=; b=ynis88yMKXwgXNqLisZy3YpevqRQ1RcX84tf6tDNN7VfNcbx7luZca6aszmnCKtDsjNg66 0rQ2C8rm5DwzK0xzl1/AjenUgb1tCJz3sglSUb4g4OJSGQC2JT43tVXUC6dgp/bb0wJWoS SSm1HorxMzpDk9ADLZObiPKz2jXuDB9udIzBXUazhfuzXQ4PErpjPj9nOnTOgxrimMkZrQ shSGD1uE1sxSlNejUDtkg6UPshqPdnNKr4BZo25w58hHxXcbMTxrSIgbSMkdT8AuGiT3Bf zIXlTPhVhcN9BECg/0WG+mz/RjNAVUL0otj9cBZyMkOLGdx2qeMyrzgLLKSWvQ== 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 4XCkzD0qPWzb8m; Tue, 24 Sep 2024 15:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48OFw0Pd056468; Tue, 24 Sep 2024 15:58:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OFw0Xq056465; Tue, 24 Sep 2024 15:58:00 GMT (envelope-from git) Date: Tue, 24 Sep 2024 15:58:00 GMT Message-Id: <202409241558.48OFw0Xq056465@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 3883300afe0b - main - cxgbe/t4_tom: Do not set unresolved entries to STALE in t4_l2t_update. 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3883300afe0bff5c5658274c4d8cfe773d08343e Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=3883300afe0bff5c5658274c4d8cfe773d08343e commit 3883300afe0bff5c5658274c4d8cfe773d08343e Author: Navdeep Parhar AuthorDate: 2024-09-24 14:35:09 +0000 Commit: Navdeep Parhar CommitDate: 2024-09-24 15:53:11 +0000 cxgbe/t4_tom: Do not set unresolved entries to STALE in t4_l2t_update. An L2 entry in the driver's hash was marked STALE unconditionally if it changed in the kernel when its driver refcount is 0. Fix the driver to do this for VALID entries only. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_tom_l2t.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/tom/t4_tom_l2t.c b/sys/dev/cxgbe/tom/t4_tom_l2t.c index be42a887323f..8cc3e633444a 100644 --- a/sys/dev/cxgbe/tom/t4_tom_l2t.c +++ b/sys/dev/cxgbe/tom/t4_tom_l2t.c @@ -441,7 +441,8 @@ t4_l2_update(struct toedev *tod, if_t ifp, struct sockaddr *sa, mtx_lock(&e->lock); if (atomic_load_acq_int(&e->refcnt)) goto found; - e->state = L2T_STATE_STALE; + if (e->state == L2T_STATE_VALID) + e->state = L2T_STATE_STALE; mtx_unlock(&e->lock); break; }