Files
Xuan Zhuo 6c860dc02a virtio-net: correct hdr_len handling for tunnel gso
The commit a2fb4bc4e2 ("net: implement virtio helpers to handle UDP
GSO tunneling.") introduces support for the UDP GSO tunnel feature in
virtio-net.

The virtio spec says:

    If the \field{gso_type} has the VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV4 bit or
    VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV6 bit set, \field{hdr_len} accounts for
    all the headers up to and including the inner transport.

The commit did not update the hdr_len to include the inner transport.

I observed that the "hdr_len" is 116 for this packet:

    17:36:18.241105 52:55:00:d1:27:0a > 2e:2c:df:46:a9:e1, ethertype IPv4 (0x0800), length 2912: (tos 0x0, ttl 64, id 45197, offset 0, flags [none], proto UDP (17), length 2898)
        192.168.122.100.50613 > 192.168.122.1.4789: [bad udp cksum 0x8106 -> 0x26a0!] VXLAN, flags [I] (0x08), vni 1
    fa:c3:ba:82:05:ee > ce:85:0c:31:77:e5, ethertype IPv4 (0x0800), length 2862: (tos 0x0, ttl 64, id 14678, offset 0, flags [DF], proto TCP (6), length 2848)
        192.168.3.1.49880 > 192.168.3.2.9898: Flags [P.], cksum 0x9266 (incorrect -> 0xaa20), seq 515667:518463, ack 1, win 64, options [nop,nop,TS val 2990048824 ecr 2798801412], length 2796

116 = 14(mac) + 20(ip) + 8(udp) + 8(vxlan) + 14(inner mac) + 20(inner ip) + 32(innner tcp)

Fixes: a2fb4bc4e2 ("net: implement virtio helpers to handle UDP GSO tunneling.")
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Link: https://patch.msgid.link/20260320021818.111741-3-xuanzhuo@linux.alibaba.com
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-24 11:12:08 +01:00
..
2026-02-11 13:44:47 +01:00
2026-01-29 20:21:41 +01:00
2025-12-15 14:33:38 +01:00
2024-10-14 23:27:57 +05:30
2022-07-05 20:25:39 +02:00
2026-01-20 19:44:19 -08:00
2020-05-24 20:48:11 +02:00
2025-07-31 11:28:03 -04:00
2026-02-12 04:23:53 -07:00
2025-11-21 11:21:31 +01:00
2023-01-29 15:18:33 -07:00
2025-12-16 14:40:51 +01:00
2025-12-13 20:04:32 +12:00
2026-02-19 09:12:05 +01:00
2025-12-23 11:23:10 -08:00
2019-02-15 16:54:38 +01:00
2022-01-20 08:52:54 +02:00
2021-07-27 20:11:45 +01:00
2024-08-29 10:39:37 +02:00
2019-06-26 13:19:46 -07:00
2026-01-12 16:52:09 +01:00
2026-02-06 07:29:14 -07:00
2023-12-20 19:26:31 -05:00
2025-09-23 11:13:22 +02:00
2025-06-11 11:57:14 -07:00
2024-02-17 16:20:41 +01:00
2026-01-05 16:43:31 +01:00
2026-01-11 06:09:11 -10:00
2026-01-20 19:24:50 -08:00
2026-01-26 19:03:47 -08:00
2025-11-23 12:30:40 +01:00
2025-12-29 11:53:38 +01:00
2026-01-26 20:02:27 -08:00
2025-09-17 15:58:29 -04:00
2025-11-03 17:41:17 +01:00
2026-02-20 17:31:55 -05:00
2026-01-30 11:34:34 +00:00
2024-08-30 08:22:38 +02:00
2024-11-16 10:09:30 -06:00
2026-02-10 11:39:31 +01:00
2026-02-10 11:39:30 +01:00
2026-01-11 06:09:11 -10:00
2025-03-12 20:41:14 +01:00
2025-10-24 21:39:27 +02:00
2025-10-31 10:16:23 +01:00
2025-11-27 14:24:30 -08:00
2022-03-08 14:33:36 -06:00
2026-01-11 06:09:11 -10:00
2025-11-28 09:21:18 -07:00
2020-12-10 16:17:15 +01:00
2026-01-05 16:43:30 +01:00
2026-01-31 14:22:57 -08:00
2026-01-14 12:04:34 +01:00
2026-01-06 17:06:03 -08:00
2026-01-11 06:09:11 -10:00
2024-06-24 18:16:44 +01:00
2026-01-20 19:24:47 -08:00
2026-01-30 18:26:59 -08:00
2025-03-13 13:25:58 -07:00