mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-10 22:22:27 -07:00
comments
This commit is contained in:
parent
4172b0df5b
commit
199283ff4f
1 changed files with 2 additions and 5 deletions
|
|
@ -307,9 +307,8 @@ func (r *Offload) decodeRead(pktLen int) error {
|
|||
|
||||
// GSO superpacket: validate, fix the kernel-supplied HdrLen on the
|
||||
// FORWARD path (CorrectHdrLen), pick the L4 protocol, and attach
|
||||
// the metadata. The bytes stay in rxBuf untouched — segmentation
|
||||
// happens in SegmentSuperpacket against a per-routine MTU scratch
|
||||
// at encrypt time.
|
||||
// the metadata. The bytes stay in rxBuf untouched, segmentation
|
||||
// happens in SegmentSuperpacket at encrypt time.
|
||||
if err := virtio.CheckValid(body, hdr); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -347,8 +346,6 @@ func (r *Offload) writeWithScratch(buf []byte, iovs *[2]unix.Iovec) (int, error)
|
|||
if len(buf) == 0 {
|
||||
return 0, nil
|
||||
}
|
||||
// Point the payload iovec at the caller's buffer. iovs[0] is pre-wired
|
||||
// to validVnetHdr during Offload construction so we don't rebuild it here.
|
||||
iovs[1].Base = &buf[0]
|
||||
iovs[1].SetLen(len(buf))
|
||||
return r.rawWrite(unsafe.Slice(&iovs[0], len(iovs)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue