Subject: Re: [PATCH net-next v2 08/22] ovpn: implement basic TX path (UDP)

From: Jakub Kicinski <[email-masked]>
Date: Tue, 5 Mar 2024 11:47:07 -0800

On Mon,  4 Mar 2024 16:08:59 +0100 Antonio Quartulli wrote:
> +	if (skb_is_gso(skb)) {
> +		segments = skb_gso_segment(skb, 0);
> +		if (IS_ERR(segments)) {
> +			ret = PTR_ERR(segments);
> +			net_err_ratelimited("%s: cannot segment packet: %d\n", dev->name, ret);
> +			goto drop;
> +		}
> +
> +		consume_skb(skb);
> +		skb = segments;
> +	}
> +
> +	/* from this moment on, "skb" might be a list */
> +
> +	__skb_queue_head_init(&skb_list);
> +	skb_list_walk_safe(skb, curr, next) {
> +		skb_mark_not_on_list(curr);
> +
> +		tmp = skb_share_check(curr, GFP_ATOMIC);

The share check needs to be before the segmentation, I think.