mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Remove TCP endpoint goroutines.
This change removes all endpoint goroutines and all TCP processing is now done inline in the TCP processor loop. TCP timers directly invoke handlers as required rather than assert a waker. UnlockUser is also simplified to just queue the endpoint to the processor instead of trying to process segments inline. This allows us to centralize logic for TCP state handling in the processor. This potentially could involve an extra wakeup but now that endpoint goroutines do not exist this is not such a big concern as in case of busy servers the processor goroutines will already be running anyway. This change also allows us to clean up S/R as now restoring a TCP endpoint does not require restarting a goroutine and moving it to the right logical point but only requires that we restart any timers that may have been running when the save was done and restore any port bindings as required. Endpoint.Release is now removed in favor of Endpoint.Abort by using Abort in places where we use Endpoint.Release. Updates #231 PiperOrigin-RevId: 442673015
This commit is contained in:
committed by
gVisor bot
parent
5f9bd8a53b
commit
74a1820ceb
@@ -444,6 +444,11 @@ func (s *Stack) IPTables() (*stack.IPTables, error) {
|
||||
return s.Stack.IPTables(), nil
|
||||
}
|
||||
|
||||
// Pause implements inet.Stack.Pause.
|
||||
func (s *Stack) Pause() {
|
||||
s.Stack.Pause()
|
||||
}
|
||||
|
||||
// Resume implements inet.Stack.Resume.
|
||||
func (s *Stack) Resume() {
|
||||
s.Stack.Resume()
|
||||
|
||||
Reference in New Issue
Block a user