Date: Mon, 18 Jan 2021 17:32:41 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 59f0f60327ad - stable/12 - qat: Count request allocation failures Message-ID: <202101181732.10IHWfC6085345@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=59f0f60327ade81a031cee81887f24f5bdf8b1d1 commit 59f0f60327ade81a031cee81887f24f5bdf8b1d1 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-01-14 16:41:28 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-01-18 17:01:15 +0000 qat: Count request allocation failures This can be useful for troubleshooting performance problems. Sponsored by: Rubicon Communications, LLC (Netgate) (cherry picked from commit a33b29a0447b24a054ecc48e51355d2abf7e6b5b) --- sys/dev/qat/qat.c | 5 +++++ sys/dev/qat/qatvar.h | 1 + 2 files changed, 6 insertions(+) diff --git a/sys/dev/qat/qat.c b/sys/dev/qat/qat.c index 83c1b8fa970d..7a232b085095 100644 --- a/sys/dev/qat/qat.c +++ b/sys/dev/qat/qat.c @@ -1660,6 +1660,10 @@ qat_crypto_init(struct qat_softc *sc) SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "ring_full", CTLFLAG_RD, &sc->sc_ring_full_restarts, "Requests deferred due to in-flight max reached"); + sc->sc_sym_alloc_failures = counter_u64_alloc(M_WAITOK); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "sym_alloc_failures", + CTLFLAG_RD, &sc->sc_sym_alloc_failures, + "Request allocation failures"); return 0; } @@ -2167,6 +2171,7 @@ qat_process(device_t dev, struct cryptop *crp, int hint) qsc = qat_crypto_alloc_sym_cookie(qcb); if (qsc == NULL) { + counter_u64_add(sc->sc_sym_alloc_failures, 1); error = ENOBUFS; goto fail2; } diff --git a/sys/dev/qat/qatvar.h b/sys/dev/qat/qatvar.h index b475f2eb0c0e..76b9f5106f68 100644 --- a/sys/dev/qat/qatvar.h +++ b/sys/dev/qat/qatvar.h @@ -821,6 +821,7 @@ struct qat_softc { counter_u64_t sc_gcm_aad_restarts; counter_u64_t sc_gcm_aad_updates; counter_u64_t sc_ring_full_restarts; + counter_u64_t sc_sym_alloc_failures; /* Firmware */ void *sc_fw_mof; /* mof data */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101181732.10IHWfC6085345>