From nobody Wed Sep 16 21:05:51 2026 X-Original-To: dev-commits-src-main@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 4hlWdC3DMNz6sL8v for ; Wed, 16 Sep 2026 21:05:51 +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 4hlWdC2ZWTz4nQX for ; Wed, 16 Sep 2026 21:05:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789592751; 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=WGhFq5ux5J5/hHKQNtx1pxLgCRJ4lHj+a2SkJjZi8zwLs6HQ25CJO3HB+X2KbLI+EoU8JG rJ3OvmestOWUxYbpxCGFwFH+Kk09squx2hLNaAc1QaO7hAFb9ZsZJ+ZDk1NbA1NshaZcUK KBILcCx6aGIfFt98K7aKvrrRizHkP+Jt5Pu32iNWTqg7wk/mFLmMzcrQmVDiEZB+SdVNhB SljO7kc/rmhOXRksxOTnEcUeu0lizl2KlUHQvPD9MVkA+FLLk7AWNBbOBgeAd5ZupRNaJz ePzJkaR48mg6r5mhxc8ygYcfBl6MdPGMCVQ41dQCwgLzbNscW0I50MejHxVDNg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789592751; b=Xc/u0Geq+3BzuuJ1rFdFXqCXq2UCrdz6j1ifEOa3SbQW4dDuM1preD+is0YgmcC1oZudfd q6Lk9LykSy0fy/lH39FFuRFpB6REW3mYBXU0VmD2ZXJaw8lh3xujifqLg4jEveD7Vl7aLx xSPct7uIPLNhjVw+Y5hMRv1bffTkdRjJ3gREGzIf00+VWV2ugg8n/26f4aMONwSTe9CxIr 52JWE0QT0gT23ZGgE3yE/v3t7RL9l1Ri5pPZLZG/3yijlNImORZcpVU7PBTAbP2eXrsbHr rWsVOuXXZihnXWkQVUDsGUiaqf3UtBJv59gLIxTCRk0dC/s0E4ulMUTjG4ksCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789592751; 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=cKyikq3oE+EczqIBK9KldBF/7ci27UuZUSnm2h+wYGGz9WQe0gwgUfV5WDVLL8o6et7rxA 3gZ0xQUCVqL24b2Kds29RvcKQ6ZodFRGR0KC1bzN7yYHIezanZDwWfP3k893qiUwPI1kms Ot2wNWxIXA4LJEcJLHdHidwYei+6+bzt7HQ8xsw+vo53CzIKxL9QO4Gt5p7+EDyyWpGONw m01WJ9sA/FWwjnRcjY7O8qFt9Sn6z/svhP4q7HXIRSR+dBsf4hrQVt8Hmr9KzPxJVCV712 q02U1c5FASo5NB340YKqcgR2N32HMnYn2SrteBXQ7skdOUQhxatGni02Z+Se/Q== 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 4hlWdC1M05z13fP for ; Wed, 16 Sep 2026 21:05:51 +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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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,