From nobody Wed Sep 16 21:05:51 2026 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 4hlWdJ4NSgz6sKtq for ; Wed, 16 Sep 2026 21:05:56 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hlWdJ3vpQz4nWn for ; Wed, 16 Sep 2026 21:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789592756; 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=r7on6MtB986TGZGqGNRGKvYMk5Gh8lSAioC9uoMHCVI=; b=G7vsEqvon5ywUgSP6l7H4a0hnGHANGlDOPXnyWJd3AO0bV5NG9lzJQVxavzyPxa5TX2pmT s/1ZDlRw768o2aPCSUFd+nNruv6dw6wUwFmNf7ZTmjz+RA47ctYIIBaPHz66TIo/mtyt9p /QF+HZPWR2rMUcSLwELPMpI/gMQx2DruA/8gii/WeQbsieoGkMTbgB3sR3wsfwux35nbIw Gkh5nCnGYBmRJpPYrlZ3V8kby1MpU/3D/a9KlkBFwY9aN7u2Z1mFJKthiS3tPELMu9p3kJ uOs0jgBVJI/0G8/21CoyjmzsTIoWy6gPotRgjUHe0PzrYla9gioYo36+fz3r5Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789592756; b=Nx+pNkufgPQE+DUC1fWaZGRRlUMIxT7Yl4DMOi3UqOmJtLIZGAuBh1uR9pncDdTN5XBbbD 4QPx0RQsCHxat/FtEg/aCIhSqcaoKT58wkPIvhC13qM81Z0bND8Tj0lpDpGB9mQP77kflo Wf2ihHP2NGPG36wIGymo4Gabu1+lha/lwHam4qplK0Z2W+ig4atPVE9p+K+TjbAZw/mlmi ImSbQgrqqBMqZO9yOjxAxtK23qwX1wgIIQR/QNymwJAvTFf9Kx/0uqvfN1DBxglYkydcDs oSly0AOEC+xpIsLkrdauq2WJRya5GrE3/9tgjEcWu6zXDe7Dmmo7n2tR2i/f/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789592756; 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=r7on6MtB986TGZGqGNRGKvYMk5Gh8lSAioC9uoMHCVI=; b=B45CDyfnxmXFjhQoc6RzcQRFNmh8Hwq3mgk8MHIEM04gZ7SVg6uN3T2U9W7PGLg7THYX4H U+3wbBTKuENG30BVud208E39kSc3rXyE3nmNGqVm3/ywauuvyvj2/p1Dyxgyz/Y9oZR35M vw1eEFXAIr1bnq2iK5tCqeo6HAsmvFT3guXAUgjnKsiX4rsdUEMec+C8oVaQGVAYnd/07R wvhXdULgSztn6uRSsB/Hny4CyISHPVlmzzbkRJWO+XErv82ZmHfDfEetgAAlXTiIeSTanx KNm0PfdCO75K9iZGhgtBpaJf190KNUWHodABSy/pkwZkeT9rSH5LC8Nt5Y/eRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hlWdJ2zFYz13FF for ; Wed, 16 Sep 2026 21:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40fd5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 16 Sep 2026 21:05:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: f308d6d4846a - main - igbv: Recover disabled Hyper-V transmit queues 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 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/main X-Git-Reftype: branch X-Git-Commit: f308d6d4846a51c2d0839840d6eabbbe70309515 Auto-Submitted: auto-generated Date: Wed, 16 Sep 2026 21:05:51 +0000 Message-Id: <6aab04af.40fd5.72aac3c6@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f308d6d4846a51c2d0839840d6eabbbe70309515 commit f308d6d4846a51c2d0839840d6eabbbe70309515 Author: Kevin Bowling AuthorDate: 2026-09-16 20:45:16 +0000 Commit: Kevin Bowling CommitDate: 2026-09-16 21:05:43 +0000 igbv: Recover disabled Hyper-V transmit queues The Windows PF can disable a VF transmit queue while continuing to report carrier up. Link polling alone then leaves the VF operationally up even though it cannot transmit. The reproduced VLAN failure shows this state with PF driver 14.1.5.0 and an MDD indication in the host trace. Check queue zero from the admin path only while the Hyper-V VF is running with sanitized queues and a completed host handshake. Report operational link down and invalidate the statistics baseline when the queue is disabled. Request recovery through the normal iflib stop/init path only when a fresh, accessible STATUS read reports carrier up. Rate limit requests if the host continues to hold the queue disabled, and leave recovery pending while carrier is down. Document the recovery behavior and clarify why the Hyper-V reset retains the VF-local software reset before its host reset/MAC exchange. Sponsored by: BBOX.io --- share/man/man4/em.4 | 8 +++++++- sys/dev/e1000/if_igbv.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/share/man/man4/em.4 b/share/man/man4/em.4 index 187930de087d..317e25926469 100644 --- a/share/man/man4/em.4 +++ b/share/man/man4/em.4 @@ -32,7 +32,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd September 15, 2026 +.Dd September 16, 2026 .Dt EM 4 .Os .Sh NAME @@ -112,6 +112,12 @@ the host and use the .Xr hn 4 synthetic data path. .Pp +If the host unexpectedly disables a running Hyper-V VF transmit queue, +the driver reports link down. +If the hardware reports carrier up, the driver requests recovery through +the normal stop/init path. +These recovery requests are rate-limited if the host keeps the queue disabled. +.Pp The driver supports Transmit/Receive checksum offload. Jumbo Frames are supported except on 82542-based adapters and Hyper-V VFs. .Pp diff --git a/sys/dev/e1000/if_igbv.c b/sys/dev/e1000/if_igbv.c index 62b09973b301..eafae1250053 100644 --- a/sys/dev/e1000/if_igbv.c +++ b/sys/dev/e1000/if_igbv.c @@ -94,6 +94,7 @@ igbv_hv_reset_hw(struct e1000_hw *hw) ctrl = E1000_READ_REG(hw, E1000_CTRL); if (ctrl == 0xffffffff) return (-E1000_ERR_RESET); + /* Reset VF-local state before the Hyper-V host reset/MAC exchange. */ E1000_WRITE_REG(hw, E1000_CTRL, ctrl | E1000_CTRL_RST); E1000_WRITE_FLUSH(hw); for (i = 0; i < E1000_VF_INIT_TIMEOUT; i++) { @@ -558,6 +559,40 @@ igbv_if_update_admin_status(if_ctx_t ctx) return; } + if (igbv_is_hyperv(sc)) { + u32 status, txdctl; + + if (sc->vf_reset_pending) + return; + txdctl = E1000_READ_REG(hw, E1000_TXDCTL(0)); + if (txdctl != 0xffffffff && + (txdctl & E1000_TXDCTL_QUEUE_ENABLE) == 0) { + /* Carrier can remain up after the PF disables queue DMA. */ + sc->vf_stats_valid = false; + sc->link_speed = sc->link_duplex = 0; + if (sc->link_state != EM_LINK_STATE_DOWN) { + sc->link_state = EM_LINK_STATE_DOWN; + iflib_link_state_change(ctx, LINK_STATE_DOWN, 0); + } + /* + * Do not reset while carrier is down. Limit requests + * if the host keeps the queue disabled with carrier up. + */ + status = E1000_READ_REG(hw, E1000_STATUS); + if (status != 0xffffffff && + (status & E1000_STATUS_LU) != 0 && + ratecheck(&sc->vf_last_queue_log, + &igbv_queue_log_interval)) { + device_printf(dev, + "Hyper-V VF queue disabled; requesting recovery\n"); + sc->vf_reset_pending = true; + iflib_request_reset_if_up(ctx); + iflib_admin_intr_deferred(ctx); + } + return; + } + } + if (!sc->vf_reset_pending && atomic_readandclear_32(&sc->promisc_pending) != 0) (void)em_if_set_promisc_impl(ctx,