From nobody Thu May 23 05:37:29 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 4VlH4T55zFz5H9vH; Thu, 23 May 2024 05:37:29 +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 4VlH4T3JhSz4PKC; Thu, 23 May 2024 05:37:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442649; 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=lKOAS40rxuXRvgwuKdKkFpIu6TstVPWzVYPfSgstQJE=; b=T6WmNwwmE54Jmak6eJTDkh1Z6lK94Pkv/0SFbFYk+C8zFViNu5bQgaznEKLz+iDxDZHIFE ap4H+9xgjXk7LSMJLiZHI6BrVr4WDcfWgN3WIIYTZxT/PwaxEjXl2CP4qdfJMWcKc8l7IG abVMhTB9ZBb23W6uTCrfzvxTrgRP6l8ffEk1c0Kz1FtGO8Pb1MvsZSOOaIZWASCgdqC6V1 JA4yIs1sDfSSWzNvV+lEu7HEd2Ahaqkpbr2UE256yX8I0rCOpcJSmHWh9ZiIQnI7CxvvBW ff97DKVqe8XaAn8lcLkw7IjVPYonLwJLr/UPOsKXXXZjd2f0vIRKZzUJ5Ol94w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716442649; a=rsa-sha256; cv=none; b=sOTdABHBWnvy8TIQ0Szclbj3IjzrRTXpqYyTzUl5xEKfWYLJGjn+r5+TBmnxEvbnZtS3xe vgWbcYc6MtfiRz4lxu/Oi62fK+p0ed/x6n3ngJGMYcCCjXFXBfGKYlwcDh5oeD11n1Gjhw uI0xtQNk4WhLiXwl6A4IawSoGmsuEkBe9KtRJGGR3MuvsE7VuUXtaAUQYvNntE8K1yEkd7 Jkzbt6WzU5hS6EjXKviniOe+j3G/Dr29GKD3GyoqPSxy1uHyeStJOc8wTyaGa/6xs5h0qb kPp+99vVurgWsOL1RiScNwxMJq5YSqvZjeQlD7nbECA+4pXffQ4vxZVeRanOAA== 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=1716442649; 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=lKOAS40rxuXRvgwuKdKkFpIu6TstVPWzVYPfSgstQJE=; b=fI8gpiHP3rpqKYphScSLjbUng3vu8A6KQoqCSMKJiNtEfYbd+SejXgB6dNcHRUhBMIclnr 85soq8hc/u3H/FniyID9g3e8qCWsbdpvmxss9GfxiG/HdqwSgayB/fxSWpRbzrGzDOgM59 EykKlFymD9QxZIY1CYkh54hfCZ1jIZ+rpYhhozWNaMYPeTZoDmsGva/arlmO4C89qYvXle uJf0lp/EKIPr1Dyz7FPrsIWKOAZZ8dR5ZduFGSKHGh6FNnyRzbQkqeMMcucy4EBUgcfow9 BrU13N77WwV73oN2TwBGTbW4TgaVMaw76eE3FWJptmoE2pv5MWG3teP440dW3Q== 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 4VlH4T2rX1zdCJ; Thu, 23 May 2024 05:37:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N5bTCa048043; Thu, 23 May 2024 05:37:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N5bTGD048040; Thu, 23 May 2024 05:37:29 GMT (envelope-from git) Date: Thu, 23 May 2024 05:37:29 GMT Message-Id: <202405230537.44N5bTGD048040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec Subject: git: 0e5e6a9419ea - releng/14.1 - fib_dxr: s/KASSERT/MPASS/ 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: zec X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 0e5e6a9419ea1c966cfe1afe4c5e46e9bbcd43c8 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=0e5e6a9419ea1c966cfe1afe4c5e46e9bbcd43c8 commit 0e5e6a9419ea1c966cfe1afe4c5e46e9bbcd43c8 Author: Marko Zec AuthorDate: 2024-05-07 15:33:23 +0000 Commit: Marko Zec CommitDate: 2024-05-23 04:28:30 +0000 fib_dxr: s/KASSERT/MPASS/ MFC after: 1 week Approved by: re (cperciva) (cherry picked from commit 1261fc325c3cb96eeaddf3ed5a6b1c7c6a08d064) --- sys/netinet/in_fib_dxr.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 8b1e92d01d35..82245ecf6e66 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -474,8 +474,7 @@ chunk_ref(struct dxr_aux *da, uint32_t chunk) cdp->cd_max_size = size; cdp->cd_base = fdesc->base; LIST_INSERT_HEAD(&da->all_chunks, cdp, cd_all_le); - KASSERT(cdp->cd_base + cdp->cd_max_size == da->rtbl_top, - ("dxr: %s %d", __FUNCTION__, __LINE__)); + MPASS(cdp->cd_base + cdp->cd_max_size == da->rtbl_top); } cdp->cd_hash = hash; @@ -525,7 +524,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) sizeof(struct range_entry_long) * size) == 0) break; - KASSERT(cdp != NULL, ("dxr: dangling chunk")); + MPASS(cdp != NULL); if (--cdp->cd_refcnt > 0) return; @@ -536,8 +535,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) /* Attempt to merge with the preceding chunk, if empty */ cdp2 = LIST_NEXT(cdp, cd_all_le); if (cdp2 != NULL && cdp2->cd_cur_size == 0) { - KASSERT(cdp2->cd_base + cdp2->cd_max_size == cdp->cd_base, - ("dxr: %s %d", __FUNCTION__, __LINE__)); + MPASS(cdp2->cd_base + cdp2->cd_max_size == cdp->cd_base); LIST_REMOVE(cdp, cd_all_le); LIST_REMOVE(cdp2, cd_hash_le); cdp2->cd_max_size += cdp->cd_max_size; @@ -548,8 +546,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) /* Attempt to merge with the subsequent chunk, if empty */ cdp2 = LIST_PREV(cdp, &da->all_chunks, chunk_desc, cd_all_le); if (cdp2 != NULL && cdp2->cd_cur_size == 0) { - KASSERT(cdp->cd_base + cdp->cd_max_size == cdp2->cd_base, - ("dxr: %s %d", __FUNCTION__, __LINE__)); + MPASS(cdp->cd_base + cdp->cd_max_size == cdp2->cd_base); LIST_REMOVE(cdp, cd_all_le); LIST_REMOVE(cdp2, cd_hash_le); cdp2->cd_max_size += cdp->cd_max_size; @@ -560,8 +557,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) if (cdp->cd_base + cdp->cd_max_size == da->rtbl_top) { /* Free the chunk on the top of the range heap, trim the heap */ - KASSERT(cdp == LIST_FIRST(&da->all_chunks), - ("dxr: %s %d", __FUNCTION__, __LINE__)); + MPASS(cdp == LIST_FIRST(&da->all_chunks)); da->rtbl_top -= cdp->cd_max_size; da->unused_chunks_size -= cdp->cd_max_size; LIST_REMOVE(cdp, cd_all_le); @@ -875,7 +871,7 @@ dxr_build(struct dxr *dxr) uint32_t trie_frag; #endif - KASSERT(dxr->d == NULL, ("dxr: d not free")); + MPASS(dxr->d == NULL); if (da == NULL) { da = malloc(sizeof(*dxr->aux), M_DXRAUX, M_NOWAIT); @@ -1273,16 +1269,14 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, int update_delta = 0; #endif - KASSERT(data != NULL, ("%s: NULL data", __FUNCTION__)); - KASSERT(q != NULL, ("%s: NULL q", __FUNCTION__)); - KASSERT(q->count < q->size, ("%s: q->count %d q->size %d", - __FUNCTION__, q->count, q->size)); + MPASS(data != NULL); + MPASS(q != NULL); + MPASS(q->count < q->size); da = dxr->aux; - KASSERT(da != NULL, ("%s: NULL dxr->aux", __FUNCTION__)); - KASSERT(da->fd != NULL, ("%s: da->fd %p", __FUNCTION__, da->fd)); - KASSERT(da->refcnt > 0, ("%s: da->refcnt %d", __FUNCTION__, - da->refcnt)); + MPASS(da != NULL); + MPASS(da->fd != NULL); + MPASS(da->refcnt > 0); FIB_PRINTF(LOG_INFO, da->fd, "processing %d update(s)", q->count); for (ui = 0; ui < q->count; ui++) { @@ -1315,8 +1309,7 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, #ifdef INVARIANTS fib_get_rtable_info(fib_get_rh(da->fd), &rinfo); - KASSERT(da->prefixes + update_delta == rinfo.num_prefixes, - ("%s: update count mismatch", __FUNCTION__)); + MPASS(da->prefixes + update_delta == rinfo.num_prefixes); #endif res = dxr_init(0, dxr->fd, data, (void **) &new_dxr);