diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2021-05-03 16:38:51 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-03 16:40:47 -0700 |
commit | f0b3298db07df63fa74559d5689008f9de9980a9 (patch) | |
tree | e13a8c3813b35e23407236fcd6b47278d893e60d /pkg/tcpip/link/nested/nested.go | |
parent | 4218ba6fb4282b4466ddda05c2ea1ffec837e079 (diff) |
Convey GSO capabilities through GSOEndpoint
...as all GSO capable endpoints must implement GSOEndpoint.
PiperOrigin-RevId: 371804175
Diffstat (limited to 'pkg/tcpip/link/nested/nested.go')
-rw-r--r-- | pkg/tcpip/link/nested/nested.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/tcpip/link/nested/nested.go b/pkg/tcpip/link/nested/nested.go index 89df35822..3e816b0c7 100644 --- a/pkg/tcpip/link/nested/nested.go +++ b/pkg/tcpip/link/nested/nested.go @@ -135,6 +135,14 @@ func (e *Endpoint) GSOMaxSize() uint32 { return 0 } +// SupportedGSO implements stack.GSOEndpoint. +func (e *Endpoint) SupportedGSO() stack.SupportedGSO { + if e, ok := e.child.(stack.GSOEndpoint); ok { + return e.SupportedGSO() + } + return stack.GSONotSupported +} + // ARPHardwareType implements stack.LinkEndpoint.ARPHardwareType func (e *Endpoint) ARPHardwareType() header.ARPHardwareType { return e.child.ARPHardwareType() |