Subject: Re: [xdp-hints] Re: [PATCH bpf-next v6 4/4] igc: Add launch time support to XDP ZC

From: Jakub Kicinski <[email-masked]>
Date: Mon, 27 Jan 2025 10:04:41 -0800

On Fri, 24 Jan 2025 12:45:42 +0100 Toke Høiland-Jørgensen wrote:
> >> I think there is no simple fix for that. That needs some discussion
> >> around the "expectations" to the headroom / meta data area in front of
> >> the actual packet data.  
> >
> > By 'simple' you mean without some new UAPI to signal the size of that
> > 'reserved area' by the driver? I don't see any other easy way out as well :-/  
> 
> Yeah, I don't think we can impose UAPI restrictions on the metadata area
> at this point. I guess the best we can do is to educate users that they
> should call the timestamp kfunc before they modify the metadata?

I may be misunderstanding the discussion, but I think the answer 
is that the driver must be fixed. The metadata-in-prepend problem
also exists for simple adjust head use case, so it existed since
early days of BPF. The driver should copy out (or parse) the metadata
before it invokes the XDP prog. The nfp driver does that.