From nobody Mon Jul 22 00:55:41 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 4WS1zj0bdBz5QwJ8; Mon, 22 Jul 2024 00:55:45 +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 4WS1zd5zw7z4hpk; Mon, 22 Jul 2024 00:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721609741; 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=UtXC8eTvpUr2HmaEk+1U52Ip6FQWSiJUGHsutD966G8=; b=W24xRwtYoE2rF67yWRa0PppI5b8ptd6EWBYbb6Eauuu1XXV9s8LWAntVdPQIF/c211wFV9 YR4dI2+MXyOZOXAm+8DCzhOGxGwR1Ic0f4ElQCVBHdkUWfEUxpjHFgM1SGsXKNfC27RQcU lrGJaXhCYUhq1v301h4j1innXwPLk+k9pYy0or8f4jh1LqOfZk2T1wM4q++iIW8es4Gvot TD5U1vlwdUk9e9LYzwh3HsveacdKnjEB+J8nlb4NPmrpnAnHnyvwOVsojI+eJkml1ZZwKF yd5C7PfbVcQrh3X3fBaqpA8w+Mg8ZR6tZvwp8O/B+Y6W9WKkjYX+AOQuYtRONA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721609741; a=rsa-sha256; cv=none; b=fhhbQbwHpZFIM2XHAVlPKmsgM7RlwfesiuhB7b/x70JFD8KI9JWbYGnpEdX5jqRK1GgDWG Sz1C9Qa7NWkQyCcF9qf9Nw4UP+9VJhJCPLdclY2q0PQlwKpKQyu6qf2iWr3JTAnrq3kX6c PlCAyZwLPJnq/xcsLy9aGGjb/zUsGY61nrPd/0XT56jTmWaE1wDE38dkaxzWEtgcSDEuoD KoW6tEVtTKCvl0MffFPQbSaOq72E07tL+5CFailtv+yQtrHASKfC8JjA/2TviRGAGCcso6 WznqsUjUYAGa2tk8l1Cj/JeOqwnwYgMgiI5kzrrsQAF0Pnhu1+3fVwEt08eYrg== 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=1721609741; 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=UtXC8eTvpUr2HmaEk+1U52Ip6FQWSiJUGHsutD966G8=; b=p1ss+F4G3p6bQtt28vo9xmB/5oKUGxQlvo8DYykJ7W3AW8uBfJETKAye2m1yI2aJaIlRRu 6FLu936uRvMwtZy+3CsOsEJMOVbOGFUCncBvfV3KutBYsVpEwl/mFwTCf8heOxYgvyS6B7 ptvEE2VI2bGQ48AgON7tLZryJZHG+J6yC433j9D0eyijVgE8IlhVNbbVDCOuFmJ4G4FF8L RhKaxy08dK8F8LapANtFjCiwGwwkXQ1Y4D+5+b8vRexGYJdr+TiivDohuj64Hz0AqJGDUl CrTMx1VnzHrPE2KIj0I+S12/oXUBmTUvQQCFUP1ceh18msT7Y8oXMT4KFjGbHg== 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 4WS1zd5DMJzNQW; Mon, 22 Jul 2024 00:55:41 +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 46M0tfAL007467; Mon, 22 Jul 2024 00:55:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46M0tfeo007464; Mon, 22 Jul 2024 00:55:41 GMT (envelope-from git) Date: Mon, 22 Jul 2024 00:55:41 GMT Message-Id: <202407220055.46M0tfeo007464@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f48bfa248f39 - stable/14 - axgbe: Remove a nonsensical use of kernel_sysctlbyname() 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f48bfa248f3991f4a6d9b99b4dcc5099886855b4 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f48bfa248f3991f4a6d9b99b4dcc5099886855b4 commit f48bfa248f3991f4a6d9b99b4dcc5099886855b4 Author: Mark Johnston AuthorDate: 2024-07-14 16:15:23 +0000 Commit: Mark Johnston CommitDate: 2024-07-22 00:55:28 +0000 axgbe: Remove a nonsensical use of kernel_sysctlbyname() No functional change intended. MFC after: 1 week (cherry picked from commit d254651de392538fa7f5c0020093dde0ca06c614) --- sys/dev/axgbe/if_axgbe_pci.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/dev/axgbe/if_axgbe_pci.c b/sys/dev/axgbe/if_axgbe_pci.c index 7f661e6d9c98..7a7c8539405c 100644 --- a/sys/dev/axgbe/if_axgbe_pci.c +++ b/sys/dev/axgbe/if_axgbe_pci.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -589,8 +590,6 @@ axgbe_set_counts(if_ctx_t ctx) struct axgbe_if_softc *sc = iflib_get_softc(ctx); struct xgbe_prv_data *pdata = &sc->pdata; cpuset_t lcpus; - int cpu_count, err; - size_t len; /* Set all function pointers */ xgbe_init_all_fptrs(pdata); @@ -617,21 +616,12 @@ axgbe_set_counts(if_ctx_t ctx) * number of Rx queues or maximum allowed */ - /* Get cpu count from sysctl */ - len = sizeof(cpu_count); - err = kernel_sysctlbyname(curthread, "hw.ncpu", &cpu_count, &len, NULL, - 0, NULL, 0); - if (err) { - axgbe_error("Unable to fetch number of cpus\n"); - cpu_count = 1; - } - if (bus_get_cpus(pdata->dev, INTR_CPUS, sizeof(lcpus), &lcpus) != 0) { axgbe_error("Unable to fetch CPU list\n"); /* TODO - handle CPU_COPY(&all_cpus, &lcpus); */ } - DBGPR("ncpu %d intrcpu %d\n", cpu_count, CPU_COUNT(&lcpus)); + DBGPR("ncpu %d intrcpu %d\n", mp_ncpus, CPU_COUNT(&lcpus)); pdata->tx_ring_count = min(CPU_COUNT(&lcpus), pdata->hw_feat.tx_ch_cnt); pdata->tx_ring_count = min(pdata->tx_ring_count,