net/tstun: clarify GROFilterFunc *gro.GRO usage (#13318)

Updates #cleanup

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited 2024-08-29 13:04:46 -07:00 committed by GitHub
parent ecc451501c
commit 45c97751fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,9 +80,10 @@ type FilterFunc func(*packet.Parsed, *Wrapper) filter.Response
// throughput where GRO is supported by a packet.Parsed interceptor, e.g. // throughput where GRO is supported by a packet.Parsed interceptor, e.g.
// netstack/gVisor, and we are handling a vector of packets. Callers must pass a // netstack/gVisor, and we are handling a vector of packets. Callers must pass a
// nil g for the first packet in a given vector, and continue passing the // nil g for the first packet in a given vector, and continue passing the
// returned *gro.GRO for all remaining packets in said vector. If g is non-nil // returned *gro.GRO for all remaining packets in said vector. If the returned
// after the last packet for a given vector is passed through the GROFilterFunc, // *gro.GRO is non-nil after the last packet for a given vector is passed
// the caller must also call g.Flush(). // through the GROFilterFunc, the caller must also call Flush() on it to deliver
// any previously Enqueue()'d packets.
type GROFilterFunc func(p *packet.Parsed, w *Wrapper, g *gro.GRO) (filter.Response, *gro.GRO) type GROFilterFunc func(p *packet.Parsed, w *Wrapper, g *gro.GRO) (filter.Response, *gro.GRO)
// Wrapper augments a tun.Device with packet filtering and injection. // Wrapper augments a tun.Device with packet filtering and injection.