mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-16 04:47:38 +02:00
GSO/GRO offloads, with TCP+ECN and UDP support
This commit is contained in:
@@ -29,15 +29,15 @@ type tun struct {
|
||||
l *slog.Logger
|
||||
|
||||
readBuf []byte
|
||||
batchRet [1][]byte
|
||||
batchRet [1]tio.Packet
|
||||
}
|
||||
|
||||
func (t *tun) Read() ([][]byte, error) {
|
||||
func (t *tun) Read() ([]tio.Packet, error) {
|
||||
n, err := t.rwc.Read(t.readBuf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
t.batchRet[0] = t.readBuf[:n]
|
||||
t.batchRet[0] = tio.Packet{Bytes: t.readBuf[:n]}
|
||||
return t.batchRet[:], nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user