summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-06-14 14:40:04 +0000
committergVisor bot <gvisor-bot@google.com>2019-06-14 14:40:04 +0000
commit85a78a701013fbbee9f2de38884b6816ba62eee3 (patch)
tree0ce521dfebf5bbdf5a888db5d5180dda8ede8715
parent4f2b24601d90d855aab81e2a2f46b24006e9e6a1 (diff)
parenta8608c501b23f89ac3df50cde7428cb3c4b56145 (diff)
Merge a8608c50 (automated)
-rwxr-xr-xpkg/sentry/kernel/seqatomic_taskgoroutineschedinfo.go4
-rwxr-xr-xpkg/sentry/time/seqatomic_parameters.go4
-rw-r--r--runsc/boot/loader.go8
3 files changed, 12 insertions, 4 deletions
diff --git a/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo.go b/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo.go
index 25ad17a4e..24528b66a 100755
--- a/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo.go
+++ b/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo.go
@@ -1,12 +1,12 @@
package kernel
import (
- "fmt"
- "reflect"
"strings"
"unsafe"
+ "fmt"
"gvisor.dev/gvisor/third_party/gvsync"
+ "reflect"
)
// SeqAtomicLoad returns a copy of *ptr, ensuring that the read does not race
diff --git a/pkg/sentry/time/seqatomic_parameters.go b/pkg/sentry/time/seqatomic_parameters.go
index 89792c56d..fb30a22c6 100755
--- a/pkg/sentry/time/seqatomic_parameters.go
+++ b/pkg/sentry/time/seqatomic_parameters.go
@@ -1,12 +1,12 @@
package time
import (
- "fmt"
- "reflect"
"strings"
"unsafe"
+ "fmt"
"gvisor.dev/gvisor/third_party/gvsync"
+ "reflect"
)
// SeqAtomicLoad returns a copy of *ptr, ensuring that the read does not race
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index 53e61e43d..41027416d 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -847,9 +847,17 @@ func newEmptyNetworkStack(conf *Config, clock tcpip.Clock) (inet.Stack, error) {
// privileges.
Raw: true,
})}
+
+ // Enable SACK Recovery.
if err := s.Stack.SetTransportProtocolOption(tcp.ProtocolNumber, tcp.SACKEnabled(true)); err != nil {
return nil, fmt.Errorf("failed to enable SACK: %v", err)
}
+
+ // Enable Receive Buffer Auto-Tuning.
+ if err := s.Stack.SetTransportProtocolOption(tcp.ProtocolNumber, tcpip.ModerateReceiveBufferOption(true)); err != nil {
+ return nil, fmt.Errorf("SetTransportProtocolOption failed: %v", err)
+ }
+
return &s, nil
default: