On Thu, Feb 05, 2026 at 05:54:08PM -0800, Jakub Kicinski wrote: > FWIW my feeling is that instead of nickel and diming leftover space > in the frags if someone actually cared about growing mbufs we should > have the helper allocate a new page from the PP and append it to the > shinfo. Much simpler, "infinite space", and works regardless of the > driver. I don't mean that to suggest you implement it, purely to point > out that I think nobody really uses positive offsets.. So we can as > well switch more complicated drivers back to xdp_rxq_info_reg().
FWIW, I do have a use case at least in the theoretical sense for bpf_xdp_adjust_tail() with positive offsets, although it's still under development. I'm working on a DSA data path library for XDP, and one of the features it supports is redirecting from one user port to another, with in-place tag modification. If the path to the egress port goes through a tail-tagging switch but the path from the ingress port didn't, bpf_xdp_adjust_tail() with a positive offset will be called to make space for the tail tags. I'm not sure about the "regardless of the driver" part of your comment. Is it possible to mix and match allocation models and still keep track of how each individual page needs to be freed? AFAICS in xdp_return_frame(), the mem_type is assumed to be the same for the entire xdp_frame.

