Re: [PATCH net v3 2/2] net: add a KUnit test for the alloc_skb_with_frags() tail split

From: Haishuang Yan

Date: Fri Nov 20 2026 - 02:40:50 EST


On Thu, Nov 19, 2026 at 02:56:58PM +0000, netdev-bot+sashiko@xxxxxxxxxx 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.