Article View: linux.kernel.netdev
Article #25033Re: [PATCH net 0/3] veth: fix lost NAPI wakeup with threaded NAPI
From: Simon Schippers
Date: Tue, 01 Dec 2026 07:19
Date: Tue, 01 Dec 2026 07:19
30 lines
9869 bytes
9869 bytes
On 11/30/26 10:39, hawk@kernel.org wrote:
> From: Jesper Dangaard Brouer <hawk@kernel.org>
>
> On ARM64 servers (Ampere Altra Max) with threaded NAPI, veth TX queues
> can stall permanently. The peer rq has rx_notify_masked set while its
> NAPI is idle. Producers then skip scheduling NAPI, and nothing drains
> the ptr_ring. With a qdisc, the TXQ stays stopped, because of commit
> dc82a33297fc ("veth: apply qdisc backpressure on full ptr_ring to
> reduce TX drops"). Without a qdisc, veth silently drops all packets for
> that queue.
>
> The cause is a missing write barrier. __veth_xdp_flush() stores
> rx_notify_masked = true, then __napi_schedule() sets
> NAPI_STATE_SCHED_THREADED with a relaxed set_bit(). On ARM64 the second
> store can become visible first. An awake NAPI kthread on another CPU
> then runs a full poll and stores rx_notify_masked = false, and the late
> true store lands after it. Commit 68468d8c4cd4 ("veth: fix races around
> rq->rx_notify_masked") opened this window, when it moved
> napi_schedule_prep() before the store.
>
Nit: Please state in the comments what exactly the smp_wmb() pairs with
in napi_complete_done().
FYI: netdev/contest couldn't apply the series, see patchwork.
For the series:
Reviewed-by: Simon Schippers <simon.schippers@tu-dortmund.de>
Technical Details
Message-ID:
<b97689c0-d15d-4089-ba64-a7cb5ba3f9f0@tu-dortmund.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374787-linux-kernel-netdev=dewy.ruReferences:
<20261130094000.2022376-1-hawk@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374787-linux-kernel-netdev=dewy.ru
From: simon.schippers@tu-dortmund.de (Simon Schippers)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 0/3] veth: fix lost NAPI wakeup with threaded NAPI
Date: Tue, 1 Dec 2026 08:19:11 +0100
Organization: Usenet Network
Message-ID: <b97689c0-d15d-4089-ba64-a7cb5ba3f9f0@tu-dortmund.de>
References: <20261130094000.2022376-1-hawk@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="1646361"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ph1/67BHGe+svQTM+RiiI9P5VfU= sha256:ZD+W+6fQb2oU2wPWCNQZHxulU5F7boVazlBeUZWfCHw=
sha1:9Uz4SKLKfDLLwKRtlDcvrrq3K90= sha256:TAXSAqmtlBQ15b4b4cJCzhrUCf0J152xhMh6KIelmw8=
Content-Language: en-US
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 661D3117292; Tue, 1 Dec 2026 10:20:00 +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 879mVEeqOCnE;
Tue, 1 Dec 2026 10:19:57 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374787-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id E632E117288; Tue, 1 Dec 2026 10:19:47 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 4C506235C8; Tue, 1 Dec 2026 07:19:46 +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=1796109586;
b=P3ZxVuawRogOngcZZrxSHWp9ATaWQj9/1O1soCKi5ktKgdcshIG20UG+TAh+07E7HAn7
6EQRFhNqv4jQh3rdTCeKJR2Dceop9fdNHQItgM5sarlTU3DPYNOBNcvFEBNvgs6dRG5gd
a58XnVUJsjCCqp8uxVFaC8l5suIWMRvOvskHkNhu9FqA/wRa2oat5XZgktCe0Ff6Sug/8
y8CjV7DUCKW81EKiO+Osicw5b9W3iGlbyflgOSLfCWOzip4pYs7XKpjAih2m4dCFFDaax
DCUxeJ4u0bNlkwcw32lWiz0I6PLmBX+dc+IIhy9HkHwbl9AOyQnnCmjvhkrUxo48B3Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796109586;
h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:
Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding;
bh=MWhQr1RwaFCJ3ZcGtlMtbAKIWjYI+8kZsocN9/6ypxA=;
b=G9DaA/iSlUEDOMxCDc/OzIGddbdCHaNWP1Lo6xLTgatp3vf2e32M/eUwBpcYmDIXnKON
0ACe21M4AXJpgfcS4ZPAnY3j52tP8we1MFkxkfsU4wmHPphNn2l4Hv109PcEik7ZvhN40
eyN2zwOSfaR1OOxkett9iZ3L6B1zspctJQFdHQtsa78I+MuGtc4TW03eRm3t7eQ8uZvxo
sdpWm8m/vTZvFdEo3hoeodVpB/HYoWA1kqTCDOVjg0xVeR4WrxZgRj4DFFhkwNdGUatjh
sALZ3K4KdgScpR25MIlrDdElctNixW99K+d85YdR8VQq9eu3ghEy16HnWXw/bzAYR3A==
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=e70GL47H;
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 01B95606A696;
Tue, 1 Dec 2026 07:19:46 +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=e70GL47H
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=1796109585;
b=X5TtyrMtDWpG6cZn1pt4+Wl4fzNPqSCUYsbjJjMKx+Hdnr3THCn6gwsStjVLKbujb68a
nQS21zClbM/m6hQMk9/fgwctYceeHp1R90st4GzqtnfLRnakmq7KykYM0tZEpBbDXY+U9
qW1z5NHaaak5P8vxj9X9oF3YuD1+WTzWOtU9c42C4h3IyDDUQeotaSswY4tQMLvPU33l0
9sJfeA96HI4d/NOLiHDaSf+AW1A7ImsehcsV3nw6kfPQDEy/1+hkMiF7UaOu1N3fmQZKp
CIIKhPw+KZG0DpknpdXqXHD/KelA1kOaSfFtqxPt5yfAjRzad87goqCv1X42skZGcWQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796109585;
h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version:
User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding;
bh=MWhQr1RwaFCJ3ZcGtlMtbAKIWjYI+8kZsocN9/6ypxA=;
b=ZUjCVJg/P4HIPcUL4y2mrqAKqYmMI7imC7T1Em6goku2xoIifayJuJcvIjZniAEalw9I
KkRxWubIw64XS1IfKPTfmQaXM59eNqbshhgN/I6O3ebvoSF+O3zU4DGgx48G1Y1hxdHSC
glNU+Y+lgkVKIKrzvxEtV9/rFcY/NDAz+1ITC42kODgPCvkXqtPT76lQ4oBqLac4RERgQ
H4lKreIQ14trB6+e+nWLqDvZIufam7PFuwrUJ6O1uZAg0hbtObj/auMfgl8h0S/iBbtlm
G40xPeK3jR5XXo2xi2yfLMzzcr+5oNm0U9oAD5tR9nBRwaDhDgHfY0N3TZMNrjerVDQ==
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=e70GL47H;
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 E1F9A606A684;
Tue, 1 Dec 2026 07:19:41 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E1F9A606A684
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=1796109553;
bh=MWhQr1RwaFCJ3ZcGtlMtbAKIWjYI+8kZsocN9/6ypxA=;
h=Date:Subject:To:Cc:References:From:In-Reply-To;
b=e70GL47HMI71nEpcmRMVD6FvueC+zepwsnVNN3LCMP70/1R61ilTx+7iSx7pyWp1K
ai7+og1PidiToeVuJ5pLzZqTTruyXg8IUFnwFFtiWkyjuo8ht+iH+gv9H47GWDlZ9J
fslEB222D6wlzEYA4fSJs8H3MfmIJb6Y8PgCsa2M=
X-Received: from [129.217.186.54] ([129.217.186.54])
(authenticated bits=0)
by unimail.uni-dortmund.de (8.19.0.2/8.19.0.2) with ESMTPSA id 6B17JBfQ022336
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
Tue, 1 Dec 2026 08:19:11 +0100 (CET)
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
X-User-Agent: Mozilla Thunderbird
X-Cc: bpf@vger.kernel.org, mkroemeke@cloudflare.com, matt@readmodwrite.com,
kernel-team@cloudflare.com, 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>, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Stanislav Fomichev <sdf@fomichev.me>,
Toshiaki Makita <toshiaki.makita1@gmail.com>
X-In-Reply-To: <20261130094000.2022376-1-hawk@kernel.org>