From f0b3298db07df63fa74559d5689008f9de9980a9 Mon Sep 17 00:00:00 2001 From: Ghanan Gowripalan Date: Mon, 3 May 2021 16:38:51 -0700 Subject: Convey GSO capabilities through GSOEndpoint ...as all GSO capable endpoints must implement GSOEndpoint. PiperOrigin-RevId: 371804175 --- pkg/tcpip/link/nested/nested.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/tcpip/link/nested') 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() -- cgit v1.2.3