Thread (8 messages) flat view 8 messages, 4 authors, 24d ago

Re: [PATCH net v3 1/2] net: core: propagate unreadable flag in skb_zerocopy

From: Ilya Maximets <i.maximets@ovn.org>
Date: 2026-08-12 15:52:16
Also in: lkml

On 8/11/26 9:53 PM, Mina Almasry wrote:
quoted hunk ↗ jump to hunk
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index ae69b2cabab9e..482893a5f67dc 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -467,6 +467,9 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
 	if (!dp_ifindex)
 		return -ENODEV;
 
+	if (!skb_frags_readable(skb))
+		return -EFAULT;
+
 	if (skb_vlan_tag_present(skb)) {
 		nskb = skb_clone(skb, GFP_ATOMIC);
 		if (!nskb)
FWIW, the devmem integration doesn't seem well-designed.  I understand
that it is for performance, but IMO there should be a way to copy the
data on a slow path to avoid dropping the packets.  Clamping without
notifying the users that the packet is truncated is not a good solution.
Not for OVS, not for other parts of the kernel networking stack.  It's
a uAPI breakage.

As it is, there is not much we can do here without extensive changes
in userspace applications, so for this OVS block:

Reviewed-by: Ilya Maximets <i.maximets@ovn.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help