Documentation ¶
Overview ¶
Package gro implements GRO for the receive (write) path into gVisor.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RXChecksumOffload ¶
func RXChecksumOffload(p *packet.Parsed) *stack.PacketBuffer
RXChecksumOffload validates IPv4, TCP, and UDP header checksums in p, returning an equivalent *stack.PacketBuffer if they are valid, otherwise nil. The set of headers validated covers where gVisor would perform validation if !stack.PacketBuffer.RXChecksumValidated, i.e. it satisfies stack.CapabilityRXChecksumOffload. Other protocols with checksum fields, e.g. ICMP{v6}, are still validated by gVisor regardless of rx checksum offloading capabilities.
Types ¶
type GRO ¶
type GRO struct {
// contains filtered or unexported fields
}
GRO coalesces incoming packets to increase throughput. It is NOT thread-safe.
func NewGRO ¶
func NewGRO() *GRO
NewGRO returns a new instance of *GRO from a sync.Pool. It can be returned to the pool with GRO.Flush().
func (*GRO) Enqueue ¶
Enqueue enqueues the provided packet for GRO. It may immediately deliver it to the underlying stack.NetworkDispatcher depending on its contents. To explicitly flush previously enqueued packets see Flush().
func (*GRO) Flush ¶
func (g *GRO) Flush()
Flush flushes previously enqueued packets to the underlying stack.NetworkDispatcher, and returns GRO to a pool for later re-use. Callers MUST NOT use GRO once it has been Flush()'d.
func (*GRO) SetDispatcher ¶
func (g *GRO) SetDispatcher(d stack.NetworkDispatcher)
SetDispatcher sets the underlying stack.NetworkDispatcher where packets are delivered.