From nobody Wed Apr 06 20:18:00 2022 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 A76D61A8BBCB; Wed, 6 Apr 2022 20:18:00 +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 4KYbRX3w7Mz4Y0k; Wed, 6 Apr 2022 20:18:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649276280; 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=+Or3/wB2GSZYummoWKn5K8PWVgcqYi39sj06Vl8hCLM=; b=Ax56Xkp9bpTXPk5EA6LPYxBTcCL/0hKgj2YAo1wWvCgKqbISvL+RNGcStfM/kO/y6fMTFJ I7GjwZ+QFZQnFJX/C3Kg5fYB0+ifJFpj5KWOxp7e/JOcPCA0VGwZmQC8nykegSKKLusyka IgDz2W7bfvKk90YkZGsdkUQURmt0973vDZ8vkpDltReK4Cgek8mRc2HobwGpHt/rUHHdJH OKVQB+UguaSBb8SXlwnTXmQcnz+A9QcWInctUMmpa9i3vsoZQG2u+7YRB9Ow1x1zirq2qA tUN1/f0GeynB43GrRp6vFYOz1MWrD3mQ+r6tb1incwWGWXMGWm/+T0had6Ipbg== 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 55B1A21E89; Wed, 6 Apr 2022 20:18:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 236KI0kU025051; Wed, 6 Apr 2022 20:18:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236KI0sp025050; Wed, 6 Apr 2022 20:18:00 GMT (envelope-from git) Date: Wed, 6 Apr 2022 20:18:00 GMT Message-Id: <202204062018.236KI0sp025050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: f88b31885c4f - main - cxgbe(4): meminfo should get the TLS region's limits from the hardware. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f88b31885c4fd1f80bed2c3b3f2eb05f98367f31 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649276280; 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=+Or3/wB2GSZYummoWKn5K8PWVgcqYi39sj06Vl8hCLM=; b=Wj34f13X6WKTzxlQcqlAv8hlSHXT23XR5ax0nK+yLXOoobF7wJRrEfIRjnbdafoDigqOui mcNo/x06maSyjDwDYwOlB3IUWMU+mKLT1r6fHJsfsjitRIL9p3t80Q/3Js5tiuM5Ca8mMV BILK9zgLPN/fWrY6UXMjrLnPOW4cf0k9RVQyVCy5k9h+ncCCDhzNwcHyR05qqDkAJF5J0L EUivQR5Iq2bZLhlb/Hh5FaiKF4Rl46IfSCErDxpDpOK5v4zSu9nzPBClx/9DT77OafviF2 BU+aM2hvfz29+eWpXCGnqodUyjACuQ0vLhFMjZwo++PI6EOCgbX+m1KZT8qzIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649276280; a=rsa-sha256; cv=none; b=PvVPUwLBSN6H6ObvqpLyB4KviocGEHakyzkhLUDojQhPSLhPilT85xdQQ1PX4GrM9M7ZbI B3dk5kJVjzqXiKOWI2RYv7UFRjU9mYULc/2Ew3xF67c28XUdXEiMqI8kS3O7nHAw6EPoiE ElViMP4B/ZuRYPSUg06e2lGnmvn07WE3GRz57l4xX45RBKVJIYVXYR+RIeyDmHC0p2grTA KV/o494SqlC8ygjRt/g78HKPMstTwFe2u2qK8EFd8ZGM5TyrVdAlXf/lMMAiUhj7AbLYhZ Iugw7S3d4TwcYDPy3Lfv4/VOPjMsDSxEikH8pAQgukBMJ5+dF4BDuQRQQSkppg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=f88b31885c4fd1f80bed2c3b3f2eb05f98367f31 commit f88b31885c4fd1f80bed2c3b3f2eb05f98367f31 Author: Navdeep Parhar AuthorDate: 2022-04-05 21:54:11 +0000 Commit: Navdeep Parhar CommitDate: 2022-04-06 20:15:25 +0000 cxgbe(4): meminfo should get the TLS region's limits from the hardware. meminfo is meant for debugging and it should read hardware configuration directly when possible instead of relying on values queried from the firmware. Rename the region to "TLSKey region" to match other drivers while here. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 898a1d1ca4f3..3b6b884f1077 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -9708,8 +9708,8 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) "Tx payload:", "Rx payload:", "LE hash:", "iSCSI region:", "TDDP region:", "TPT region:", "STAG region:", "RQ region:", "RQUDP region:", "PBL region:", "TXPBL region:", - "DBVFIFO region:", "ULPRX state:", "ULPTX state:", - "On-chip queues:", "TLS keys:", + "TLSKey region:", "DBVFIFO region:", "ULPRX state:", + "ULPTX state:", "On-chip queues:", }; struct mem_desc avail[4]; struct mem_desc mem[nitems(region) + 3]; /* up to 3 holes */ @@ -9824,6 +9824,8 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) ulp_region(RX_RQUDP); ulp_region(RX_PBL); ulp_region(TX_PBL); + if (sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS) + ulp_region(RX_TLS_KEY); #undef ulp_region md->base = 0; @@ -9862,13 +9864,6 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) md->idx = nitems(region); /* hide it */ md++; - md->base = sc->vres.key.start; - if (sc->vres.key.size) - md->limit = md->base + sc->vres.key.size - 1; - else - md->idx = nitems(region); /* hide it */ - md++; - /* add any address-space holes, there can be up to 3 */ for (n = 0; n < i - 1; n++) if (avail[n].limit < avail[n + 1].base) @@ -9877,6 +9872,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) (md++)->base = avail[n].limit; n = md - mem; + MPASS(n <= nitems(mem)); qsort(mem, n, sizeof(struct mem_desc), mem_desc_cmp); for (lo = 0; lo < i; lo++)