From nobody Tue Sep 15 02:02:44 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 4hkQJh5yGGz6sMJm for ; Tue, 15 Sep 2026 02:02:44 +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 4hkQJh5CYQz4YxW for ; Tue, 15 Sep 2026 02:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789437764; 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=dEpsOAa3W8SqcjV0HpTvHHSNLPQBqXUAlt6h2l1CGu8=; b=NEHsRDIuZaC89uXRtgASnw6g1/0KTYBOT+9EyziRY6e3TN+wsKB41hCHEGiVwPsd1bIjSu GTGFzn/x5WNBdd6ZGs2B0nTKdWt3wsHA4Bq/M2YOBMyb1mDafM4qAKAslarW+BtRmuCZb8 qIvki9P/y6+Iy9OjSqWtaQsz9g/UV56OukqmzBkzc4DJntBT8ox23GdcayHDvA9p4h94sh /aiul/mn1XYltmV36xt781S/RQeVUA/FsJj3Obl12OrbL1bt+rqmM4TbgpyNHn1qiioSCc Jjp8WRGQVhvRxXFiewRXRUYq2YYXch2WwH+XoeRcwOYK5yL4iDhcQykVdl54YA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789437764; b=GH7s3ZSzG1kg6I6912vfiLp8fD2BY+fGmptJTHNxrVTGqjqoySNVsL2mTFcV3QdFJKGec5 LE/h9NPHUw5ygBGksNS9TOC/BQmiyVdj5lb/4VGZNWkes5rBFi0+9nBgxbEJvtnghtUZKx wcNVsVxUgsn4WylvJPD1ORDRfF/shxN4aERBuX+S9xeQhvriuH+V7Z5Boouc/H53GlLmbT VGXxv2c31uhKXAj6/JKqPA/Y2eHQQNsMgLw8y4yX9YWwKrreSUgbTkNS4vdJvKLE39sMPn sSM5QTEIrGg/SWRrTe+WwXC1xx4LJ3Vcibqt/wlRZ3NUt8f9PpNiJiZ4S1ugFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789437764; 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=dEpsOAa3W8SqcjV0HpTvHHSNLPQBqXUAlt6h2l1CGu8=; b=h8W53vZvR5Y2QOqKvobdr3AyvabXZDs85KODCKcQ+B2TSeCFMP3WOuQ5jPONx9oJpDjLvy 4qFL1hBkGoMHfbKl9AAUFqZaahEvXTnhcXWzJ45QUS3SDtRvwry4pyDLHrdaxZs2zMAI/b bKhpZP6h6L02R82sbVHi1C+MHapcY9a4sJMwBliP9ddgmUZkVT1fLbSXWMB3xtruK+UQPJ nDdp2c2OnmI6pkkpac7J6++YKgJRo8J6pu0eBDGuVKxdUiEoPcl67amkFDW85SNpLdT9Bq U7gs5SaPAozmpc4yVn6ilgg/1SdyE3ILpm776N4fk3ZpYkrDhFzdwJymml7ERg== 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 4hkQJh409jzglB for ; Tue, 15 Sep 2026 02:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25d09 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 15 Sep 2026 02:02:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 8e816fc2e98c - main - hn: Invoke the owned VF's transmit queue flush callback 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: 8e816fc2e98c8c0bf0b6fef3bd5f52bc03c843ce Auto-Submitted: auto-generated Date: Tue, 15 Sep 2026 02:02:44 +0000 Message-Id: <6aa8a744.25d09.2421d29b@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=8e816fc2e98c8c0bf0b6fef3bd5f52bc03c843ce commit 8e816fc2e98c8c0bf0b6fef3bd5f52bc03c843ce Author: Kevin Bowling AuthorDate: 2026-09-15 00:26:14 +0000 Commit: Kevin Bowling CommitDate: 2026-09-15 02:02:26 +0000 hn: Invoke the owned VF's transmit queue flush callback The generic if_qflush() only clears if_snd. Calling it directly for a transparent VF bypasses the driver's callback and its private software transmit queues. Add if_getqflushfn(), matching the existing callback accessors, and invoke the registered callback while hn_vf_lock protects the VF pointer. Flush an attached VF whenever transparent mode owns it, not only while the VF datapath is enabled. Disabling transmit during handoff does not discard packets already queued to the VF. This also covers the inactive interval after fallback. Non-transparent VFs remain independently owned and are not flushed by hn. Synthetic queue flushing is unchanged. MFC after: 2 weeks Sponsored by: BBOX.io --- sys/dev/hyperv/netvsc/if_hn.c | 5 +++-- sys/net/if.c | 6 ++++++ sys/net/if_var.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index e4774b285a15..72bef946b0d5 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -6240,8 +6240,9 @@ hn_xmit_qflush(if_t ifp) if_qflush(ifp); rm_rlock(&sc->hn_vf_lock, &pt); - if (sc->hn_xvf_flags & HN_XVFFLAG_ENABLED) - if_qflush(sc->hn_vf_ifp); + /* Transparent mode owns the VF's queues even while switching paths. */ + if (hn_xpnt_vf && sc->hn_vf_ifp != NULL) + if_getqflushfn(sc->hn_vf_ifp)(sc->hn_vf_ifp); rm_runlock(&sc->hn_vf_lock, &pt); } diff --git a/sys/net/if.c b/sys/net/if.c index 552ae04d3215..084d0ffb8a65 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -5087,6 +5087,12 @@ if_setqflushfn(if_t ifp, if_qflush_fn_t flush_fn) ifp->if_qflush = flush_fn; } +if_qflush_fn_t +if_getqflushfn(if_t ifp) +{ + return (ifp->if_qflush); +} + void if_setsndtagallocfn(if_t ifp, if_snd_tag_alloc_t alloc_fn) { diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 8297520f7607..6e2b7743aa00 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -738,6 +738,7 @@ if_start_fn_t if_getstartfn(if_t ifp); void if_settransmitfn(if_t ifp, if_transmit_fn_t); if_transmit_fn_t if_gettransmitfn(if_t ifp); void if_setqflushfn(if_t ifp, if_qflush_fn_t); +if_qflush_fn_t if_getqflushfn(if_t ifp); void if_setgetcounterfn(if_t ifp, if_get_counter_t); void if_setsndtagallocfn(if_t ifp, if_snd_tag_alloc_t); void if_setdebugnet_methods(if_t, struct debugnet_methods *);