On Mon, 21 Jul 2025 12:43:57 -0700 Martin KaFai Lau wrote:
On 7/21/25 4:43 AM, Nimrod Oren wrote:
To ensure correctness across all drivers, all direct accesses to packet data should use these safer helper functions instead: bpf_xdp_load_bytes() and bpf_xdp_store_bytes().
Not sure if the test will be run on the older kernel. fwiw, there is a bpf_dynptr_slice_rdwr() kfunc which was added in commit 66e3a13e7c2c. It uses bpf_xdp_pointer() underneath, so it can avoid a copy if the requested data is contained in a single frag.
We discussed running the tests on stable but nothing materialized, yet.