🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #15680

[PATCH net 0/2] veth: fix txqs that are never woken after backpressure

#15680
From: Simon Schippers
Date: Fri, 13 Nov 2026 10:46
30 lines
9432 bytes
While debugging the veth BQL series [1], I found two ways in which a veth
txq that veth_xmit() stopped on a full ptr_ring is never woken again.

Patch 1 lets veth_poll() wake txqs beyond real_num_tx_queues, as a txq
stopped before a TX channel shrink is otherwise left stopped.

Patch 2 wakes the peer txq when NAPI is deleted, as veth_xmit() can stop
it after the last poll.

The reproducers are below the --- of each patch. Patch 1 reproduces
without changes to the kernel, patch 2 needs a debug-only udelay() to
widen the race window.

Claude Opus 5.5 was used heavily for this series, to find and reproduce
both bugs and to write the patches.

[1] https://lore.kernel.org/netdev/20260612083530.1650245-1-hawk@kernel.org/

Simon Schippers (2):
  veth: wake a stopped peer txq beyond real_num_tx_queues
  veth: wake the peer txq when deleting NAPI

 drivers/net/veth.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)


base-commit: ead6fa9a0ab194f02a2f36d634b193e9c5f9a1c6
-- 
2.43.0
Technical Details
Message-ID: <20261113104648.225983-1-simon.schippers@tu-dortmund.de>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362571-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362571-linux-kernel-netdev=dewy.ru
From: simon.schippers@tu-dortmund.de (Simon Schippers)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 0/2] veth: fix txqs that are never woken after backpressure
Date: Fri, 13 Nov 2026 11:46:46 +0100
Organization: Usenet Network
Message-ID: <20261113104648.225983-1-simon.schippers@tu-dortmund.de>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1324921"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:eL5FZFeNrTHdNCGaJAUKjmRZoNo= sha256:NrnhD7HcApLJ3zlmR/i9qy11Rd+B3EbgQmJXtTP9Pqs=
	sha1:iFpO+fP8i+jtpPZGp/vVmkCbxm8= sha256:RrSDxuKui/5XPW+37VmgpsZg19Dnc+eLYK/VnN7eRs0=
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 A403F1144F7; Fri, 13 Nov 2026 14:19:09 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=tu-dortmund.de
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 DOnl2JGNIQaW;
	Fri, 13 Nov 2026 14:19:06 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-362571-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=tu-dortmund.de
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id CB7451144F4; Fri, 13 Nov 2026 14:18:56 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 44E417233E0; Fri, 13 Nov 2026 10:48:21 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794566842;
	b=Y+5fKltVQxDlrCHSoKZ26BRm4ePMd/QZvex3v84zrfssR7YGwlLVKj22FxWT+3XJrWyq
	 T6m5nJGiWgpvDPmU63N6eTwRjAu26wM4Xr/50vtXq+dMyWWjdmO3bzbpUXfUXol10NjFP
	 7TcxE+yTWtHzfJTI8nrLbURO8gqTVYnLE9as7F5cLYMpCaAlrCcclVLlp1QB9PqXvWVm1
	 AK6LVHy/E8bANfW7Br3BQDlyZoW6AoQVQrQ5X2jXGs9GNOqSNDhHdDHhyxc76R75u97A3
	 8gAIPPlrbV33zG+ZRFJfg8XRKG+5OH/zM+6xbaNVkXskW8KPq/3xKLws4Ehm3C6jaYw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794566842;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To:
	 Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Transfer-Encoding;
	bh=u7N7gzUgcX1sPQNzqNwIWSymEUYVbtkaHyjM8kbA+H8=;
	b=vAXFkGb0W/9ErZib10KXqJT1L7GoFI9OQyhJRsuenPMwmnKf2n61wCzbiXG8EQ6fjkRb
	 mKlrEu+diuA6x9FVMXle1bkV7p1d9roENmotYYKcdFJXixSmAY9u19u7fYMAiOOJw5zAH
	 c3pNBZpsP26BN1dNjmgMcbEKlruqTRrTN81jmZGlx7+XKzwWtT7Z5/uuoZzxpPHP803CK
	 /nLzEAUx3MHs0DfwmP7eabIlFGVmK12YvhViFCP7v/yEAXCEenym9njfo/eTPTgdzv2HT
	 4LaYHPrjrwnBCA4KtU5/jxOrtt8vit6fffVcJqxFgV3s4xgR3tPboYky0jb9obguKxw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=tu-dortmund.de header.i=@tu-dortmund.de header.a=rsa-sha256 header.s=unimail header.b=cv+IaMjH;
	dmarc=pass header.from=tu-dortmund.de;
	spf=pass smtp.mailfrom=tu-dortmund.de;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id BED8A606A339;
	Fri, 13 Nov 2026 10:47:22 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=tu-dortmund.de header.i=@tu-dortmund.de header.a=rsa-sha256 header.s=unimail header.b=cv+IaMjH
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=129.217.128.51
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794566836;
	b=KwcfOUQnCFlHg8jJaYzLetQvjSIYcuf8+qYgjknlW9fTECa+ufWA83nv6wXegvZv4j6q
	 MfezMT6GcuIyq6XkzNwInoMaz7SBN2eKKSS8TFhKr6bQWpm1Y0WzekIU4l4H2uJtmioqM
	 EocwBqeC1REyhBE7e6+gojgmsoo5QkLpyJVOwmhjAvna1Hj8ETdfZj5DrgC10TGXlfRXB
	 5qH57yFS/yAl8iPHsbC/y0qh2V4UHymyeZlQLYtFzq3veXOsKrJNmdWJMIPyZdfWyBE0k
	 cShHt6jXZYaGxAvXdvNWZRLxSaibrcMtnM0VVDonYs5vbbTpP+UCSAJmr7QyuN4JtSQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794566836;
	h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date:
	 Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding;
	bh=u7N7gzUgcX1sPQNzqNwIWSymEUYVbtkaHyjM8kbA+H8=;
	b=S7uX18WYNKxzfwk0otMmH5fPVCHzQfj/VLN1dhIfM0kaEDjfnzDK8Lskq2q5e1n+Utnv
	 tbM6X+XR1mwvcCxpJFRf+5OzcRYdQrquEZLI/6nAkx2XJSsnQaQBQjJkWgCKswhKLMpGA
	 f/HWBBpZ1hWbK942/eZ3mO3dIUEfsXR13jPgcsMmGEgbFTlk3TY2zTQNYGCjcGm5pJU7H
	 i0zqiBq9A8Rkh7jOwNKOC3JgiyoeFlkMgEuShC9WBwr6tN0X8Qhe1aNtku9Bqyhr7yQZ1
	 ZCxA4utApo1ItP58IboBji63snEQ6H3H/QyHT8DiR7mnFo6IIM3FO1cY+A0Q1JnYOVA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=tu-dortmund.de;
	spf=pass smtp.mailfrom=tu-dortmund.de;
	dkim=pass header.d=tu-dortmund.de header.i=@tu-dortmund.de header.a=rsa-sha256 header.s=unimail header.b=cv+IaMjH;
	arc=none smtp.remote-ip=129.217.128.51
X-Received: from unimail.uni-dortmund.de (mx1.hrz.uni-dortmund.de [129.217.128.51])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 251C2606A327;
	Fri, 13 Nov 2026 10:47:14 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 251C2606A327
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=tu-dortmund.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tu-dortmund.de
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tu-dortmund.de;
	s=unimail; t=1794566812;
	bh=u7N7gzUgcX1sPQNzqNwIWSymEUYVbtkaHyjM8kbA+H8=;
	h=From:To:Cc:Subject:Date;
	b=cv+IaMjHed+ohWkas+CvLzCXa0I0FzUAyiVgU9kJ9MPuUoAXIBf24CYhstBYeoURt
	 dNZyWE2SuLgBtDC41xXfvjsj0EmPbpF1ZdGVlu55NjLssMk/f5qSg9A83L2JZy3pLq
	 0nuQe19MCM2j0ol4oCRHQMaYri2jwjTZCk3gdoew=
X-Received: from simon-Latitude-5450.cni.e-technik.tu-dortmund.de ([129.217.186.174])
	(authenticated bits=0)
	by unimail.uni-dortmund.de (8.19.0.2/8.19.0.2) with ESMTPSA id 6ADAkoUn009632
	(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
	Fri, 13 Nov 2026 11:46:50 +0100 (CET)
X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
        "David S . Miller" <davem@davemloft.net>,
        Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>,
        Paolo Abeni <pabeni@redhat.com>,
        Jesper Dangaard Brouer <hawk@kernel.org>,
        Toshiaki Makita <toshiaki.makita1@gmail.com>,
        Jonas Köppeler <j.koeppeler@tu-berlin.de>,
        Alexei Starovoitov <ast@kernel.org>,
        Daniel Borkmann <daniel@iogearbox.net>,
        John Fastabend <john.fastabend@gmail.com>,
        Stanislav Fomichev <sdf@fomichev.me>, simon.schippers@tu-dortmund.de,
        bpf@vger.kernel.org, linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.43.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list