From dbf786c6b33d7ee58477b1ade35f39910fb2c654 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Tue, 16 Jun 2020 16:33:12 -0700 Subject: Add runsc options to set checksum offloading status --tx-checksum-offload= enable TX checksum offload (default: false) --rx-checksum-offload= enable RX checksum offload (default: true) Fixes #2989 PiperOrigin-RevId: 316781309 --- runsc/boot/network.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runsc/boot/network.go') 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 -- cgit v1.2.3