From nobody Thu Oct 29 05:02:06 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 4jFXCL1nhBz6xmkW for ; Thu, 29 Oct 2026 05:02: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jFXCL16GNz4gT2 for ; Thu, 29 Oct 2026 05:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793250126; 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=z++iEcpc3gt3NfCPyH6MSmFuLzsUooRx6j+p0JhrB2Q=; b=OColfJQSmirehSlExX11GHng4f9F203SzMVp/Mw9UEvU3lRNPpKyDlPan7wlFv5c+Fta30 AU3HfDmKFfNv+B7DQ+6rIM8qrYAWr/9QCqMW3OnX9wVHxEwTfo6wxh0F6pLM0asBofEowK zmjMTrCQAePxhS52ivLB8IFdLpV937IgTyyr2ri/qa7dL3TIPLh3Mgqeb7EJICDj2MMiTi 0RbM2KVBqEYqilLVgW6eIzElf/EYV/h5SbSljXIm1TNbDHmR94TtgT5qXH3EURIFZyX9Zk 1VgIEgA+503bVNcu6mJFzQubMN04I9ObZ9IxGkFL9YMrjKZAP5TWYQu6GfM3Og== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793250126; b=Svk6j4v7nIlyBIsU6EKEA2q5zQpZKMJaBktUAxIJfIG3pHDpMD0jbdjmQaAcRIMgkSq/Sp 7YWkMT7iTaBIhY7Rwzpm+T947FWFQqIqkMTT5IXWYWP6jbCa7BwNpiKMLt2JAvMvYa/z7s CClIPgENmXb9lbqPzz+YBllOpnHF3EXzWl5bgOP4pXpPzyivl0eO3lGPaywqn6WFv+bbV+ wgqNsQghf1BfheYSIje55Mmnbwa/5rQvejZn4Xp2VxTUSbjAO+8OLsvDP72ns9ERaU9/6i YllmT73Fqom7kXsKQX1TbbFoLw6aAk3Uy3go5IIp3e/cZl7AzLbLZsqeZKVCpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793250126; 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=z++iEcpc3gt3NfCPyH6MSmFuLzsUooRx6j+p0JhrB2Q=; b=vZhEtODsTkRzgWgq4NNH9p8LPA9CS3UD97lZjqDmSdQ1i+hAHIDBgXeB09CPorXSC2NFRd Pe4n0pWdfP0F8X+UEZFkWipON9qPGeHw1CNFLQgfxlhdMxNT0eiRu8ZC5otpMEX/vHcfwL PeEy6ks5CspXBBuckmzgnKjpd6+JqX3L+asvfJSi3crINlUO1Bg3ZtHyKZ5eLcbNOxCgzc u5HKzsa9v4A73pgcVGfRNR3LZXpX6B8lZWOMeTTz/AQHy5WWm9cdPKyyKmR6dS4hXH2656 4QkA3Lx+9SMk7joRTs4qVyV80DZZ34WugYYwsJpGSDEwKpzD+0H2Akd2GSZAhw== 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 4jFXCL0mp8zPCJ for ; Thu, 29 Oct 2026 05:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32353 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 05:02:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: f6d7a063ae11 - stable/15 - hn: Invoke the owned VF's transmit queue flush callback List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository 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/15 X-Git-Reftype: branch X-Git-Commit: f6d7a063ae11bce38a142965a94bb149381d503f Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 05:02:06 +0000 Message-Id: <6ae2d34e.32353.221d1857@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f6d7a063ae11bce38a142965a94bb149381d503f commit f6d7a063ae11bce38a142965a94bb149381d503f Author: Kevin Bowling AuthorDate: 2026-09-15 00:26:14 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 05:01:55 +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. Sponsored by: BBOX.io (cherry picked from commit 8e816fc2e98c8c0bf0b6fef3bd5f52bc03c843ce) --- 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 fd49a8cb100d..e86df282fd56 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -6253,8 +6253,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 6267afafe361..ec8385bb93a5 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -5064,6 +5064,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 3d0f0624aed2..60d9378dbb76 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -717,6 +717,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 *);