Article View: linux.kernel.netdev
Article #19676Re: [PATCH net v3 2/2] net: add a KUnit test for the alloc_skb_with_frags() tail split
From: Haishuang Yan
Date: Fri, 20 Nov 2026 07:40
Date: Fri, 20 Nov 2026 07:40
29 lines
10202 bytes
10202 bytes
On Thu, Nov 19, 2026 at 02:56:58PM +0000, netdev-bot+sashiko@kernel.org wrote: > Can this report a FAIL when alloc_skb_with_frags() only ran into a > temporary shortage of high-order pages? [...] > Would it be more robust to call alloc_skb_with_frags() again when the > probe succeeds, and fail only if the second call also returns NULL? I don't think this is a practical problem, so I'd like to keep the test as it is. The probe asks for the same thing the failed call needed: MAX_SKB_FRAGS - 1 order-3 pages held at once, with the same GFP_KERNEL | __GFP_NORETRY flags as the retry in patch 1. To get a false FAIL, that call has to miss an order-3 page and the probe right after it has to get all of them. The pages freed by the failed call cover only the chunks it had already allocated; the probe still has to get the one that just failed, the same way. Calling alloc_skb_with_frags() again would not remove this either: the second call can hit the same shortage, it only moves the window. On the -ENOBUFS point: err is the same for both cases on purpose; the probe is what tells them apart. Without patch 1 the call fails with plenty of free order-3 pages, the probe succeeds, and the test fails (err -105), which is the case it is there for. If the maintainers would rather have the retry, I can add it in a respin.
Technical Details
Message-ID:
<20261120074009.183870-1-yanhaishuang@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367746-linux-kernel-netdev=dewy.ruReferences:
<20261116115620.18151-3-yanhaishuang@cmss.chinamobile.com> <179510021881.3136.3672843529450562064@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367746-linux-kernel-netdev=dewy.ru From: yanhaishuang@cmss.chinamobile.com (Haishuang Yan) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v3 2/2] net: add a KUnit test for the alloc_skb_with_frags() tail split Date: Fri, 20 Nov 2026 16:40:08 +0900 Organization: Usenet Network Message-ID: <20261120074009.183870-1-yanhaishuang@cmss.chinamobile.com> References: <20261116115620.18151-3-yanhaishuang@cmss.chinamobile.com> <179510021881.3136.3672843529450562064@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3098558"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:G/FOdCoGiLeQ3YYE5srVPSZIH9Q= sha256:4zRDEqWMqiH7PikvPMZF/EPMCjGGkaYiyEXBB0a69uw= sha1:OQwBp+wDZXJDv5o0rdcibiXgb88= sha256:4IkYZSFhQxxNlu9NaXwSq5GVBDKy++PDtYwv2oSVnr0= 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 EA64F1158F1; Fri, 20 Nov 2026 10:40:57 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.75 X-Spam-Status: No, score=-2.75 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=cmss.chinamobile.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 x504zt_8UXYR; Fri, 20 Nov 2026 10:40:54 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-367746-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id DB26E1158C5; Fri, 20 Nov 2026 10:40:45 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 4210A668A2; Fri, 20 Nov 2026 07:40:44 +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=1795160442; b=o8P3u16dZwcnsDDPimlvGYJOtZXejKRROE0Owp7naGNnUbsdZwXbAccHkidOVAIsb/mA NEIaXKkZeihaMXnzbuIvAVChDzTe23L9C5x+td3wRLd70A6MaEzERD6BRCfaUtYScnD1Q eqJnKAkUuRhhwWhUvV8t4TPkaILVs5cMJriiPCF/ZUP6aiFXK+aW5ou7u5zmtjW4S5s0w 1AvtPlsTi89qXQ1qTx8eOS5/s+8Sfcsyy3L/bAgX1Z0UZAB9sHLGine/FNOyOA1KBxj2o uxNzcLE7Floufelh93/o+jGePSHW/feczYPURoWIMdnYrLFz6X0ecJAreuCM0uO/aIw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795160442; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo: X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG: Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=9zANKx3X6/4PBBAjKGxTe6yrbtSc2LzFytCT+1znbgA=; b=4aqbaUlgwcZZ24WqhNLswSzIdX1mRKMMgkR3e0pr/lqpIRe57AkogBY8OTSdmE8qEni8 7qtbgcYFnfk0vG6QCQRyRpTvkfleyc81KpvVtssQJm5ESFQX3gJs0t0B/CCiRkjK6IX3q Ny4INlOxTYfXJaiZZ6i0VSas1HRIEeT+0zRHfwJifJ8On/1ouYnABevtiCt5GptFcpO6W g8WWnLUC+NuiaazlKUzDYwURZzZ16NnmXlUyTnZGH3KFlaKX6Bcf7sYSwvZxd1izBFks1 mzVa/d2Ltxk1Y0i/eaheuS9lx5gvSORqJqs6e6t603Hh6rPaX0FAWxptvAJfiP/tlqg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=SaKVW4Un; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.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 D664B606A337; Fri, 20 Nov 2026 07:40:42 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=SaKVW4Un X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.151 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795160442; b=Wik8jag9Xbsw+dcy14OxSinWo69IiFcAizR62a9dqS+EeOGmRg6nzxSrfXMSWqlVO5X1 5bRnJ/L9v5DVcpqod2Kq6Sg513ZbMNMrfjUlXaHVrlVtLUUOq5dbPJfjrTrH1uEhNeRiP KifkfAjJe2j4UhpiOt6T5WUV3/792+YarQj4Mi3y2lKgHegHZuIXzc2tUkCdrK1n/Jeom 828Dpf0cGmp5a/TBeha+Rux99mqco5vLnGKcrZWGgrfTEkY2cT3Vnz8qoiRQGJTJzGpyQ Om58/xb9Bf1A9s5DY05gV6+6+6Ar6YMfUvsUx43aGaOlbtP1zCZgCewdRiZHqHY5Izg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795160442; h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received: X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From: To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=9zANKx3X6/4PBBAjKGxTe6yrbtSc2LzFytCT+1znbgA=; b=KHoHTA+vgM1ToMU/Ix/djXseM/yZN3eT1tDXJvCc0sjh0Md+QBX0IxUYFf59hfBttbd+ BUjwvZGI91+eyyppo8IPMCNvh7TCy8fuXfoZrlNktIb//NbTRJtcvVOWgovRC8cPEfxOJ 1M7jFdqV8MZ4gQakuEqzAaPI2pgEaZdAHqwY96zKCN526hQ958mzJ1j/iMRgLgWLTVrvj PKvkMaW7ab5LNJPO17goY+RP8P0QbARQ2JCciGh+97Hxf6fk1TW1sQj6XnuGrzJ7cHEib YTTlzt0im81wtGaie0kfaVXBVRorRJTUCwJ7jNgWunAjl7uQhoLFqFKRYc86ERQ/i0A== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=SaKVW4Un; arc=none smtp.remote-ip=111.22.67.151 X-Received: from cmccmta8.chinamobile.com (cmccmta8.chinamobile.com [111.22.67.151]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB27B606A320; Fri, 20 Nov 2026 07:40:40 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AB27B606A320 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmss.chinamobile.com; s=default; l=0; h=from:subject:message-id:to:cc:mime-version; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=SaKVW4UnsqXlhJy/uMvJvRSi200Q1oJ4Pjt2AObbmxlUMNZxLeU1uKHQudVfw2sL5C3PNfFUD8yJT tG90UMMDGjtQoDdKZdqBK8ZexvVGi3AfXoWNxmJZpTdwraY8Sps71h6knteaJ0Cz24dGq81c4p4Rny PNf9wGpBga3s9ks8= X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app06-12006 (RichMail) with SMTP id 2ee66afff9757aa-f2ae2; Fri, 20 Nov 2026 15:40:38 +0800 (CST) X-RM-TRANSID: 2ee66afff9757aa-f2ae2 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from openEuler-24.03.03 (unknown[104.224.130.48]) by rmsmtp-syy-appsvr01-12001 (RichMail) with SMTP id 2ee16afff95b8f5-1b7e1; Fri, 20 Nov 2026 15:40:38 +0800 (CST) X-RM-TRANSID: 2ee16afff95b8f5-1b7e1 X-Cc: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, almasrymina@google.com, daniel@iogearbox.net, willemb@google.com, willemdebruijn.kernel@gmail.com, mst@redhat.com, jasowangio@gmail.com, eperezma@redhat.com, narcisav.kernel@gmail.com, linux-kernel@vger.kernel.org X-Mailer: git-send-email 2.43.0 X-In-Reply-To: <179510021881.3136.3672843529450562064@kernel.org> 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