Article View: linux.kernel.netdev
Article #2140[PATCH iwl-net v4 0/2] idpf: destroy the vports on shutdown
From: Tian Xun Ng
Date: Mon, 12 Oct 2026 06:30
Date: Mon, 12 Oct 2026 06:30
70 lines
11572 bytes
11572 bytes
From: Tian Xun Ng <tianxun.ng@bytedance.com> On shutdown idpf shuts its virtchnl transaction manager down before the vports are torn down, so the device is never told that they are gone. Patch 2 keeps the mailbox up for that teardown, as remove already does, with a short timeout so that an unresponsive control plane cannot hold up a reboot for long. Doing so would expose shutdown to an existing remove-path race between the async PTP Tx timestamp callback and idpf_ptp_release(), which patch 1 closes first. An LLM coding assistant helped analyse the problem and draft the changes and their messages. Both patches carry an Assisted-by tag. Changes in v4: - New patch 1, closing the Tx timestamp callback race that Sashiko pointed out on v3. It already affects remove; with patch 2 it would also reach shutdown. - Patch 2: the Tx queue SW marker wait follows the same bail-out as the mailbox transactions, so a control plane that acks DISABLE_QUEUES but posts no markers costs one marker timeout instead of one per queue (Emil). - Patch 2: the statistics task stops sending once IDPF_REMOVE_IN_PROG is set (Emil). - Patch 2: the shutdown comment now says that a transaction already in flight keeps its own timeout; bounding that would need support in libie. - Not changed: if one teardown reply or Tx queue marker takes longer than 500 ms, the rest of the teardown is skipped. On the tested PFs the queue-related messages took at most 240 ms, and the slowest, DEALLOC_VECTORS (about 300 ms), is sent last, after DESTROY_VPORT. With the driver made to treat the first Tx queue marker as missing, so that UNMAP_QUEUE_VECTOR, DESTROY_VPORT and DEALLOC_VECTORS were skipped, 3 of 3 warm reboots were still clean on these devices. A function reset as a fallback was patch 2 of v1; in our tests a function reset on shutdown did not stop the faults, so it was dropped. I can add one for when the timeout fires if that is preferred. Testing, besides what patch 2 describes: W=1 builds of idpf and libie with allmodconfig and allyesconfig showed no new warnings after either patch. On one server, modprobe -r idpf and a reload completed without warnings or IOMMU faults. These devices do not support PTP, so the path that patch 1 changes was not exercised on hardware. Changes in v3: - No new flags: adapter->vc_xn_timeout_ms (60 s from probe) is lowered to 500 ms on shutdown, and idpf_send_mb_msg() fails the rest at once after a shortened transaction times out (Emil). - IDPF_REMOVE_IN_PROG is set before the service and event tasks are cancelled (Emil); the comment and message no longer state that a reset does not clear the vports (Emil). v3: https://lore.kernel.org/all/20261009032706.94324-1-luckilystar08@gmail.com/ v2: https://lore.kernel.org/all/20261007055741.30629-1-luckilystar08@gmail.com/ v1: https://lore.kernel.org/all/20260917105205.37561-1-luckilystar08@gmail.com/ Tian Xun Ng (2): idpf: don't use the Tx timestamp trackers once removal has started idpf: keep the mailbox up while tearing down vports on shutdown drivers/net/ethernet/intel/idpf/idpf.h | 3 + drivers/net/ethernet/intel/idpf/idpf_lib.c | 3 + drivers/net/ethernet/intel/idpf/idpf_main.c | 11 +++ .../net/ethernet/intel/idpf/idpf_virtchnl.c | 68 ++++++++++++++++--- .../net/ethernet/intel/idpf/idpf_virtchnl.h | 1 + .../ethernet/intel/idpf/idpf_virtchnl_ptp.c | 3 +- 6 files changed, 80 insertions(+), 9 deletions(-) -- 2.50.1 (Apple Git-155)
Technical Details
Message-ID:
<20261012063027.27750-1-luckilystar08@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344749-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344749-linux-kernel-netdev=dewy.ru
From: luckilystar08@gmail.com (Tian Xun Ng)
Newsgroups: linux.kernel.netdev
Subject: [PATCH iwl-net v4 0/2] idpf: destroy the vports on shutdown
Date: Mon, 12 Oct 2026 14:30:25 +0800
Organization: Usenet Network
Message-ID: <20261012063027.27750-1-luckilystar08@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1698546"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:nM/Uij93D4eyQh+ZMmZLgfOPAO8= sha256:A+LjVmqXE2Fpb6uB8XYlHSrMHT3IhBJsRIKiP1jnSOA=
sha1:31aC4hjyFHE+gvppzJRX6eqc/Wg= sha256:PaEZfpEU/cjKIcPDeJTGD3dq0FP2e2Bpgaoa5uJZob0=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id F299510FB00; Mon, 12 Oct 2026 09:31:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.749
X-Spam-Status: No, score=-0.749 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 3Q3aIUOgeLST;
Mon, 12 Oct 2026 09:31:49 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-344749-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id F2B3E10FB02; Mon, 12 Oct 2026 09:31:39 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sea.lore.kernel.org (Postfix) with ESMTP id 811462A980; Mon, 12 Oct 2026 06:31:01 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1097F3BB9FA;
Mon, 12 Oct 2026 06:30:41 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="izXmNVB4"
X-Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E1BB3BF695
for <netdev@vger.kernel.org>; Mon, 12 Oct 2026 06:30:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.181
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791786640; cv=none; b=boVEJbynCtK0jRxx15mS0hVyJWiG2BHeb4aqQ4QvTuY0IOeccDkDf+qpFnuP3OSl5hWMIy/Hzd+4YceFCiORtWSvnbvLD/e3BuDz6pH0k9meLWj1pcq7FoYqzjhq5BXhmbGvjMOyWCuGuS9oqowY1vvo1Q63ND6h5kgQD72vhz4=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791786640; c=relaxed/simple;
bh=X/1pjwpB60sNcmBCCby0YPwVX4KJqgJkG6sqsXTh78o=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pQqIprRjI0YBfXEFgjMMsirBq0ga5p3XwpZ2GcxY9eU1ZGfCjPKCYp0T9XjaKffSFdVOJRLRr6Gxaaf8DE2fS9chk61Fwh2pnR5FP+z+hIcbUeux/SCsdxKMgnOIcJeoe0+A68QK7Eh7Emfla0Im3Cc7BFot5wF4VQoKL4mfRvE=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=izXmNVB4; arc=none smtp.client-ip=209.85.215.181
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-cc4b62d118aso906577a12.2
for <netdev@vger.kernel.org>; Sun, 11 Oct 2026 23:30:37 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1791786637; x=1792391437; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=WfFi2at/lgAH1/xbqXNWbCEaLwYnM/ZF1CQqtE9gXAU=;
b=izXmNVB4swda6S6DRAdkghF4IEGnsN9/QHh4NbLsEhjivEGLUBh1z/Og90rc+FEzaW
1IeEs4y6NqhxMSUKVpCr4EQlxKGjpzYCVrTWkBQyx0WC2bxXM9xfOxtDW58o6k3le7YV
YnMXyQ8nW3anCwsfXWmr8opGRTHZDkWbW//oiKow40XhSy7jNweyKSEodV7GFXrvimRI
8OgW+JF7MWNLqhll+fHioYCT+caZ49C1l6Gf8GkxuqI1VhoMSvdR1M7vGajuqKhc0IHH
H3rVobS7Le6npbDeRgQej4mdwKaHzVNgpihgQ+PZuo22ddVuE1w589yrljpbGu1z4CLt
TSwQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1791786637; x=1792391437;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date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fxv8FRYi9bW3CdXq9Y7TAI+XzajPm0TFDVlulcqBWLtdlN4RIWHeEJRNDF5lu634Tu3Zf3TPG
Qh+2w5yw1S2A7Q==
X-Received: by 2002:a17:90b:5346:b0:3ab:235b:185b with SMTP id 98e67ed59e1d1-3ab3a77980emr6448875a91.31.1791786637261;
Sun, 11 Oct 2026 23:30:37 -0700 (PDT)
X-Received: from C9P9279WY4.bytedance.net (21.186.101.34.bc.googleusercontent.com. [34.101.186.21])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3ab371c32cesm14452767a91.16.2026.10.11.23.30.32
(version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
Sun, 11 Oct 2026 23:30:36 -0700 (PDT)
X-Cc: netdev@vger.kernel.org,
Emil Tantilov <emil.s.tantilov@intel.com>,
anthony.l.nguyen@intel.com,
przemyslaw.kitszel@intel.com,
aleksander.lobakin@intel.com,
aleksandr.loktionov@intel.com,
decot@google.com,
milena.olech@intel.com,
joshua.a.hay@intel.com,
andrew+netdev@lunn.ch,
davem@davemloft.net,
edumazet@google.com,
kuba@kernel.org,
pabeni@redhat.com,
Tian Xun Ng <tianxun.ng@bytedance.com>
X-Mailer: git-send-email 2.50.1
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>