Re: [PATCH net-next v2 08/22] ovpn: implement basic TX path (UDP)
From: Antonio Quartulli <antonio@openvpn.net>
Date: 2024-03-06 15:18:35
From: Antonio Quartulli <antonio@openvpn.net>
Date: 2024-03-06 15:18:35
On 05/03/2024 20:47, Jakub Kicinski wrote:
On Mon, 4 Mar 2024 16:08:59 +0100 Antonio Quartulli wrote:quoted
+ 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.
To be honest, I am not 100% sure. I checked other occurrences of skb_gso_segment() and I don't see skb_share_check() being invoked beforehand. Regards, -- Antonio Quartulli OpenVPN Inc.