Subject: Re: [PATCH v11 bpf-next 17/18] net: xdp: introduce bpf_xdp_adjust_data helper

From: Lorenzo Bianconi <[email-masked]>
Date: Wed, 18 Aug 2021 14:47:30 +0200

> Lorenzo Bianconi <[email-masked]> writes:
> 
[...]
> > + *	Description
> > + *		For XDP frames split over multiple buffers, the
> > + *		*xdp_md*\ **->data** and*xdp_md *\ **->data_end** pointers
> > + *		will point to the start and end of the first fragment only.
> > + *		This helper can be used to access subsequent fragments by
> > + *		moving the data pointers. To use, an XDP program can call
> > + *		this helper with the byte offset of the packet payload that
> > + *		it wants to access; the helper will move *xdp_md*\ **->data**
> > + *		and *xdp_md *\ **->data_end** so they point to the requested
> > + *		payload offset and to the end of the fragment containing this
> > + *		byte offset, and return the byte offset of the start of the
> > + *		fragment.
> 
> This comment is wrong now :)

actually we are still returning the byte offset of the start of the fragment
(base_offset).

Lorenzo

> -Toke