Thread (57 messages) 57 messages, 10 authors, 2021-04-29

Re: [PATCH v8 bpf-next 08/14] bpf: add multi-buff support to the bpf_xdp_adjust_tail() API

From: Lorenzo Bianconi <lorenzo@kernel.org>
Date: 2021-04-09 18:13:34
Also in: bpf

On Thu, Apr 08, 2021 at 10:15:47PM +0300, Vladimir Oltean wrote:
quoted
quoted
+		if (unlikely(offset > ((int)(xdp->data_end - xdp->data) +
+				       xdp_sinfo->data_length -
+				       ETH_HLEN)))
Also: should we have some sort of helper for calculating the total
length of an xdp_frame (head + frags)? Maybe it's just me, but I find it
slightly confusing that xdp_sinfo->data_length does not account for
everything.
I see now that xdp_buff :: frame_length is added in patch 10. It is a
bit strange to not use it wherever you can? Could patch 10 be moved
before patch 8?
yes, I agree we can change the patch order

Regards,
Lorenzo

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help