Article View: linux.kernel.netdev
Article #8980Re: [PATCH bpf v2] xsk: Do not free ZC Rx buffer when the Rx ring is full
From: Jerome Tollet
Date: Fri, 30 Oct 2026 17:18
Date: Fri, 30 Oct 2026 17:18
27 lines
11898 bytes
11898 bytes
Hi Marcin, I tested this patch on a ConnectX-5 (firmware 16.26.1040) with AF_XDP zero-copy. Both test kernels include my earlier mlx5e fixes, e01620844c5c and 63811edf5125. The only source difference between them is this v2 patch. The receiver deliberately stopped consuming the RX ring for two seconds while continuing to supply FQ buffers. Each run recorded roughly 1.8–2.6 million RX-ring-full events. With striding RQ enabled, the kernel without this patch reported 225 RX frame ownership errors immediately after consumption resumed. I reproduced this with need_wakeup both enabled and disabled. With this patch, both runs completed 15 seconds and received over 15 million packets without an ownership error. With cyclic RQ, neither kernel reported an ownership error under the same test. This is consistent with my earlier cyclic reproducer, which was fixed by the mlx5e change alone. So this test shows a remaining striding-RQ failure despite both mlx5e fixes, and confirms that this patch resolves it on my CX5. Thanks, Jerome
Technical Details
Message-ID:
<179338069669.22800.12175576942287801197@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-353860-linux-kernel-netdev=dewy.ruReferences:
<20261030-xsk-zc-rx-double-free-v2-1-cf01d4a9f3f7@vecima.com>Show 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-353860-linux-kernel-netdev=dewy.ru
From: jerome.tollet@gmail.com (Jerome Tollet)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH bpf v2] xsk: Do not free ZC Rx buffer when the Rx ring is full
Date: Fri, 30 Oct 2026 18:18:36 +0100
Organization: Usenet Network
Message-ID: <179338069669.22800.12175576942287801197@gmail.com>
References: <20261030-xsk-zc-rx-double-free-v2-1-cf01d4a9f3f7@vecima.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2282908"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:xn8bBRl01Y9R4X2l8rKrriaczWw= sha256:OGFVhf5Sa4tfiAitdrYoCL43iVaRYb2cn4FLQSFqEfM=
sha1:RxpmB+SF1XTXNCZYAdhzOgHCJxc= sha256:7W1/T60CGreIQ8+oo4Zofo4RZb6hCMlLegar4IinYo4=
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 5624F125CA5; Fri, 30 Oct 2026 20:23:49 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 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.25,
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 (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 jTYe8sWBrT4S;
Fri, 30 Oct 2026 20:23:46 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353860-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 A75F4125CA3; Fri, 30 Oct 2026 20:23:37 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 784632BFC5; Fri, 30 Oct 2026 17:18:47 +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=1793380727;
b=h+UgsDXUzMX0FiqK6+h7U2+1kXhBGZ1OGOcrZ2fKdnqvAcbDYGQVD0MR8F81xylCvSvf
5imRJ2TYhXS+B7xzjFS3zP2gyxzhLfgm0dqOQ6a8SKJ8mF+rdIi7Aimh5J6L8OpgPDw1/
ZUwjaH9k+iGiwEaPrUS/82zw0YjT6TbEaSaL+4bxGi+e9lpf3igJ1klv0nIL7BuLCGdjs
nWGMZjbe08Kcx2W6o4KYM4mgm6d3q+XRTxAVNA62sHhFZt4SR6pRyzleGe6h+uUAkaSj7
94V6aIgrpCCzbaJYPaUTwnTIIR7mDTSgM4XScA6D+vaQy8BsOCVHrPVKEZBdSIHXpog==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793380727;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:Date:From:To:Cc:Subject:In-Reply-To:
References:Message-ID:Content-Type:Content-Transfer-Encoding:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version;
bh=P1uqo7C/JrGtMIVNU/yYgKX0OwbZ0XFibLQffeq3In8=;
b=rYIjsiCzHje194/6wmYYSl/L7aMNDFLlCl28Qj5WShnGXrx8xfKLDCE+n5CIjXNuCKVB
2ffWHNJjj3vGC9FG42GakHm4cID5JF7Ew8+1YF1l881Lvg1qqXwLBXY9nFNJR/oVMHXBP
tjzoc/wRTSdGUgDgv3aQWywvotuHDrTEa8dWz1i48xrb26gsZ3RZZrjRM/yuNmuECorJc
sO/ye3lrTqXLUXq1vUSiSAobG31G7q70VckaX6BkQwJF3n1RKeghrtFddxlV33qCeNFgN
7MxOHOJTo6abrvTQ8xwE8DFEw5Meoao6NvMtI3555bZkFfVOjTzdik+thXR0I11dYfw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Ij27kj3r;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
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 4E8D7606A321;
Fri, 30 Oct 2026 17:18:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Ij27kj3r
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.48
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793380721;
b=kwfOuchL+Tkv3CV3MwVhpPhPd1sTVjQyXMpIHfKBllSSf2ihFUkDwkUNoSV/5sbd0yB1
6RXUskOKf0U/wuSx/V9BlncQ+GNG4Uzvw0hn3WSu9sThOovbtPUHIz3oIib73TBQzkD+E
qQxcl6TdwS3fl3aUsAdcTElLskca+x0V7xPul8LdeZ2iZDbBVRWnYVpg7PkShMBRXIR78
7x2FpaoJPq0VTX+F+1BLq+hDvxIyx2koRTqQiJEHeyVfBl7U11T5UQZZy4g1dUrhku28P
VkdF6ZD5lT5ZECroen+VJ5+geLP8Wpkb0BzwEw7AZQe6dI1otlnlRlptrULWZTw2uBQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793380721;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
Date:From:To:Cc:Subject:In-Reply-To:References:Message-ID:
Content-Type:Content-Transfer-Encoding:MIME-Version;
bh=P1uqo7C/JrGtMIVNU/yYgKX0OwbZ0XFibLQffeq3In8=;
b=1HxQLLCOH9FLktrRdzMcbUkF/uIV+HYuldSe4IzVr3S+UMlACSwHjhb4gZ0KTmFyuv0F
RBXYhZn+XiOWBLZl23u6Ahp06xNDmxdlhnRrUke9hzTHCcdh3bUJNfd9OKyeLmrc1Ji4L
OhKhJ00vM6UTuAIYfUrULZVVyf5pypX/GQBnIBoHQBz+RYOm4kVzJ8CBSUbzqUdvuya1D
yrwTdmRz9Svb4zVK6IMURyyIf2vvvIOe+G/XYSooS9ZHev85Bz4A3L02OHVzTNg+HSNwe
QShZC71lqis48VW7v+j7ZbyggAVXR7MxmEkZwk1gYefbLQQCe90sieW6Rk6OGc/ZfGA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Ij27kj3r;
arc=none smtp.remote-ip=209.85.208.48
X-Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F9F4606A320
for <netdev@vger.kernel.org>; Fri, 30 Oct 2026 17:18:40 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1F9F4606A320
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-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-6b21cf1a580so1151127a12.1
for <netdev@vger.kernel.org>; Fri, 30 Oct 2026 10:18:40 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793380719; x=1793985519; darn=vger.kernel.org;
h=mime-version:content-transfer-encoding:content-type:message-id
:references:in-reply-to:subject:cc:to:from:date:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=P1uqo7C/JrGtMIVNU/yYgKX0OwbZ0XFibLQffeq3In8=;
b=Ij27kj3rh7jDkNne4YmRr09xPVJSWqvJL4NGnEalvehb71QAzoX8wEXHxvuo9/2xm7
aqoT7d+vLeunRxOxYniOCOGso1HtJXGiMMujjJ+cmW6jUHQbtdKVMdlqCLiAwCaRxAls
QZDGC9c/wj6FnYWGdmPh2iHTsb4cgWqiTZ8PYHenUiO4O/CL0WQCeuZD+STR5xFmAUcC
9+armJyqi7yQL1EUxe0onoGIYAoMCXp+A+onBxpxnBaR4zM+OAoeQ0tw1wsNeyts7HQT
LLFFfg0uoxFW7/DM3Kr9BqgsP1mTCu8gSztVxps+LmpVJwCTobgBHWPHmaEfxSB3P4Jx
ZEdg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793380719; x=1793985519;
h=mime-version:content-transfer-encoding:content-type:message-id
:references:in-reply-to:subject:cc:to:from:date:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=P1uqo7C/JrGtMIVNU/yYgKX0OwbZ0XFibLQffeq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pnueUBKBpGUFXI3ieoglYxQx07p8iUQ3iCN6vYT2gqT3GIn1WwbDDyQykqDL
a1UEAsd2UU9JL+N4kYuBPr+s6pqBdJNAJXqXzVdC8RDl0UgktTsothXfdfgxDCWw6zZkW1ab6i+
96D0gHYE8NkrDLcSAAKTdbaeH1IW0afFrK2M2AnLL6fAWngjIWawmVtH8nu/Qqcwtg==
X-Received: by 2002:a05:6402:1654:b0:6b4:7c1:ce3c with SMTP id 4fb4d7f45d1cf-6b4d44803c7mr1595508a12.8.1793380719230;
Fri, 30 Oct 2026 10:18:39 -0700 (PDT)
X-Received: from localhost ([2603:5004:a0:200::3516])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6b4eca214fdsm177695a12.36.2026.10.30.10.18.37
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 30 Oct 2026 10:18:38 -0700 (PDT)
X-Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>
X-In-Reply-To: <20261030-xsk-zc-rx-double-free-v2-1-cf01d4a9f3f7@vecima.com>
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