From nobody Tue Aug 27 23:16:03 2024 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 4Wtk1f2TDQz5MZKb; Tue, 27 Aug 2024 23:16:06 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wtk1b6XT5z41NY; Tue, 27 Aug 2024 23:16:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724800563; 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=MMxEOCf0Lq2YnNNXOhYD5vAwI7wwD50iolcrxXwf5eE=; b=lsSfhwkngMKA8WQiBkZT19tJJJrD+dpODFqgrrtWc4Y4r3orT16Yn8bDLBqk0hF8RvQTMd AbVmepHz1inr1g9xR99t3fx2/tRC8RBB0bFeHv2SFH3EZeKhznxk5ycTssZzICfKXCm4Hz 21gAbuJS8e6hNYJ8LRqPCV61g4K6gL6RLr/tBLd9OqB9/iwCoIJ7GyCcSDZGJHFAcNl6Ro D65rdTireGv+2t5kR/N05S/eQhWWzH5Ivg2fUHXofVNCy+50YGIxXbZYW+upQK1VvFwQK2 LsLTeyPcymVPMZF1iDi+o3dGbCtr7s2gfKrbrChHmlb5eyVBWCGmPaZVI5Cv9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724800563; a=rsa-sha256; cv=none; b=Z6EJjJX2wS4iwzU19GS6Tq3ukkwfuc82bXoxFgvFux2BdJaeGflpz4/cwUKGmXR1osHhr4 afONqjoAOvoz2LgxPBSUDEKZBz7FkT1oYtrEo6dVczVZrKghGidvBhZDkZgxvy1+mZ4Rza 5ytxHCtytxG9cDScSNg2FhRHtIUeX5D5OBZKbvFXdcyXZPqaIiyN06zNRlDG+ZzhP+QFMZ wgKY/Wm/bHJncYXIbF5gsA2CIsKzuDXmuoC/n6CVLpjLNqFZAuSfg9ZS+3mH3Kv8xwSTwR B+mobn/uANZodzwJCL7pVDElrPHxQ6c4UGX8t37pLCpzFANHNMEuft8VMt5qHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724800563; 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=MMxEOCf0Lq2YnNNXOhYD5vAwI7wwD50iolcrxXwf5eE=; b=Ga/W4amh785qJiRiWWt9m/yN8Q5IeeBq44Fl8sUOaLAsBWj6BD2EY73CxW7amWV1Pf82oB 1dL/tkNAqyveQxUPayaTELkdZ7kYG2mwghT5yG7ooRMMCHiL+p1fxaj5x3DhwI56kMj0hA 5VCiu2qWdE4R3bMxzDxy/Jt6ITlP2nRhIcfhfyUliYLU5MXGk9Fpi7IpV3yoiyyHoG7YCF kszKoOH6yCXamFts5JsH3rWngRV+Z5PolCB4ZZXofMSkr4TDoagS9BOKRGIIwmCbxktuJc nk+0MpCj48/unq8Le2J32OLZC1o3JKO8oWCfcpL0Us/SC+jNGAoudSQx40X0MQ== 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 4Wtk1b3qskz17qM; Tue, 27 Aug 2024 23:16:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47RNG3Tr020966; Tue, 27 Aug 2024 23:16:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47RNG37E020963; Tue, 27 Aug 2024 23:16:03 GMT (envelope-from git) Date: Tue, 27 Aug 2024 23:16:03 GMT Message-Id: <202408272316.47RNG37E020963@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: 4fecb7015432 - main - ixl(4): Add more debug information for queues' config 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4fecb70154322fb8160da10d87c633cefaff7db3 Auto-Submitted: auto-generated The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=4fecb70154322fb8160da10d87c633cefaff7db3 commit 4fecb70154322fb8160da10d87c633cefaff7db3 Author: Krzysztof Galazka AuthorDate: 2024-08-27 23:11:18 +0000 Commit: Eric Joyner CommitDate: 2024-08-27 23:13:19 +0000 ixl(4): Add more debug information for queues' config Include information about interrupt linked lists in queue_interrupt_table sysctl and add new debug sysctl queue_int_ctln allowing to check current interrupt state. Signed-off-by: Krzysztof Galazka Signed-off-by: Eric Joyner Reviewed by: erj@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D45403 --- sys/dev/ixl/ixl_pf_main.c | 53 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c index 4e1b1001efdc..9755136df848 100644 --- a/sys/dev/ixl/ixl_pf_main.c +++ b/sys/dev/ixl/ixl_pf_main.c @@ -91,6 +91,7 @@ static int ixl_sysctl_do_pf_reset(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_do_core_reset(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_do_global_reset(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_queue_interrupt_table(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_debug_queue_int_ctln(SYSCTL_HANDLER_ARGS); #ifdef IXL_DEBUG static int ixl_sysctl_qtx_tail_handler(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_qrx_tail_handler(SYSCTL_HANDLER_ARGS); @@ -2528,6 +2529,12 @@ ixl_add_sysctls_recovery_mode(struct ixl_pf *pf) OID_AUTO, "queue_interrupt_table", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_queue_interrupt_table, "A", "View MSI-X indices for TX/RX queues"); + + SYSCTL_ADD_PROC(ctx, debug_list, + OID_AUTO, "queue_int_ctln", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + pf, 0, ixl_sysctl_debug_queue_int_ctln, "A", + "View MSI-X control registers for RX queues"); } void @@ -4899,6 +4906,7 @@ ixl_sysctl_queue_interrupt_table(SYSCTL_HANDLER_ARGS) { struct ixl_pf *pf = (struct ixl_pf *)arg1; struct ixl_vsi *vsi = &pf->vsi; + struct i40e_hw *hw = vsi->hw; device_t dev = pf->dev; struct sbuf *buf; int error = 0; @@ -4915,11 +4923,52 @@ ixl_sysctl_queue_interrupt_table(SYSCTL_HANDLER_ARGS) sbuf_cat(buf, "\n"); for (int i = 0; i < vsi->num_rx_queues; i++) { rx_que = &vsi->rx_queues[i]; - sbuf_printf(buf, "(rxq %3d): %d\n", i, rx_que->msix); + sbuf_printf(buf, + "(rxq %3d): %d LNKLSTN: %08x QINT_RQCTL: %08x\n", + i, rx_que->msix, + rd32(hw, I40E_PFINT_LNKLSTN(rx_que->msix - 1)), + rd32(hw, I40E_QINT_RQCTL(rx_que->msix - 1))); } for (int i = 0; i < vsi->num_tx_queues; i++) { tx_que = &vsi->tx_queues[i]; - sbuf_printf(buf, "(txq %3d): %d\n", i, tx_que->msix); + sbuf_printf(buf, "(txq %3d): %d QINT_TQCTL: %08x\n", + i, tx_que->msix, + rd32(hw, I40E_QINT_TQCTL(tx_que->msix - 1))); + } + + error = sbuf_finish(buf); + if (error) + device_printf(dev, "Error finishing sbuf: %d\n", error); + sbuf_delete(buf); + + return (error); +} + +static int +ixl_sysctl_debug_queue_int_ctln(SYSCTL_HANDLER_ARGS) +{ + struct ixl_pf *pf = (struct ixl_pf *)arg1; + struct ixl_vsi *vsi = &pf->vsi; + struct i40e_hw *hw = vsi->hw; + device_t dev = pf->dev; + struct sbuf *buf; + int error = 0; + + struct ixl_rx_queue *rx_que = vsi->rx_queues; + + buf = sbuf_new_for_sysctl(NULL, NULL, 128, req); + if (!buf) { + device_printf(dev, "Could not allocate sbuf for output.\n"); + return (ENOMEM); + } + + sbuf_cat(buf, "\n"); + for (int i = 0; i < vsi->num_rx_queues; i++) { + rx_que = &vsi->rx_queues[i]; + sbuf_printf(buf, + "(rxq %3d): %d PFINT_DYN_CTLN: %08x\n", + i, rx_que->msix, + rd32(hw, I40E_PFINT_DYN_CTLN(rx_que->msix - 1))); } error = sbuf_finish(buf);