Skip to content

Commit

Permalink
net/tstun: clarify GROFilterFunc *gro.GRO usage (tailscale#13318)
Browse files Browse the repository at this point in the history
Updates #cleanup

Signed-off-by: Jordan Whited <jordan@tailscale.com>
  • Loading branch information
jwhited authored Aug 29, 2024
1 parent ecc4515 commit 45c9775
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/tstun/wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ type FilterFunc func(*packet.Parsed, *Wrapper) filter.Response
// 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
// 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
// after the last packet for a given vector is passed through the GROFilterFunc,
// the caller must also call g.Flush().
// returned *gro.GRO for all remaining packets in said vector. If the returned
// *gro.GRO is non-nil after the last packet for a given vector is passed
// 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)

// Wrapper augments a tun.Device with packet filtering and injection.
Expand Down

0 comments on commit 45c9775

Please sign in to comment.