From bc3f5d0400787e534b604793bcdc0999f2dd3db9 Mon Sep 17 00:00:00 2001 From: JackDoan Date: Mon, 4 May 2026 12:18:54 -0500 Subject: [PATCH] scoot stuff around for e2e --- overlay/tio/segment_other.go | 6 +++++- overlay/tio/virtio/header_linux.go | 4 ++-- overlay/tio/virtio/segment_linux.go | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/overlay/tio/segment_other.go b/overlay/tio/segment_other.go index 24e73fdd..6bae0030 100644 --- a/overlay/tio/segment_other.go +++ b/overlay/tio/segment_other.go @@ -4,13 +4,17 @@ package tio import "fmt" +func protoFromGSOType(_ uint8) (GSOProto, error) { + return 0, fmt.Errorf("GSO unsupported") +} + // SegmentSuperpacket invokes fn once per segment of pkt. On non-Linux // builds (and Android/e2e_testing) this package does not provide a Queue // implementation, so any caller that does construct a Packet here can only // be operating on non-superpacket bytes and the stub forwards them // directly. A non-zero GSO field is a programming error from the caller // and returns an explicit error rather than silently misbehaving. -func SegmentSuperpacket(pkt Packet, scratch []byte, fn func(seg []byte) error) error { +func SegmentSuperpacket(pkt Packet, fn func(seg []byte) error) error { if pkt.GSO.IsSuperpacket() { return fmt.Errorf("tio: GSO superpacket on platform without segmentation support") } diff --git a/overlay/tio/virtio/header_linux.go b/overlay/tio/virtio/header_linux.go index a080c9dc..8c5159de 100644 --- a/overlay/tio/virtio/header_linux.go +++ b/overlay/tio/virtio/header_linux.go @@ -1,5 +1,5 @@ -//go:build linux && !android && !e2e_testing -// +build linux,!android,!e2e_testing +//go:build linux && !android +// +build linux,!android package virtio diff --git a/overlay/tio/virtio/segment_linux.go b/overlay/tio/virtio/segment_linux.go index 1244595f..afc545bf 100644 --- a/overlay/tio/virtio/segment_linux.go +++ b/overlay/tio/virtio/segment_linux.go @@ -1,5 +1,5 @@ -//go:build linux && !android && !e2e_testing -// +build linux,!android,!e2e_testing +//go:build linux && !android +// +build linux,!android // Package virtio implements the pure validation, header-correction, and // per-segment slicing logic for kernel-supplied TSO/USO superpackets on