git: f88b31885c4f - main - cxgbe(4): meminfo should get the TLS region's limits from the hardware.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 06 Apr 2022 20:18:00 UTC
The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=f88b31885c4fd1f80bed2c3b3f2eb05f98367f31 commit f88b31885c4fd1f80bed2c3b3f2eb05f98367f31 Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2022-04-05 21:54:11 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> 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++)