From nobody Fri Jan 17 04:33:34 2025 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 4YZ6LQ5byLz5kPw6; Fri, 17 Jan 2025 04:33:34 +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 4YZ6LQ2tt1z3mcQ; Fri, 17 Jan 2025 04:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737088414; 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=z6aZHG3YXet4qgtiEfBfuqTijjtEKCZRSnyyyOXbTrY=; b=n4Af6fRBffRx8Mx62CT66fg7TtfDy3hRUGQ2ImUJyq8b5jICVv8YBFGPb1hWnRcONgvGl+ P5UZpFH6G2S0tsBWmJos+iJDV4bf/WUmbRvgqkBuuQ1lcvbb0WDixpE+kjBIEqKicN4pjB 0TSJbsnmfUxemWAdTFJlLg2nOlAUoRP39xQ3TSV/U/M5iLLUBKP/fv0CeImpXLN9IvK0kf rj7ZfO5n19VoBxp966UTy7SmyF5o8NPI7K8yobZ5rUI/aWAGo4+S0j0wjQt39S05VZR9lJ Q8abdtbAClYFOeklG7pZYqFJBJ8FMJtzoafaREZn3Vy7T8M6rIPDkf7XggP/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737088414; 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=z6aZHG3YXet4qgtiEfBfuqTijjtEKCZRSnyyyOXbTrY=; b=T6cQtu6nkLY/Zd9OV4fj2CtIQGTHFL0KhfIKqz1e39fNnESNn54XjKqoeJfINGaPoYGV94 QuIYYy+HCcSZRhAc7y5zUCOHi/JcWo9ZTrELGpDJnl3HEJ3bJO9evj1xqPRVWpwF81LxpH xoxW0JsLYB2ZVe7Kna5j1VGx+ixL/vSak6jT5rkK5MU4cAq5oB6xJ7MKJM0IRmu/YMTNUb YTnRn8v+pXIBPHs0TScs/vkEepwLNqcUZA6DZq6x2QnWoKqjYnZNU+8/VdBk67MUyKtyUs YInfgJtzERBRH0l5JTn3V3oa7iGhw1Ncq8K76X93uBksQITwEhKLienxnicpSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737088414; a=rsa-sha256; cv=none; b=OBoNOUBvB+Do/nyTUeBdzYWhKSKGQGsnDwexhYd8r1w6vj2mhfuiWCpHZFORDAirmcICuB h8yjYA5hNEqCZPspJHT6RyYMBXEDXvaV7M+IgDW5x794EfXKp81iix72nE+rz9gm+F1fEf Gpr23Ab3UsGNrQwaP9ia5l1WUcuCOS74f3myZWGiPMYcXIwXvRlXe6MqNbqfpQ0nSFY/ZS lfGtAlLMZGjSoCCvGVJvOXst5WNvYeRGzHo1Dxep70xW267SukNKxOx4AjqxiIpj0gKyda uujGEtyig2zBws4qBdHVh3rHIfO1w/GW+6kr5KfMhP5v3EASisQQHws2Klsdqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YZ6LQ2Gqcz12tT; Fri, 17 Jan 2025 04:33:34 +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 50H4XY8x072737; Fri, 17 Jan 2025 04:33:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50H4XYgN072734; Fri, 17 Jan 2025 04:33:34 GMT (envelope-from git) Date: Fri, 17 Jan 2025 04:33:34 GMT Message-Id: <202501170433.50H4XYgN072734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 38d947b53cbc - main - netisr: fix compilation without VIMAGE 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38d947b53cbca845926bdd91272ce1c65ba59ecb Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=38d947b53cbca845926bdd91272ce1c65ba59ecb commit 38d947b53cbca845926bdd91272ce1c65ba59ecb Author: Gleb Smirnoff AuthorDate: 2025-01-17 04:29:40 +0000 Commit: Gleb Smirnoff CommitDate: 2025-01-17 04:32:53 +0000 netisr: fix compilation without VIMAGE - Don't use bare vnet(4) definitions in the KASSERT, they aren't available on a kernel without VIMAGE. Just through MPASS() here. This is more of documenting assertion rather than an assertion that may actually fire on an unmodified kernel. - V_netisr_enable is different to the rest of V_ prefixed globals. On a kernel without VIMAGE it basically doesn't exist, instead of being present as a single instance. Fixes: a1be7978f1879313c141882a1e0812b468dead57 --- sys/net/netisr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/net/netisr.c b/sys/net/netisr.c index e9b8fa4d833c..7b4368276c58 100644 --- a/sys/net/netisr.c +++ b/sys/net/netisr.c @@ -396,8 +396,7 @@ netisr_register(const struct netisr_handler *nhp) * Test that the requested registration is valid. */ CURVNET_ASSERT_SET(); - KASSERT(IS_DEFAULT_VNET(curvnet), ("%s: curvnet %p is not vnet0 %p", - __func__, curvnet, vnet0)); + MPASS(IS_DEFAULT_VNET(curvnet)); KASSERT(nhp->nh_name != NULL, ("%s: nh_name NULL for %u", __func__, proto)); KASSERT(nhp->nh_handler != NULL, @@ -457,8 +456,8 @@ netisr_register(const struct netisr_handler *nhp) npwp->nw_qlimit = netisr_proto[proto].np_qlimit; } - V_netisr_enable[proto] = 1; #ifdef VIMAGE + V_netisr_enable[proto] = 1; VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { if (vnet_iter == curvnet)