On 30/08/2025 3:09, Jakub Kicinski wrote: > On Fri, 29 Aug 2025 00:26:29 -0700 Amery Hung wrote: >>> I'm currently working on a series that converts the xdp_native program >>> to use dynptr for accessing header data. If accepted, it should provide >>> better performance, since dynptr can access without copying the data. >> >> I feel that bpf_xdp_pull_data() is a more generic approach, but yeah >> dynptr may yield better performance. Looking forward to seeing the >> numbers. > > To be 100% clear, being able to push and pull custom UDP encap headers > (that the NIC may not even be able to parse) is one of the main use > cases for XDP, for L3 load balances. dynptr may be slower or faster > for reading and writing to the packet, but it can't push or pull. > So this is a bit of a side conversation. Sorry if I'm stating the > obvious. I agree that they are aimed at different use cases. To explore this further, I've posted the mentioned series as an RFC. The cover letter outlines where I believe each approach has advantages. I would be happy to hear your feedback. https://lore.kernel.org/all/20250909085236.2234306-1-noren@xxxxxxxxxx/