Date: Tue, 24 Sep 2024 15:58:00 GMT From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 3883300afe0b - main - cxgbe/t4_tom: Do not set unresolved entries to STALE in t4_l2t_update. Message-ID: <202409241558.48OFw0Xq056465@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=3883300afe0bff5c5658274c4d8cfe773d08343e commit 3883300afe0bff5c5658274c4d8cfe773d08343e Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2024-09-24 14:35:09 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> 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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409241558.48OFw0Xq056465>