From nobody Sat Aug 8 00:44:02 2026 X-Original-To: dev-commits-src-branches@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 4hH2MR0NBvz6mZ2Z for ; Sat, 08 Aug 2026 00:44:03 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hH2MQ3bKgz3wcH for ; Sat, 08 Aug 2026 00:44:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786149842; 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=eTTMmj22nyKgBbRKT38Zsoou2YOQ4x1gySm4WwEjHe0=; b=x15t7QIb4YpmHrKG9AfELn+SKjlPa2/z7bXXM7DS913le2vNrM3icYhpeqgb6fvmFcDujC t1ZWJUc1asSgTT4GA+ZjWc4BpYn6FrSXuE7loJe23wQVKeEEu33QnqG/8vpqGaf3xpxyge Py8yAQNNIQZJEkvpdQ4Q7SrnotVXpprK/RezRDvJwq9WxTdhG3+xsiSDgQWhgdxWWq7cNF vu2OQaBbDZ2TZqecZ5Xa/mFJF0H/UaxyfryTGO3F5chxfKah4po2ie59V7ZwAf5d4+FZqt dByc7sdSGSI8Qw9HNBQwbBzA7Y08nOn/8AfzCYCi+JD/jFmnB1Lrmal7PnlolQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786149842; a=rsa-sha256; cv=none; b=e5wSk5EnMY17Nf5Xw//YXZiJoXyY4/RvECOAjy4uAyPPfwkXzZloqXOI4/hhJrKgKzv6/G 1jP1E1pyfSPai6cam2vXijpfb1uXuA03yNBfEhPI2qTRxpkGKlpLXnZZhmN+yoKPYv78oh a+e1Hf6N8XJsSkkmKofgpqtFm8Amxb0V3PyNuRGMX7lqd0bg2bUCATyOpZBFR+Zl92Ea5O VPOhL5MGnYQ7XixL+G2Ysq7G99bHmuN8hAbvsHCvyCng4wJI4ckWClU07WbwYjqqXDEj8u SbFRpMXTtE/NXArrhOY0YrfvsUKFHxP1dhzaaFMAVt50Icff6Jwrfavvltz8Ug== 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=1786149842; 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=eTTMmj22nyKgBbRKT38Zsoou2YOQ4x1gySm4WwEjHe0=; b=lSJe3t6PuoJ1xWQJtmppCij1YDx3ykVpRlNi3TmlER4jprFpULA9w56qwZYFz0aiCLf8Re SXftjL0GCpOut5W394q/SdotaEiK90C4OrpBvb55vmrldo49sOAOud5GKh8fZHh9wk09ua DcfaBEMAz/mkULOAghmlg+26KQd/crYaRVLwXFNnHrXchNxC//zw0bF57oMcIdDG/wdBOI l92kQdRCnsASMAKNR1AyHDUsYC1riEORQUh80DGEIlNjgy/wZQIeVfSBbaXso4g+OrpGLL J0p98f7OjOOkVgQ6+/TPJSuqg762ulCkldroLDRpqW6c5OGu8gNhXVjyd5yQ0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hH2MQ2GmBztP for ; Sat, 08 Aug 2026 00:44:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fbaa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 08 Aug 2026 00:44:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: f19cf6441e00 - stable/14 - ixgbe: fail fast on VF-held PF mailboxes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f19cf6441e00c1140a8b8e6eb3dc6c51c0da5cb4 Auto-Submitted: auto-generated Date: Sat, 08 Aug 2026 00:44:02 +0000 Message-Id: <6a767bd2.3fbaa.5fba87f3@gitrepo.freebsd.org> The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f19cf6441e00c1140a8b8e6eb3dc6c51c0da5cb4 commit f19cf6441e00c1140a8b8e6eb3dc6c51c0da5cb4 Author: Kevin Bowling AuthorDate: 2026-07-31 10:41:02 +0000 Commit: Kevin Bowling CommitDate: 2026-08-08 00:40:43 +0000 ixgbe: fail fast on VF-held PF mailboxes The active PF mailbox operations use the legacy helpers. The mailbox API import changed check_for_msg into a read-only probe and added up to 2,000 500-microsecond lock retries. If a VF leaves VFU set, the PF cannot acquire the lock, busy-waits for up to one second, and leaves VFREQ pending so the delay can repeat. Give the legacy checker its old consume-on-check behavior so a failed read does not leave VFREQ asserted. If VFU is already set, fail immediately instead of retrying, while preserving retries for PF-side contention. Do not force RVFU, which would discard peer transaction state. (cherry picked from commit 2a678cfeb5838978ef3a1907c686142d03237e15) --- sys/dev/ixgbe/ixgbe_mbx.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index eef30733b7b2..810b282bbd0e 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -789,6 +789,22 @@ static s32 ixgbe_check_for_msg_pf(struct ixgbe_hw *hw, u16 vf_id) return IXGBE_ERR_MBX; } +/* + * Legacy callers expect checking for a message to consume its interrupt + * cause before attempting to read the mailbox. This keeps a failed read + * from leaving VFREQ pending indefinitely. + */ +static s32 ixgbe_check_for_msg_pf_legacy(struct ixgbe_hw *hw, u16 vf_id) +{ + s32 ret_val; + + ret_val = ixgbe_check_for_msg_pf(hw, vf_id); + if (ret_val == IXGBE_SUCCESS) + ixgbe_clear_msg_pf(hw, vf_id); + + return ret_val; +} + /** * ixgbe_check_for_ack_pf - checks to see if the VF has ACKed * @hw: pointer to the HW structure @@ -876,8 +892,12 @@ static s32 ixgbe_obtain_mbx_lock_pf(struct ixgbe_hw *hw, u16 vf_id) /* Reserve mailbox for PF use */ pf_mailbox = IXGBE_READ_REG(hw, IXGBE_PFMAILBOX(vf_id)); - /* Check if the mailbox is already owned by the PF or VF */ - if (pf_mailbox & (IXGBE_PFMAILBOX_PFU | IXGBE_PFMAILBOX_VFU)) + /* A peer-held mailbox cannot be recovered by retrying here. */ + if (pf_mailbox & IXGBE_PFMAILBOX_VFU) + return IXGBE_ERR_MBX; + + /* Retry transient contention with another PF-side caller. */ + if (pf_mailbox & IXGBE_PFMAILBOX_PFU) goto retry; pf_mailbox |= IXGBE_PFMAILBOX_PFU; @@ -1127,7 +1147,7 @@ void ixgbe_init_mbx_params_pf_id(struct ixgbe_hw *hw, u16 vf_id) mbx->ops[vf_id].release = ixgbe_release_mbx_lock_dummy; mbx->ops[vf_id].read = ixgbe_read_mbx_pf_legacy; mbx->ops[vf_id].write = ixgbe_write_mbx_pf_legacy; - mbx->ops[vf_id].check_for_msg = ixgbe_check_for_msg_pf; + mbx->ops[vf_id].check_for_msg = ixgbe_check_for_msg_pf_legacy; mbx->ops[vf_id].check_for_ack = ixgbe_check_for_ack_pf; mbx->ops[vf_id].check_for_rst = ixgbe_check_for_rst_pf; mbx->ops[vf_id].clear = ixgbe_clear_mbx_pf;