diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-05-03 23:44:59 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-03 23:44:59 +0000 |
commit | ffd373a53752a76dd11d0dfa85b62490ed0fd3b2 (patch) | |
tree | e097b2f441330ccc70ee3aba99da3fea7433e913 /pkg/tcpip/stack/registration.go | |
parent | e843fdda66e63c4e768f30e53b0ace8044804eae (diff) | |
parent | f0b3298db07df63fa74559d5689008f9de9980a9 (diff) |
Merge release-20210419.0-55-gf0b3298db (automated)
Diffstat (limited to 'pkg/tcpip/stack/registration.go')
-rw-r--r-- | pkg/tcpip/stack/registration.go | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/pkg/tcpip/stack/registration.go b/pkg/tcpip/stack/registration.go index 7ad206f6d..e26225552 100644 --- a/pkg/tcpip/stack/registration.go +++ b/pkg/tcpip/stack/registration.go @@ -756,11 +756,6 @@ const ( CapabilitySaveRestore CapabilityDisconnectOk CapabilityLoopback - CapabilityHardwareGSO - - // CapabilitySoftwareGSO indicates the link endpoint supports of sending - // multiple packets using a single call (LinkEndpoint.WritePackets). - CapabilitySoftwareGSO ) // NetworkLinkEndpoint is a data-link layer that supports sending network @@ -1047,10 +1042,29 @@ type GSO struct { MaxSize uint32 } +// SupportedGSO returns the type of segmentation offloading supported. +type SupportedGSO int + +const ( + // GSONotSupported indicates that segmentation offloading is not supported. + GSONotSupported SupportedGSO = iota + + // HWGSOSupported indicates that segmentation offloading may be performed by + // the hardware. + HWGSOSupported + + // SWGSOSupported indicates that segmentation offloading may be performed in + // software. + SWGSOSupported +) + // GSOEndpoint provides access to GSO properties. type GSOEndpoint interface { // GSOMaxSize returns the maximum GSO packet size. GSOMaxSize() uint32 + + // SupportedGSO returns the supported segmentation offloading. + SupportedGSO() SupportedGSO } // SoftwareGSOMaxSize is a maximum allowed size of a software GSO segment. |