diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-06-16 23:37:17 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-16 23:37:17 +0000 |
commit | 662394212321884d140cfe5f1ce85cb4c4e3e667 (patch) | |
tree | dc5a4a177097e66db6b2c225d464a46ce206f80e /runsc/boot | |
parent | 76f80d4109e576df2ffa2051955a58c5f9cd918d (diff) | |
parent | dbf786c6b33d7ee58477b1ade35f39910fb2c654 (diff) |
Merge release-20200608.0-67-gdbf786c6b (automated)
Diffstat (limited to 'runsc/boot')
-rw-r--r-- | runsc/boot/config.go | 8 | ||||
-rw-r--r-- | runsc/boot/network.go | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/runsc/boot/config.go b/runsc/boot/config.go index bcec7e4db..bb01b8fb5 100644 --- a/runsc/boot/config.go +++ b/runsc/boot/config.go @@ -187,6 +187,12 @@ type Config struct { // SoftwareGSO indicates that software segmentation offload is enabled. SoftwareGSO bool + // TXChecksumOffload indicates that TX Checksum Offload is enabled. + TXChecksumOffload bool + + // RXChecksumOffload indicates that RX Checksum Offload is enabled. + RXChecksumOffload bool + // QDisc indicates the type of queuening discipline to use by default // for non-loopback interfaces. QDisc QueueingDiscipline @@ -299,6 +305,8 @@ func (c *Config) ToFlags() []string { "--ref-leak-mode=" + refsLeakModeToString(c.ReferenceLeakMode), "--gso=" + strconv.FormatBool(c.HardwareGSO), "--software-gso=" + strconv.FormatBool(c.SoftwareGSO), + "--rx-checksum-offload=" + strconv.FormatBool(c.RXChecksumOffload), + "--tx-checksum-offload=" + strconv.FormatBool(c.TXChecksumOffload), "--overlayfs-stale-read=" + strconv.FormatBool(c.OverlayfsStaleRead), "--qdisc=" + c.QDisc.String(), } diff --git a/runsc/boot/network.go b/runsc/boot/network.go index 0af30456e..14d2f56a5 100644 --- a/runsc/boot/network.go +++ b/runsc/boot/network.go @@ -123,6 +123,8 @@ type FDBasedLink struct { Routes []Route GSOMaxSize uint32 SoftwareGSOEnabled bool + TXChecksumOffload bool + RXChecksumOffload bool LinkAddress net.HardwareAddr QDisc QueueingDiscipline @@ -236,7 +238,8 @@ func (n *Network) CreateLinksAndRoutes(args *CreateLinksAndRoutesArgs, _ *struct PacketDispatchMode: fdbased.RecvMMsg, GSOMaxSize: link.GSOMaxSize, SoftwareGSOEnabled: link.SoftwareGSOEnabled, - RXChecksumOffload: true, + TXChecksumOffload: link.TXChecksumOffload, + RXChecksumOffload: link.RXChecksumOffload, }) if err != nil { return err |