On 6/10/26 2:19 PM, Gabriel Goller wrote: > On Tue, 09 Jun 2026 16:44:26 +0200, Paolo Abeni <[email protected]> wrote: >> [...] >> >> Fixes: 56a06bd40fab ("virtio_net: enable gso over UDP tunnel support.") >> Reported-by: Fiona Ebner <[email protected]> >> Closes: https://bugzilla.proxmox.com/show_bug.cgi?id=7627 >> Tested-by: Fiona Ebner <[email protected]> >> Signed-off-by: Paolo Abeni <[email protected]> > > Gave it a spin and it works alright, so consider: > >> >> >> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c >> index f4adcfee7a80..07b8710639f9 100644 >> --- a/drivers/net/virtio_net.c >> +++ b/drivers/net/virtio_net.c >> @@ -6222,6 +6222,18 @@ static void virtnet_free_irq_moder(struct >> virtnet_info *vi) >> rtnl_unlock(); >> } >> >> +static netdev_features_t virtnet_features_check(struct sk_buff *skb, >> + struct net_device *dev, >> + netdev_features_t features) >> +{ >> + /* Inner csum offload is only available for GSO packets. */ >> + if (skb->encapsulation && !skb_is_gso(skb)) > > A small question -- should we maybe check for skb_gso_ok here as well? > So add: > > (!skb_is_gso(skb) || !skb_gso_ok(skb, features))) > > Because skb_is_gso alone doesn't guarantee that the packets leaving virtio > will > be gso'd, they could be software gso'd at validate_xmit_skb, which is called > after ndo_feature_check. > leaving the virtio device.
Good point. Indeed disabling tx-udp_tnl-segmentation inside the guest after successful VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO negotiation would again break the connectivity in the critical scenarios. Let me test a v2. Thanks, Paolo
