From owner-dev-commits-src-main@freebsd.org Thu Jan 14 16:46:19 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AF674E8011; Thu, 14 Jan 2021 16:46:19 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGqvZ4Cgfz4chJ; Thu, 14 Jan 2021 16:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 EC9075637; Thu, 14 Jan 2021 16:46:17 +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 10EGkHWt023683; Thu, 14 Jan 2021 16:46:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10EGkHwx023682; Thu, 14 Jan 2021 16:46:17 GMT (envelope-from git) Date: Thu, 14 Jan 2021 16:46:17 GMT Message-Id: <202101141646.10EGkHwx023682@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: a33b29a0447b - main - qat: Count request allocation failures 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: a33b29a0447b24a054ecc48e51355d2abf7e6b5b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 16:46:20 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a33b29a0447b24a054ecc48e51355d2abf7e6b5b commit a33b29a0447b24a054ecc48e51355d2abf7e6b5b Author: Mark Johnston AuthorDate: 2021-01-14 16:41:28 +0000 Commit: Mark Johnston CommitDate: 2021-01-14 16:41:28 +0000 qat: Count request allocation failures This can be useful for troubleshooting performance problems. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) --- 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 68cb17078c25..6f74ff3b4bc1 100644 --- a/sys/dev/qat/qat.c +++ b/sys/dev/qat/qat.c @@ -1596,6 +1596,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; } @@ -2069,6 +2073,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 f3245ad725b6..3326dc268fc1 100644 --- a/sys/dev/qat/qatvar.h +++ b/sys/dev/qat/qatvar.h @@ -818,6 +818,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 */