Marks the structs in netstack as savable. This does not change or break any
existing behavior as the netstack itself is not savable yet.
PiperOrigin-RevId: 635943481
This change has significant performance implications. bufferv2 is reference
counted and pooled, which alleviates heap/GC pressure. Below are the results
from running the iperf benchmark.
HEAD:
BenchmarkIperf/operation.Upload-16 1552 ns/op 46.6GiB total allocations
BenchmarkIperf/operation.Download-16 1114 ns/op 68.6GiB total allocations
w/ change:
BenchmarkIperf/operation.Upload-16 1139 ns/op (-27%) 1.41GiB total allocations (-97%)
BenchmarkIperf/operation.Download-16 753.2 ns/op (-33%) 706MiB total allocations (-99%)
PiperOrigin-RevId: 462453185
This change does the following:
- Uses shared types for the route key and multicast route.
- Returns a bool instead of error from GetRouteOrInsertPending since only one
error type is possible.
- Improves the naming of PendingRouteState using the suggestions in
cl/445157188.
Updates #7338.
PiperOrigin-RevId: 449812803
Aside from saving resources, this is also a workaround for the case where
timers are bound after the netstack is initialized.
Updates #7338.
PiperOrigin-RevId: 448509194
The purpose of this change is twofold:
1. Simplify AddInstalledRoute by returning a PacketBuffer slice instead of a
PendingRoute. This obviates PendingRoute.Dequeue and PendingRoute.IsEmpty.
2. Address PacketBuffer lifetime issues. With this change, the routing table
will call PacketBuffer.Clone() if it decides to enqueue the packet. When
AddInstalledRoute is called, the caller will then assume ownership of the
relevant packets and is expected to call PacketBuffer.DecRef() after
forwarding.
Updates #7338.
PiperOrigin-RevId: 446740297
In particular, this change adds support for AddInstalledRoute,
RemoveInstalledRoute, and GetLastUsedTimestamp.
Updates #7338.
PiperOrigin-RevId: 445205505
The purpose of this change is to:
- Introduce the needed abstractions for the table.
- Implement support for queuing pending packets.
Subsequent changes will:
- Implement the other needed table operations (i.e. AddInstalledRoute,
RemoveInstalledRoute, and GetLastUsedTimestamp).
- Implement the logic for expiring pending packets.
Updates #7338.
PiperOrigin-RevId: 442828835