Thread (8 messages) flat view 8 messages, 2 authors, 2022-02-14

Re: [PATCH bpf-next 2/3] veth: rework veth_xdp_rcv_skb in order to accept non-linear skb

From: Jakub Kicinski <kuba@kernel.org>
Date: 2022-02-14 15:48:32
Also in: bpf

On Sat, 12 Feb 2022 12:03:49 +0100 Lorenzo Bianconi wrote:
On Feb 11, Jakub Kicinski wrote:
quoted
On Fri, 11 Feb 2022 02:20:31 +0100 Lorenzo Bianconi wrote:  
quoted
+	if (skb_shared(skb) || skb_head_is_locked(skb)) {  
Is this sufficient to guarantee that the frags can be written?
skb_cow_data() tells a different story.  
Do you mean to consider paged part of the skb always not writable, right?
In other words, we should check something like:

	if (skb_shared(skb) || skb_head_is_locked(skb) ||
	    skb_shinfo(skb)->nr_frags) {
	    ...
	}
Yes, we do have skb_has_shared_frag() but IDK if it guarantees frags
are writable :S
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help