google / gvisor

Application Kernel for Containers

Home Page:https://gvisor.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support overlapping slices.

ghananigans opened this issue · comments

Description

Currently endpoints that operate at layers below the transport layer (raw (network) endpoints and packet endpoints) need to perform a deep copy of the bytes because save/restore does not support overlapping slices.

When raw/packet endpoints are used, a higher-level endpoints packet buffer may hold views ("inner view") which point to the middle of a view held in a lower-level socket ("outer view"). E.g. When a packet endpoint for IPv4 and UDPv4 endpoint are both in use and a stack receives a UDPv4 packet, both the packet and UDP endpoint will receive the packet, but the UDP endpoint will only hold the slice of the packet that it cares about (UDP payload).

We should make S/R support overlapping slices to avoid this copy on every incoming packet.

// Raw IPv4 endpoints return the IP header, but IPv6 endpoints do not.

A friendly reminder that this issue had no activity for 120 days.

This issue has been closed due to lack of activity.