From nobody Sun Jul 14 18:30:19 2024 X-Original-To: dev-commits-src-main@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 4WMYmD16C4z5R8Kn; Sun, 14 Jul 2024 18:30:20 +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 4WMYmC6sp0z4Xt0; Sun, 14 Jul 2024 18:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720981820; 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=+VIgeOoB0kdSLwayOWnvCzbMDFcb4kmilz38Cl6IWUY=; b=oI5AtdA+gXAawmkRmbsi1wLyAmrJdEtWAK5m6HfxWNkoC5JEKKzkeqVy9uqUSMlqsp0cjU eRxON6lE423cPXWFmslE6XI0e71KsBByMJC3KOlMumVAlLC+3W3uZc3tF3EJxNfoFvkBx6 eY6KYr/ZAUqMYLo+zpbv8xv5cyfkZgqKgAjKJUVeNggD4KjAuJhz0XzJnXJVZ1Y37SiUdy dsw8L75yluQg5Sju6wos6WtDhO+FIa44UkrInF1E5woGb9pKoZZBSlO3bupzieBxP/ifn4 VzKWCsqSh7YkuaCsWjS4tdo8sQXKQMlyHgDdrYNOwhW/W3/dIYdkp+uddj+3ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720981820; a=rsa-sha256; cv=none; b=nnzN/apylW+fZkSBcVwH1E/UngT5J9DY9f7jEw5YhAUE1EwnRvYbfUa0gXPQddynew/7yW jldORGcE4rAERHJDcwRIenpEBVWUC9jg1p2qka6JkoL45jWN4hJCvuJTRpFQArXJMaRbPT t0FrjX2gE9PEcLPZWWXO5Ol2kB16eA4YQtH1zkMQAcMhdG6RoooSEiLBGBRCkVX9DXJXIM 7hsd9FK4bFl4NB6zMpfb0jrunF3pBj+wrRVb63fDicOKIVIRTYON3wuTzwtvTBlp21ak6m iL76ujdTtMQTZxVBOMAbC/LRDx+vm7e9g3LbcxpwH0B246xPZJaZLJW6wgQhWA== 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=1720981820; 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=+VIgeOoB0kdSLwayOWnvCzbMDFcb4kmilz38Cl6IWUY=; b=LXd/g3woyqScxko9AiNTg+u10rSutD4qgE25b9I/2SArlZqGPzwC8WAHDihJpN5KS28Wx6 Y23RksGoVNbvCohoub3N56WNnKIoSTtRLBtKjg27nJaqhWgyyjOI5LbGhS+1Z7ckHPWyVk QKGPcHIo1WEYEj9WJ4MAGDVA85x9ucNLumkyhUKnii4xnoiaDZhYdLU7+57u2Mh9UHqHF/ TgECdlBwFONp+7velY1wqKT/LcGtk3tApycVPssHAvrGqFrHfzfJgIiOv+rTexC0If48ji Hx0KMzOULn3AmJoJkzIDWJDDlOv9sRw5prhVRj6hAiFVkPZUgH9qplLx1rF57A== 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 4WMYmC6T52zKx7; Sun, 14 Jul 2024 18:30:19 +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 46EIUJat020503; Sun, 14 Jul 2024 18:30:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46EIUJ6b020499; Sun, 14 Jul 2024 18:30:19 GMT (envelope-from git) Date: Sun, 14 Jul 2024 18:30:19 GMT Message-Id: <202407141830.46EIUJ6b020499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d254651de392 - main - axgbe: Remove a nonsensical use of kernel_sysctlbyname() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: d254651de392538fa7f5c0020093dde0ca06c614 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d254651de392538fa7f5c0020093dde0ca06c614 commit d254651de392538fa7f5c0020093dde0ca06c614 Author: Mark Johnston AuthorDate: 2024-07-14 16:15:23 +0000 Commit: Mark Johnston CommitDate: 2024-07-14 18:29:15 +0000 axgbe: Remove a nonsensical use of kernel_sysctlbyname() No functional change intended. MFC after: 1 week --- 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 3e68525067fb..320799e77188 100644 --- a/sys/dev/axgbe/if_axgbe_pci.c +++ b/sys/dev/axgbe/if_axgbe_pci.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -610,8 +611,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); @@ -638,21 +637,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,