Re: [PATCH v6 net 1/8] xsk: tighten UMEM headroom validation to account for tailroom and min frame

Jakub Kicinski
2026-04-04T00:01:27Z

On Thu, 2 Apr 2026 17:49:51 +0200 Maciej Fijalkowski wrote:
> The current headroom validation in xdp_umem_reg() could leave us with
> insufficient space dedicated to even receive minimum-sized ethernet
> frame. Furthermore if multi-buffer would come to play then
> skb_shared_info stored at the end of XSK frame would be corrupted.
>
> HW typically works with 128-aligned sizes so let us provide this value
> as bare minimum.
>
> Multi-buffer setting is known later in the configuration process so
> besides accounting for 128 bytes, let us also take care of tailroom space
> upfront.

I guess it's a bit late to ask this, but am I the only one that has
weird feelings about shinfo living in user-mapped memory?