diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-06-16 16:33:12 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-16 16:34:26 -0700 |
commit | dbf786c6b33d7ee58477b1ade35f39910fb2c654 (patch) | |
tree | e78f17166b9b7594324e25407b3f4577272d584a /runsc/boot/config.go | |
parent | e61acfb5eaec4450587116573f708284a0fe7849 (diff) |
Add runsc options to set checksum offloading status
--tx-checksum-offload=<true|false>
enable TX checksum offload (default: false)
--rx-checksum-offload=<true|false>
enable RX checksum offload (default: true)
Fixes #2989
PiperOrigin-RevId: 316781309
Diffstat (limited to 'runsc/boot/config.go')
-rw-r--r-- | runsc/boot/config.go | 8 |
1 files changed, 8 insertions, 0 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(), } |