what about with bad GRO on UDP

This commit is contained in:
JackDoan
2025-11-10 14:47:38 -06:00
parent 42591c2042
commit c645a45438
8 changed files with 411 additions and 223 deletions

23
packet/outpacket.go Normal file
View File

@@ -0,0 +1,23 @@
package packet
type OutPacket struct {
Segments [][]byte
//todo virtio header?
SegSize int
SegCounter int
Valid bool
wasSegmented bool
Scratch []byte
}
func NewOut() *OutPacket {
out := new(OutPacket)
const numSegments = 64
out.Segments = make([][]byte, numSegments)
for i := 0; i < numSegments; i++ { //todo this is dumb
out.Segments[i] = make([]byte, Size)
}
out.Scratch = make([]byte, Size)
return out
}