diff options
| author | Eric Dumazet <edumazet@kernel.org> | 2026-10-01 19:11:40 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-06 15:35:40 -0700 |
| commit | ee2d4c2d7cc18a2cd504044a75ea614e720248eb (patch) | |
| tree | 2e805ac724e4a0117bd54fb547a580f31700716a /tools/perf/scripts/python/task-analyzer.py | |
| parent | 44378d02c5aaae24b60a75fbbb539b4aa4db503d (diff) | |
| download | linux-ee2d4c2d7cc18a2cd504044a75ea614e720248eb.tar.gz linux-ee2d4c2d7cc18a2cd504044a75ea614e720248eb.zip | |
selftests: net: tun: add test for VLAN-tagged GSO without NEEDS_CSUM
Add selftests in tun.c verifying that a VLAN-tagged (802.1Q) TCPv4 GSO
packet without VIRTIO_NET_HDR_F_NEEDS_CSUM (both flags = 0 and
flags = VIRTIO_NET_HDR_F_DATA_VALID) is accepted when written to a TAP
device (/dev/net/tun with IFF_TAP | IFF_NO_PI | IFF_VNET_HDR).
Also verify that the following are rejected with -EINVAL:
- a mismatched GSO type (VIRTIO_NET_HDR_GSO_TCPV6 on a VLAN-tagged IPv4
packet).
- a frame whose TCP header is truncated after 10 bytes. Pulling only
sizeof(struct iphdr) + sizeof(struct tcphdr) bytes would accept it,
so this requires the transport offset found by flow dissection.
Finally, verify that a 65540-byte frame is accepted. Its skb->len is
above U16_MAX while it is flow-dissected, before eth_type_trans() pulls
the Ethernet header.
Based on a reproducer by Michael S. Tsirkin <mst@redhat.com>.
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20261001191140.2818991-4-edumazet@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
