From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (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 5245F35BDC0 for ; Fri, 9 Jan 2026 11:29:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767958162; cv=none; b=A0CQ67XsbUkVDQhfk6QxkxkffSbhMBxfXCcm7YPxIUR6AJwdQaDXTHzoLqOp+S7LxljAK830B2+yDj8xiz+CSWFh88IzU7l5pfdhzAtdYll23qZqaYRz+NHh6NgkB7DoeqdaqxNfXh32478AfTBz6T5m5BXRiF46kVyI4jjI7m8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767958162; c=relaxed/simple; bh=axdc3q5KY7YeHULab/TvgzOYs0oof9ugiogriyYfhIs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NwVWztOAVfPlxWIWFHWZDQTx511QfYU+A3SafhLU7/kaBEULUWa0PoDiIG+hpYLARbmTd9Sn7j5sCuotJZk9+60sZnfGj9HdNrU1UA3eJkirHrcMe9cWXAsDSEiwYa6X0OciqkNLQKaHq6g3y3N8YPqLWWy3eL4iso6T5axdUFY= 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=QwZdNikX; arc=none smtp.client-ip=209.85.128.65 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="QwZdNikX" Received: by mail-wm1-f65.google.com with SMTP id 5b1f17b1804b1-4779ce2a624so34536925e9.2 for ; Fri, 09 Jan 2026 03:29:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767958157; x=1768562957; 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=QwZdNikXMmUiWaP6LrA6Ss+L4IlbzqbF8LAkHZkrSJYHJAwJQzeZm6Hovf0wIRcqhB PexztlOhMNAPcHnKno9bvafz3SBPHuPe1N7aTJkWq4qn5RX2N0DAbGl8jfVmU8Pzq1o6 FvOIooIaqyNuWlJfMg1Rv0KcZ2IBryt5yp4e8HRITnG2mhY5v8pSnqUDdS0cR8H5jQmV TdNAm/O3qnO5a4/RMRYI/H+6j9zwcW+NQ/Kr2oZnB1oA3WbpZqAi6YFG9a4nhi9r1ekM 3d/nerDRq2lYdG8wL7uo6OszlN/QB0A6zKiLWKvDRusPD82tpNIL64qInLSG2s2XojGf jOuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767958157; x=1768562957; 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=oeFGBG6/oTgc6RTXzbDH47jCigpkQK96jsLq/yVGPDfRFSzNweOaQfW4FylnboZ1iF v/rAXobj4ZRVADqgGsYk1EuvbK6oCaP5bzwwF1R5UBcVM55HNwYsjfRsYkS0W7bGyj3e i7MFCJyGpwvLWeofwDVvOBi7LWagfVPkbOI9BZYoRB+mLwFH2uiN5haRQNcimyw3Ua9+ i5WyB8DgsURm6Gy98eoRx0Q8lfLGlKdu/uEbpxPm2cN0WdTp8YEX1NuOikwbki32gGPM BoW+t/geczBG52zPhokfjaL+RW/L2i0RShClNzJ8Yjb0oTvvy6vAdRlTpvC3GPlSzRp4 z1ww== X-Forwarded-Encrypted: i=1; AJvYcCVGxqzWrmAkuUEAMOGMkQuchR5WSnhu+ZkS45MAjzN7GUjQlpTZuduGb4gFrig/rzByd5xourKO+fKEeHc=@vger.kernel.org X-Gm-Message-State: AOJu0YyWrpk7ws0Wh0GtCGqxzheq9V3coYnwoYW+lNDeKUNWalu0MOl+ jt6gHo3NvjDQTauHWoWNRDkUSiF1gm9LPmNff5+nnI5J1Bo5EUr3hPz0 X-Gm-Gg: AY/fxX697H8H6pCj52TJo4rTEmtGgextPV7hcJvepBNs6Bk0y+ifEiG2NXWCc2khU6w md/bnQ1yLRnJNVfJfTU1LYYLmgcoDNCD1m1CxNshJZcS1nV83dDT7KVqJmD7K6bibYHBhC1Q0Af Avmy2ix+Nom8ma1jlcDgkziQnXggBBwVrXnVa5/nMzFYfzaggCiYwF10XAIm5+6XzvtGbNXLzFj Oha3h0asIxMocY0AG7ZhSDR3DpxktLnz2p5NZnlprkfwL9AHLQ9CEqK3QltfRp3k3suy8+fE3S8 ECCn3wyzN52wsHxrGhhJtZ0ZI4JyABPezRS7yJyujk2dR3EDFOOprSFDZ0849zfSqXRRgTLIko+ XCEaKPWA5IDJ/5XyNzkfxY16ObnTWumm9AQwKvbMl3/RztEAYMYoi7GvikQIErlH4uvvjjBn8Qb Bnvmk3p4wjOGgu4A3V9Ut0PLuoW6CQmfSh8PQMlBVzUuYmJvmVOBLg1N4W8fW0RNWiJ58hfFXBK IVDSbC6 X-Google-Smtp-Source: AGHT+IF6sUa9JMjq/7LpBs2cdH8SCduGosXSIcxXOG6syAloBrtUa/I4hJziDJatmkaPD68dJ1oitQ== X-Received: by 2002:a05:600c:1d0c:b0:471:14b1:da13 with SMTP id 5b1f17b1804b1-47d84b1fcf9mr101969345e9.14.1767958156631; Fri, 09 Jan 2026 03:29:16 -0800 (PST) Received: from 127.com ([2620:10d:c092:600::1:69b5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d8636c610sm60056985e9.0.2026.01.09.03.29.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jan 2026 03:29:15 -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 , Joshua Washington , Harshitha Ramamurthy , Saeed Mahameed , Tariq Toukan , Mark Bloch , Leon Romanovsky , Alexander Duyck , Ilias Apalodimas , Shuah Khan , Willem de Bruijn , Ankit Garg , Tim Hostetler , Alok Tiwari , Ziwei Xiao , John Fraker , Praveen Kaligineedi , Mohsin Bashir , Joe Damato , Mina Almasry , Dimitri Daskalakis , Stanislav Fomichev , Kuniyuki Iwashima , Samiullah Khawaja , Ahmed Zaki , Alexander Lobakin , Pavel Begunkov , David Wei , Yue Haibing , Haiyue Wang , Jens Axboe , Simon Horman , Vishwanath Seshagiri , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org, dtatulea@nvidia.com, io-uring@vger.kernel.org Subject: [PATCH net-next v8 9/9] io_uring/zcrx: document area chunking parameter Date: Fri, 9 Jan 2026 11:28:48 +0000 Message-ID: <65585c411f066a0565880ef0a9843e244d511bcf.1767819709.git.asml.silence@gmail.com> 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: 8bit 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/networking/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 = cqe->res; IO_URING_WRITE_ONCE(*refill_ring.ktail, ++refill_ring.rq_tail); +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. Users +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 length +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 contiguous +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 returned +in CQEs, and they can vary depending on many factors like traffic pattern, +hardware offload, etc. It doesn't require any application changes beyond zcrx +registration. + Testing ======= -- 2.52.0