On Mon, 2021-06-28 at 12:27 +0800, Jason Wang wrote: > > If we're going to continue to *not* check on the XDP path, we similarly > > need a proof that it can't be fragmented. And also a reason to bother > > with the "optimisation", of course. > > > For XDP path, we simply need to add a length check since the packet is > always a linear memory. Sure, but in that case skb_headlen is going to be enough to cover ETH_HLEN, and that's the very first thing that the standard inline version of pskb_may_pull() checks, without ever even having to make an out-of-line call. So there's just no reason ever for us *not* to keep it really simple, and use pskb_may_pull() in all cases.