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

Ilya Maximets <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 8/11/26 9:53 PM, Mina Almasry wrote:
> 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 <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.