From nobody Mon Oct 21 18:39:31 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 4XXPH81xn9z5Zd2V; Mon, 21 Oct 2024 18:39:32 +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 4XXPH774dHz4GKh; Mon, 21 Oct 2024 18:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729535972; 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=T4qRN7CkXO8cKfsZIA/yNlFIThz+L6s9HIIdkgFFY4g=; b=eV4d0qihnJht2XWl2vU3bi/j5EgiALSfaQEBXOseQJDr65ZlriN8UwHsHYLsKO3X9IRJxD 2WItoStzcDTGv2EsvR9380r4yIR8HjHyO+S02nAKo2UvikN4TO87Q+hBK5T6TFYpR6mwaW LnqVSMM2UuTyoQ9LVZovolYjWZk4KuIqpnJKQS8zgpesFlkV9nmtIXookY7NLgZR2QzNX6 BoEeZEdw2lrkmaJ2Q8JMTLHnNyKSQwago2OzAgM7oMLtE44Lb8takJBNdjOWHYnNuKWYtz wbEjgOaDNm4sL4I4kdpJFa16biipoQnKvv2ox9t5gvn96U+LPIH0ez3UnWDPLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729535972; 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=T4qRN7CkXO8cKfsZIA/yNlFIThz+L6s9HIIdkgFFY4g=; b=dw9cPSySix9Mk0Qp2q5786XqKmD5cvzuNR0mpISx0lcWUGbvtlTpjQOqraCfbwy8U+odla 0q7+EkkIrxo5wPYLJv4hHRD3LkOK74dXHfEhkmaziaSzWZkJwQkGm3fIoTAOIC1m8NhjQV P9KYWB8O/erQd+OhZGHCWVm2RPB7tYsXvR9iX22DxMOEbY10EfDUDG1/p46DhvDdMV7gyB XuVegF/cVlKa+O8R+CgJaRdfvR44LTr2FMme4zik0lqzzz3fByMw8jwnwhyw7i6iF6GEBq tDWkpZZO7qzvslRgNLwNQfwUqupe+rSzrCKbVvgE7WWXD4J7yMPXad/CiSvlEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729535972; a=rsa-sha256; cv=none; b=bkl9PRMP3DwnxOuwvpfDIYRjbKBRqG6b8hFipLYPGalheplwn3xekk/VbXkqSLVA+yQmho VgD+53PLfrU543ccP0HHs3/DuCQ/1k4lrKa7vhOU6bHHx4ExZy4r44ateUItF7UQzOmRIZ WNprnUDFNgoxog4teY4uK1cHxBO9grt1O8zlqy17LLseTH28XpHiSpHnMf4Or9gh/6lxiG Wc+fuQEgo9Y6YRttDHxxi2i7u3wBzlHc/14zwiUYLyEHwICofsfqFxVLyZ/wUd9wqTyYMp rYDoPj8walirzTtpl97O3JujcfVpU2mA5r1FfF9t00uDL/6SR1JPWQylpoMJow== 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 4XXPH76gfWzh9X; Mon, 21 Oct 2024 18:39:31 +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 49LIdV11037223; Mon, 21 Oct 2024 18:39:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49LIdVZq037220; Mon, 21 Oct 2024 18:39:31 GMT (envelope-from git) Date: Mon, 21 Oct 2024 18:39:31 GMT Message-Id: <202410211839.49LIdVZq037220@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: b56fe21c6df2 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: b56fe21c6df2911f96263675298e19e9b8720366 Auto-Submitted: auto-generated The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=b56fe21c6df2911f96263675298e19e9b8720366 commit b56fe21c6df2911f96263675298e19e9b8720366 Author: Navdeep Parhar AuthorDate: 2024-09-24 14:35:09 +0000 Commit: Navdeep Parhar CommitDate: 2024-10-21 17:14:23 +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. Sponsored by: Chelsio Communications (cherry picked from commit 3883300afe0bff5c5658274c4d8cfe773d08343e) --- 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; }