On Mon, Jun 30, 2025 at 8:23 AM Jakub Sitnicki <jakub@xxxxxxxxxxxxxx> wrote: > > Prepare to use (struct bpf_dynptr)->offset to distinguish between an skb > dynptr for the payload vs the metadata area. > > ptr->offset is always set to zero by bpf_dynptr_from_skb(). We don't need > to account for it on access. Huh?.. What about bpf_dynptr_adjust()? This is a wrong approach to have some magical offset values. More general question about your patch set: is there ever a need to work with both metadata and data as one area of memory (i.e., copying both metadata and data in the same single operation, or setting it as one thing?). If not, why not have two different dynptrs, one for data (what we have today) and one exclusively for packet's metadata? > > Signed-off-by: Jakub Sitnicki <jakub@xxxxxxxxxxxxxx> > --- > kernel/bpf/helpers.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) [...]