On Friday, July 4, 2025 1:05 AM, Jesper Dangaard Brouer <h...@kernel.org> wrote: >On 02/07/2025 18.57, Song Yoong Siang wrote: >> Introduce the XDP_METADATA_SIZE macro as a conservative measure to >> accommodate any metadata areas reserved by Ethernet devices. >> > >This seems like a sloppy workaround :-( > >To me, the problem arise because AF_XDP is lacking the ability to >communicate the size of the data_meta area. If we had this capability, >then we could allow the IGC driver to take some of the space, have the >BPF-prog expand it futher (bpf_xdp_adjust_meta) and then userspace >AF_XDP would simply be able to see the size of the data_meta area, and >apply the struct xdp_meta at right offset. > Thanks for your input.
I agree with you that the implementation will be simple if user application able to get the size of data_meta area. The intention of this patch set is to let developer aware of such limitations before we have a perfect solution. Btw, do you got any suggestion on how to expose the metadata length? I not sure whether xdp_desc.options is a simple and good idea or not?