mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-16 04:47:38 +02:00
scoot stuff around for e2e
This commit is contained in:
@@ -4,13 +4,17 @@ package tio
|
|||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
|
func protoFromGSOType(_ uint8) (GSOProto, error) {
|
||||||
|
return 0, fmt.Errorf("GSO unsupported")
|
||||||
|
}
|
||||||
|
|
||||||
// SegmentSuperpacket invokes fn once per segment of pkt. On non-Linux
|
// SegmentSuperpacket invokes fn once per segment of pkt. On non-Linux
|
||||||
// builds (and Android/e2e_testing) this package does not provide a Queue
|
// builds (and Android/e2e_testing) this package does not provide a Queue
|
||||||
// implementation, so any caller that does construct a Packet here can only
|
// implementation, so any caller that does construct a Packet here can only
|
||||||
// be operating on non-superpacket bytes and the stub forwards them
|
// be operating on non-superpacket bytes and the stub forwards them
|
||||||
// directly. A non-zero GSO field is a programming error from the caller
|
// directly. A non-zero GSO field is a programming error from the caller
|
||||||
// and returns an explicit error rather than silently misbehaving.
|
// 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() {
|
if pkt.GSO.IsSuperpacket() {
|
||||||
return fmt.Errorf("tio: GSO superpacket on platform without segmentation support")
|
return fmt.Errorf("tio: GSO superpacket on platform without segmentation support")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//go:build linux && !android && !e2e_testing
|
//go:build linux && !android
|
||||||
// +build linux,!android,!e2e_testing
|
// +build linux,!android
|
||||||
|
|
||||||
package virtio
|
package virtio
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//go:build linux && !android && !e2e_testing
|
//go:build linux && !android
|
||||||
// +build linux,!android,!e2e_testing
|
// +build linux,!android
|
||||||
|
|
||||||
// Package virtio implements the pure validation, header-correction, and
|
// Package virtio implements the pure validation, header-correction, and
|
||||||
// per-segment slicing logic for kernel-supplied TSO/USO superpackets on
|
// per-segment slicing logic for kernel-supplied TSO/USO superpackets on
|
||||||
|
|||||||
Reference in New Issue
Block a user