From nobody Fri Sep 18 12:00:41 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 4hmWRG3C3Pz6sMST for ; Fri, 18 Sep 2026 12:00:42 +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 4hmWRF5WJCz4Kl7 for ; Fri, 18 Sep 2026 12:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789732841; 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=cifYZcyLwGtGuZwTPp7JV/RH+1ZuJi+PqHViulyG6Hk=; b=W52xBvOb2CH7p7sfE/6OhbsGEBx/8oYg77b15opH1/tkYQSJKcAsy2vkB/9lf/wRZufMYA EMo9N4B1qNs6iuSFqEtlY2n0vOZ60Ozcw4yRVG6R/ohvYTMyXD9NNXV3zbNcwuhan2UkQE eIKXbLb2spg7MizG/veZO7g8g6FXN0NAc10QIquwncVj8Pdyqc+fjo3IDJVX7er2RvrKfV ogOx+04NicAG7OYlbM41/DJMPoHMjMEMNNXUlzzs3jyolrHKrr7pmpu4tcKX74TT59UH4E yCGLbhlheQJuc1yiikI2EqMTp8dRbU+paGDudpnokQW2Z0Kt63jE9QMPN/z7yA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789732841; b=wR9WIcdS/O3ibxBdh5mR8/glRjXRnapVsDoQjvYoxsHiA6AtEgO0GzrYVkgY9/7RzJR/c/ ZONiurLnEesvj8SsmOEASuLj+bVdS/tJTv7zIkEp48Kxr9YV/lMMsm5Xl/JWzLNTA4dnVU ttYkgAeaZaODb9kdWlxEU9ytSZ1ZbJ5j8MfkfnqqQD/BE1nQgpw8EcG2e49Sma/A+o2Hgy otLeI806/gIHkaJbUYILNWEGYCpx6gFTqTnlV/BuiEMmLrqz7i7TwsMSejpacBAtnndQZB 33UvXq8C2gRvGKvxlAZNwZniJ05SXdCIcFGtZmPGLo3R1+Sl0ncPkXfUecFTfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789732841; 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=cifYZcyLwGtGuZwTPp7JV/RH+1ZuJi+PqHViulyG6Hk=; b=pyGFYPFLXXAJ6HFmjBrVrNoFCGEq9NADYMuAQN3plfXdDHIm5YZoCyMJVVvdeIYJw04kOw MiqRVSfJ1m5lBUAOHVd5//AHl3Wy3xGt2UpARbHY5YbXeebgALLHWYiDvhk5aRwZ/13T3m t+otz84IGSCNYXr7157MxJAj1h6CbVTg0JsJaMkBKipco9WEG+209wRXSSiORDM6tSoG8x Gvitq13T7v9UddppWYWd1Iuw0vE8JHYntTYcf86KZPOHdXaoFtJigy/inJS3QWHgsMfmu9 CfELdGUfh+QRC1P2esJUFV8pNaX7Ic4kwldBOXZa0f78guX8PGf4+lu8Bf09jg== 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 4hmWRF4bR4zGys for ; Fri, 18 Sep 2026 12:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3716e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 18 Sep 2026 12:00:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 3c52d24acb42 - main - iavf: Reschedule pending virtchnl replies after the processing budget 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: 3c52d24acb422f5d80f50612bd990ce760a19de8 Auto-Submitted: auto-generated Date: Fri, 18 Sep 2026 12:00:41 +0000 Message-Id: <6aad27e9.3716e.1f549f5d@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=3c52d24acb422f5d80f50612bd990ce760a19de8 commit 3c52d24acb422f5d80f50612bd990ce760a19de8 Author: Kevin Bowling AuthorDate: 2026-09-18 11:51:55 +0000 Commit: Kevin Bowling CommitDate: 2026-09-18 12:00:22 +0000 iavf: Reschedule pending virtchnl replies after the processing budget The VC worker ignores the pending count returned by iavf_process_adminq. If a pass exhausts its message budget, replies can remain in the receive ring without another interrupt to schedule the worker. During init, the iflib admin task cannot provide a backstop because init holds the context lock while waiting for ENABLE_QUEUES to complete. Reschedule the VC worker after a successful pass with messages remaining. Keep the per-pass budget and do not retry AdminQ errors. Stop self-rescheduling once detach clears INITIALIZED; the existing polling and reset-recovery gates continue to exclude asynchronous processing. Validation: reproduced the timeout on a three queue E835 VF under Hyper-V. Temporary tracing showed a successful ENABLE_QUEUES reply already in the guest receive ring after a three-message pass left two messages pending. With the fix and no tracing, a GENERIC kernel with WITNESS and INVARIANTS passed three batches of 30 down/up and MTU 1500/9000 cycles without enable/disable timeouts. MFC after: 2 weeks Sponsored by: BBOX.io --- sys/dev/iavf/if_iavf_iflib.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/dev/iavf/if_iavf_iflib.c b/sys/dev/iavf/if_iavf_iflib.c index 0838eabbec1f..f0d1f39ee20c 100644 --- a/sys/dev/iavf/if_iavf_iflib.c +++ b/sys/dev/iavf/if_iavf_iflib.c @@ -434,9 +434,19 @@ static void iavf_vc_task(void *arg, int pending __unused) { struct iavf_sc *sc = (struct iavf_sc *)arg; - u16 var; + enum iavf_status status; + u16 remaining = 0; - iavf_process_adminq(sc, &var); + status = iavf_process_adminq(sc, &remaining); + /* + * A budget-limited pass may leave replies without another interrupt. + * Keep processing them here: init can hold the iflib context lock + * while waiting for a reply, preventing the iflib admin task from + * making progress. Do not perpetuate the task during detach. + */ + if (status == IAVF_SUCCESS && remaining != 0 && + iavf_test_state(&sc->state, IAVF_STATE_INITIALIZED)) + taskqueue_enqueue(sc->vc_tq, &sc->vc_task); } /**