From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 9E7A5606A322 for ; Sat, 5 Dec 2026 14:21:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=y4Br78aq; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bEFwy0p4 Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 743C960657; Sat, 5 Dec 2026 14:21:36 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id VqtU_Arwvdtv; Sat, 5 Dec 2026 14:21:35 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org 92D1A6064A Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796480495; b=jcc/ZMqrNktF86McYyHo4ANN4mtNKwJ6155cwZEwangFGE6WmWX43b/3aRtfD18bakW0 XkvOicg3+PXpOKjqNUYsjho0MjvV1mi7gbZL6c2q7TTu8P3CrzZ9rLQ5TMWCZ3AvLPq8V blHaAYTFBvlI1DEHEGSaqmW3PAylhUJgu0Syny3i6d7LdE76IMob+h1SOMPhClX2K3U5b MNQ/3gmO+rsynVwH773QPy20tIg0QiQvDY394+7BnMfNeZb2ZK6KP+oluON7vFotcEz++ Vu6E2G+RSrrqa75+6pMQE2IQ1BRzW87fO0AhRVZM6ScGdAUbdl2aypL6ENTy6nrT7Vg== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796480495; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: Received:DKIM-Signature:Message-ID:From:Subject:To:Cc:In-Reply-To: References:Content-Type:Content-Transfer-Encoding:Date:X-BeenThere: X-Mailman-Version:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Reply-To:Errors-To; bh=y7cgjfKmvOUIHA7VnGK4HsIrAFpyN3DvzAErJG8wK0k=; b=Db+VsVtEzl5l6U6W/vyWlcrFv3e2Pmi18O0PAqwUclarLA105s5zm+0zuU9uXPvfyQMR QxLtj/1gh8vI2UFiLMC6GZ2syLPoks3Nlr43ruzWOlICcHH6L24BNuUxZeo3mUjhJAQQR hyM4FfCmIpnmqfzRZMu3zvmM9idhq6iFGyGtNCT/HZsQtE+XXcnimT8Fizj4CBmtr4VOm CDB9EwragRyuAlfoJM1xTnlFklMtqGl86ZYz8u8C6y5DNXomVxfLAPPHtKofFdAzbpk6K O1kpazhSMIAy0oBF9CB+cJtaLYQvN616vN8g2VWW6dD5aoBS2xK5VeLPO4g6tBzLx9Q== ARC-Authentication-Results: i=1; smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1796480495; bh=y7cgjfKmvOUIHA7VnGK4HsIrAFpyN3DvzAErJG8wK0k=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=y4Br78aq4VJDOEj3erdQfhMjknzB9pFQYbmdtkA0rHClKCqbdEEy+CDyU+fvdll6w 7tf6oP8hlov0X7mfDfI+fK+xysiK19vMBQ6NiB5kwa9B693ab+e+2IADAhweE5Sq+4 G2YIcDX0g2Fhlgpt4Hyy7xz3y/kHfMfPmVQ3y+Por2QDyBjMGeEFGI2vq95wp2dP5i jWdJsiW6K1FmcEZ5CQriTVLprRX9uiU3iHrRiaHJbs7n7bqQuYJkdDDLx8k/l+heLt I7ivIVO9WWGXj4dhV9+tORHm0tIaeqWi4t9JGeSbl0Iy3Pkg+upgNM+S3wsD4eYTjT zQ2pfVjinWyng== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 92D1A6064A; Sat, 5 Dec 2026 14:21:35 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id B38F6158 for ; Sat, 5 Dec 2026 14:21:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 99B90400A8 for ; Sat, 5 Dec 2026 14:21:33 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id w3uvHPJR533z for ; Sat, 5 Dec 2026 14:21:32 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp2.osuosl.org 3F6DA400AA Authentication-Results: smtp2.osuosl.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver= Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bEFwy0p4 Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) by smtp2.osuosl.org (Postfix) with ESMTPS id 3F6DA400AA for ; Sat, 5 Dec 2026 14:21:31 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 2FF5F6091C for ; Sat, 5 Dec 2026 14:21:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C05F31F00936; Sat, 5 Dec 2026 14:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796480489; bh=y7cgjfKmvOUIHA7VnGK4HsIrAFpyN3DvzAErJG8wK0k=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=bEFwy0p4gnjhjdo6luAkne7GXIaJg3q2UzGiCgOPDvaBjQT7dU4QgCd8deRqp/nfU z/zb3Odbyj/KXYf232B2psM5WoRZLPSVKDSPXGyXW93vRfq0OZv9ALejm+VrBOk6mB 4dz4N/OHtk6gblQDKU1aV5TMIAN6IMbRciT/8bdsHIbTh2UBNB7srGYZoPvmkAOop6 JuO/tDhKOdHJFIjV8BdZzi1VWRj4CDsRGER9GPHzJishQGnv4xBMiFgZa2t2KBELfg wHSOulrR1BcUgcITJnZfuuHEpKwqpSqEMpqaPskUXo8f5QDPFhs+96onFJL969VAtP mojFKYAQAGOwg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net v4 5/5] xsk: Keep the shared info of zero-copy buffers in kernel memory To: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , bpf@vger.kernel.org Cc: intel-wired-lan@lists.osuosl.org In-Reply-To: <20261204142030.626820-6-bjorn@kernel.org> References: <20261204142030.626820-1-bjorn@kernel.org> <20261204142030.626820-6-bjorn@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 14:21:29 +0000 X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] xsk: order-1 kmalloc demotion on 4K multi-buffer XDP_PASS skb heads -- commit 97c565848cf50ed7cfbc3a8831daad9dd6b074f8 Author: Bj=C3=B6rn T=C3=B6pel xsk: Keep the shared info of zero-copy buffers in kernel memory This commit moves the skb_shared_info of zero-copy XSK buffers from UMEM tailroom into struct xsk_buff_pool and drops the tailroom reservation from zero-copy multi-buffer Rx frame sizes. > diff --git a/include/net/xdp_sock_drv.h b/include/net/xdp_sock_drv.h > index a40ad3f90f13c..ec74bf3ffa510 100644 > --- a/include/net/xdp_sock_drv.h > +++ b/include/net/xdp_sock_drv.h [ ... ] > @@ -58,18 +53,7 @@ static inline u32 __xsk_pool_get_rx_frame_size(struct = xsk_buff_pool *pool) > =20 > static inline u32 xsk_pool_get_rx_frame_size(struct xsk_buff_pool *pool) > { > - u32 frame_size =3D __xsk_pool_get_rx_frame_size(pool); > - struct xdp_umem *umem =3D pool->umem; > - bool mbuf; > - > - /* Reserve tailroom only for zero-copy pools that opted into > - * multi-buffer. The reserved area is used for skb_shared_info, > - * matching the XDP core's xdp_data_hard_end() layout. > - */ > - mbuf =3D pool->dev && (umem->flags & XDP_UMEM_SG_FLAG); > - frame_size -=3D xsk_pool_get_tailroom(mbuf); > - > - return ALIGN_DOWN(frame_size, 128); > + return ALIGN_DOWN(__xsk_pool_get_rx_frame_size(pool), 128); > } [Severity: Medium] Does removing the tailroom subtraction demote 4 KiB-chunk multi-buffer XDP_PASS skb heads to order-1 kmalloc-8k allocations? With a 4096-byte UMEM chunk and zero headroom, xsk_pool_get_rx_frame_size() now returns 3840 bytes instead of 3456. On idpf (libeth_xskfq_create()), a multi-buffer XDP_PASS head passes 256 + 3840 =3D 4096 bytes to xdp_build_skb_from_zc() -> xdp_zc_alloc_head(). Because SKB_HEAD_ALIGN(4096) is 4416 > PAGE_SIZE (previously 4032), xdp_zc_alloc_head() bypasses system_page_pool and falls back to __netdev_alloc_skb() -> kmalloc-8k. i40e_construct_skb_zc() hits the same order-1 fallback in napi_alloc_skb() once totalsize reaches 3840. This doubles skb head memory and truesize from 4 KiB to 8 KiB on every multi-buffer XDP_PASS packet, loses per-CPU page recycling, and risks GFP_ATOMIC order-1 allocation failures under memory fragmentation. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204142030.6268= 20-1-bjorn@kernel.org?part=3D5