From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 2AAEC606A337 for ; Fri, 4 Dec 2026 09:57:34 +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=OiNIC5Pg; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WfdLd2SC Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0775680D34; Fri, 4 Dec 2026 09:57:34 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id U80Rvl1WKr1E; Fri, 4 Dec 2026 09:57:33 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org 3198280D5A Authentication-Results: smtp1.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=1796378253; b=IoNYFMVjcTrfyUU6wY4UmMtbYaCtWDC0R2b4K0xY9gEcXYEstWpsdCM1Q0r87bOk9JKp BrKgvK98Nw3bgj/ZMO3ZQtnbvxokmIXA82nrlXxeSgYMjzPzFMFTTax+ceA+O/WFeOroy 55WqMqrPc2sLTIjXUMARIWTUlfVhHpNtorn8cN5D7FGbFHFYp+EP+EnL2aDNIzSdVT0DS dUBuwzJxiCTN98OwyrXlJwvUoFPn+rsrYqbEqf8O/6Pt/buC25MBFD2vOK+tStLwMy71y Eoy1Mx8ZTx/86a9Aeq4t5AHL9rQuJrjp5CR1AQaQQpM0WpD8aFjKppeLTbTxPmH7oLQ== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796378253; 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=S9hLInr8ru6wdzXLGat1gTnERRHFz0wObVC2XdtlTgs=; b=oLDUZtFzME+SfxGKTxAkLqIgXFHaESiZQykxBiSvftBY8VaoZSGaqMDgvPCiQE/wlcqn IBfW6WuoWkhGp8UXADUptDbRQmzJ6Lu3e67zoROsN8N0JqAsAcJLkTm/BAI8d08OouWAA BkzqM/pR1/KqYYOQ1X/s7Q8GV8p4nMuJUsAJK1G2a5V9BJ7aer1TqrVRDZk2avacr28G4 pXE3Jo3GRWvn9o1Q9BcPVrm683TIwfkCRa9T3vSPm6S+xuJaGJAMoTLWKjATU9xO3nKbh hjcuGdFjKm5YGGHrViz55mZhw2kSipjOJ6wNSk2b4ybsHq12jsZV/EydDY12aQZu4DQ== ARC-Authentication-Results: i=1; smtp1.osuosl.org; dmarc=pass header.from=kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WfdLd2SC; 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=1796378253; bh=S9hLInr8ru6wdzXLGat1gTnERRHFz0wObVC2XdtlTgs=; 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=OiNIC5PgThF5TcnhDXa13fFnteOvEW8vZEGIhsV267jERWfmTWorpz6yq8ft+isJ8 7n5PyZ2lVhb5UhTdYSGhZ5dMa6KgxhrktoJVBKM42G0irBrL7/6nQUqP7rIOgLJzSt Er7h8xR+d4JBR001g9RRTlGqyt1yaCupXk79KwXukcq7k2SINuChelDY9AGrzyHHe3 QR/89mtmZzovylVhqTMVSPIpkD0MqQBxJmyojMbuohYqaMzi0NRyjWEIjLFJc+NALX baiMtX+B28Fxf6ygWavJQRxeK+dw+dwtPyqOT1TWBWJopBpEMtb2RS1dfbosouI7Xh lrKHoqQ1QVVbg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 3198280D5A; Fri, 4 Dec 2026 09:57:33 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id D7B042FF for ; Fri, 4 Dec 2026 09:57:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C5CC580D5A for ; Fri, 4 Dec 2026 09:57:31 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id CK7Nr5PfT3R3 for ; Fri, 4 Dec 2026 09:57:31 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org C3B0980D34 Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip="2600:3c0a:e001:78e:0:1991:8:25" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver= Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WfdLd2SC Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by smtp1.osuosl.org (Postfix) with ESMTPS id C3B0980D34 for ; Fri, 4 Dec 2026 09:57:30 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 70A1541B08 for ; Fri, 4 Dec 2026 09:57:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D4901F00931; Fri, 4 Dec 2026 09:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796378249; bh=S9hLInr8ru6wdzXLGat1gTnERRHFz0wObVC2XdtlTgs=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=WfdLd2SCK5+iiL3iANM7mAGQjd10ZEQ0o6NedhDmHofBobT2fulfUhMRqqV7jdeMU rJDs5c1a7e7lXNN3MPJNCh5XowjNiJnQ3g02jeiUBo9D+7Lkbw4NXkROUqVPJ7Y6vQ gHEzfwS0pmweUE0Y8oUmR4PPgMT39daXI0rM6pVN5sCMtqLmWAMJE/T2wpclD/5RvH t+LOb3Qv6lvsFxmT6Vwfd17JWXWFTSq7VMyX2+gg6FzmlhYMgbqn/rCgCfvKdFUEiK YMxxxfclGEbxly3ncCWnFjGv2i6T4ZwKR/NOLoLGN6RsW3QeOR0YYcERM38V06qNhP 7RzZnuvDxteIQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net v3 4/4] 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: <20261203095647.3448925-5-bjorn@kernel.org> References: <20261203095647.3448925-1-bjorn@kernel.org> <20261203095647.3448925-5-bjorn@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 09:57:28 +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.3 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_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 398e24a8ed1c684ab049fa90f5ec27a7ab098093 Author: Bj=C3=B6rn T=C3=B6pel xsk: Keep the shared info of zero-copy buffers in kernel memory This commit moves skb_shared_info for zero-copy XSK buffers out of UMEM tailroom into struct xsk_buff_pool, marks those buffers with XDP_FLAGS_SINFO_EXT, and stops reserving tailroom in xsk_pool_get_rx_frame_size() and xdp_umem_reg(). > 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 here demote 4K-chunk multi-buffer XDP_PASS skb head allocations to order-1 kmalloc-8k? With 4096-byte UMEM chunks and zero headroom, xsk_pool_get_rx_frame_size() grows from 3456 to 3840 bytes. On idpf (via libeth_xskfq_create()), a multi-buffer jumbo packet returning XDP_PASS passes a 4096-byte head (XDP_PACKET_HEADROOM + 3840) to xdp_zc_alloc_head(): net/core/xdp.c:xdp_zc_alloc_head() { u32 truesize =3D SKB_HEAD_ALIGN(size); ... if (truesize > PAGE_SIZE) return __netdev_alloc_skb(dev, size, GFP_ATOMIC | __GFP_NOWARN); } Because SKB_HEAD_ALIGN(4096) is 4416 bytes (versus 4032 bytes before), every such packet now bypasses system_page_pool and falls back to __netdev_alloc_skb(), which exceeds SKB_WITH_OVERHEAD(PAGE_SIZE) and allocates from kmalloc-8k instead of recycled order-0 pages. This doubles the skb head memory footprint, loses page-pool recycling, and risks GFP_ATOMIC order-1 allocation failures under memory fragmentation. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203095647.3448= 925-1-bjorn@kernel.org?part=3D4