Date: Thu, 2 Feb 2023 07:39:24 GMT From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 6d187cf93b04 - stable/13 - cxgbe(4): meminfo should get the TLS region's limits from the hardware. Message-ID: <202302020739.3127dOrd061851@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=6d187cf93b04f819b0cbcc789dd115196db9e4ce commit 6d187cf93b04f819b0cbcc789dd115196db9e4ce Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2022-04-05 21:54:11 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2023-02-02 07:10:41 +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. Sponsored by: Chelsio Communications (cherry picked from commit f88b31885c4fd1f80bed2c3b3f2eb05f98367f31) --- 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 309f719d504f..32348d3c4b8c 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -9861,8 +9861,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 */ @@ -9977,6 +9977,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; @@ -10015,13 +10017,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) @@ -10030,6 +10025,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++)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302020739.3127dOrd061851>