mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-22 16:34:25 +01:00
what about with bad GRO on UDP
This commit is contained in:
23
packet/outpacket.go
Normal file
23
packet/outpacket.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user