From nobody Mon Dec 1 22:34:54 2025 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 A0E8F3019CC for ; Sun, 30 Nov 2025 23:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764545748; cv=none; b=Yz+XmbWywlp5yceWX2S/cGRGh9Lg0le75T7DxDboNEht7blSfP/TJocfJNhQb3MUFenfVElLEfmXMFMXtdvPVzHZeYmSbvn4FYBDHv+7Fb5rGxgxi+ocLSyHs3Z7OxsEAwlJAunKOEfWQBZN6HteHWg32ZAcrzCd37OyZy5Qjps= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764545748; c=relaxed/simple; bh=axdc3q5KY7YeHULab/TvgzOYs0oof9ugiogriyYfhIs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NsExkpN1gm0cmXi3454ctsarFgNK7eaw2eb5KWwzpXMt8EijHnLo9TMVYeuB9Ws3Z4OnbLIKxLJv+L6o18efOUa0WaFeI+wUaZ8+JVmTip1UB78zc7FcD5EtWYaHV4SkP4V9R/BZO+Gf8O2X11asgvPgZXtkhWkahNxlh+NKdIw= 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=hW2T56/9; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hW2T56/9" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4779cb0a33fso36130585e9.0 for ; Sun, 30 Nov 2025 15:35:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764545745; x=1765150545; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kiBEtLY6CE0u/w5HMF7IyfpDPmY7qzN3np9POU+8r/k=; b=hW2T56/9lZoz5dDB2hbeMi10w+NI9hvUGF2tnpyqxzo0X6iZADY/x7OHvZnkU5Nae+ FrPn103TbQOJ1bByOrS+5fwUEA7diy7o6wVXGlGryAjH4EveU52tGsJT//A/4PBaXxFc RzWXfGJweKuYXf6ZEfxGu6n+i8e8xazeKTEVbElZvi1yi2TULJS3SPVtaE65/8XfwV5m oEMvTvP/0JEtJPz5vOptE+0bB0jBRM/K3vB4PSUOwcO6UDcE0O/dNRKw3WFG2Qmfx4Jt Fz462+2I7Wd00etw0jUBIUQmlMMYssZfWdt3XVjgqCPU+NCJqfFWb2vnhXM8MAoFDfD0 TkXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764545745; x=1765150545; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kiBEtLY6CE0u/w5HMF7IyfpDPmY7qzN3np9POU+8r/k=; b=ROKmCHmkvHvNig1ab4OGjOhnDckpQZ3pUnye8D9dEruoLmHUexrO9Wnz6d6zT1Xs70 HNQ2dkBt/6W+/NrvUyMDRuLEVe8JAxpnhh50zPaR/ZejdC7lAEku7SUOWhlanjW+JqC4 M41uboLnDXxdyrxpgAUwRgYIZ9CpoLpqRLbcT54GtgiEq1YxV9sM3Gz0lssrP93GGryd DnWKdl1/gCU9RXkMcTrkJhS4MscvYyp0vtpofXGDNu1yfPgjWvv2GpbBmPB5kNUQ+FTC BY8IPyBAWaTBX9LLF0PmInLBtfBViImR2labE28uSjnwwVCvM8k3RwacN9RuH7M1Zo/g 5L6w== X-Forwarded-Encrypted: i=1; AJvYcCWsMCP72RD9HUVyFLXaKCkBVjcEvP7cIPEu9ZdIcpn7UE2PxEuJJBcpzvZ505GIlAF7+gfNtVQwWqaXNJ0=@vger.kernel.org X-Gm-Message-State: AOJu0YzK+J8r4FJ4XWIDE06VIDLlu8Sx0ddS0+qEjLQpBSnqXmQjMq8T +0eokknyhKWC9ASqnyNMYAnsgXYvGX+84ROimaN8cIRbpHPJD679Sbg2 X-Gm-Gg: ASbGncuMaJHW2UUngF6Sl3w2Nk8L2sc/O1mHypMdVERt9Cp5cj102YKVl9zoDWgICJx Z5L31h1ns3Affy8TTlGrw3CwdfqaUwK0Uh8qRlHoKeGQUGtimiCE0JbLTtskwAC4FRHEbZaGCn8 JseJkpvs2n8yycIflyjNvEMyeAh04ItuJ8hgTjtyRLb6EAlnZfq0wECEbqrRZCs6zYqzXM9E+ii a0Kav03+RJxQvoALPiIntJModLQYDyR+79qjWtoxKVfDylofcB8Ti03gJkLxxE2VoO+cHP+m+ah dc9nd38fpasBBgoA/kkr/3iHPqZkL770edqz7kAcEo9xeNHvE9nzoQ+4jUGnJZ1FgT+RIodcqcE us+zWuse6FIDBDfegx8/8lzhGfiTsAq+LDinNOpvhSe7gqscEyN6zNKQHIOOi+PEe1OrCl2/8xT 4dnNhKWLVGW2/BnRjUSs/8i5+p890dDMyaS1LYTxb8kyQxawj2uk9i68MyyVerqYxvUoAEcgHrL MeBi5FgqWW/z2lV X-Google-Smtp-Source: AGHT+IFUzT8FPG5bXMl+et7+tgKZinOOAHIypttasPvwu7QxpymSGXEfBTXOVOEmLIwEs4nL6pXgEQ== X-Received: by 2002:a05:600c:4fcb:b0:477:557b:691d with SMTP id 5b1f17b1804b1-477c01eea7fmr324319555e9.25.1764545744807; Sun, 30 Nov 2025 15:35:44 -0800 (PST) Received: from 127.mynet ([2a01:4b00:bd21:4f00:7cc6:d3ca:494:116c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-479040b3092sm142722075e9.1.2025.11.30.15.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Nov 2025 15:35:43 -0800 (PST) From: Pavel Begunkov To: netdev@vger.kernel.org Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Michael Chan , Pavan Chebbi , Andrew Lunn , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Ilias Apalodimas , Shuah Khan , Mina Almasry , Stanislav Fomichev , Pavel Begunkov , Yue Haibing , David Wei , Haiyue Wang , Jens Axboe , Joe Damato , Simon Horman , Vishwanath Seshagiri , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, io-uring@vger.kernel.org, dtatulea@nvidia.com Subject: [PATCH net-next v7 8/9] io_uring/zcrx: document area chunking parameter Date: Sun, 30 Nov 2025 23:35:23 +0000 Message-ID: X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" struct io_uring_zcrx_ifq_reg::rx_buf_len is used as a hint specifying the kernel what buffer size it should use. Document the API and limitations. Signed-off-by: Pavel Begunkov --- Documentation/networking/iou-zcrx.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/networking/iou-zcrx.rst b/Documentation/networki= ng/iou-zcrx.rst index 54a72e172bdc..7f3f4b2e6cf2 100644 --- a/Documentation/networking/iou-zcrx.rst +++ b/Documentation/networking/iou-zcrx.rst @@ -196,6 +196,26 @@ Return buffers back to the kernel to be used again:: rqe->len =3D cqe->res; IO_URING_WRITE_ONCE(*refill_ring.ktail, ++refill_ring.rq_tail); =20 +Area chunking +------------- + +zcrx splits the memory area into fixed-length physically contiguous chunks. +This limits the maximum buffer size returned in a single io_uring CQE. Use= rs +can provide a hint to the kernel to use larger chunks by setting the +``rx_buf_len`` field of ``struct io_uring_zcrx_ifq_reg`` to the desired le= ngth +during registration. If this field is set to zero, the kernel defaults to +the system page size. + +To use larger sizes, the memory area must be backed by physically contiguo= us +ranges whose sizes are multiples of ``rx_buf_len``. It also requires kernel +and hardware support. If registration fails, users are generally expected = to +fall back to defaults by setting ``rx_buf_len`` to zero. + +Larger chunks don't give any additional guarantees about buffer sizes retu= rned +in CQEs, and they can vary depending on many factors like traffic pattern, +hardware offload, etc. It doesn't require any application changes beyond z= crx +registration. + Testing =3D=3D=3D=3D=3D=3D=3D =20 --=20 2.52.0