summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/fdbased/packet_dispatchers.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-05-03 23:44:59 +0000
committergVisor bot <gvisor-bot@google.com>2021-05-03 23:44:59 +0000
commitffd373a53752a76dd11d0dfa85b62490ed0fd3b2 (patch)
treee097b2f441330ccc70ee3aba99da3fea7433e913 /pkg/tcpip/link/fdbased/packet_dispatchers.go
parente843fdda66e63c4e768f30e53b0ace8044804eae (diff)
parentf0b3298db07df63fa74559d5689008f9de9980a9 (diff)
Merge release-20210419.0-55-gf0b3298db (automated)
Diffstat (limited to 'pkg/tcpip/link/fdbased/packet_dispatchers.go')
-rw-r--r--pkg/tcpip/link/fdbased/packet_dispatchers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/link/fdbased/packet_dispatchers.go b/pkg/tcpip/link/fdbased/packet_dispatchers.go
index a7adf822b..4b7ef3aac 100644
--- a/pkg/tcpip/link/fdbased/packet_dispatchers.go
+++ b/pkg/tcpip/link/fdbased/packet_dispatchers.go
@@ -128,7 +128,7 @@ type readVDispatcher struct {
func newReadVDispatcher(fd int, e *endpoint) (linkDispatcher, error) {
d := &readVDispatcher{fd: fd, e: e}
- skipsVnetHdr := d.e.Capabilities()&stack.CapabilityHardwareGSO != 0
+ skipsVnetHdr := d.e.gsoKind == stack.HWGSOSupported
d.buf = newIovecBuffer(BufConfig, skipsVnetHdr)
return d, nil
}
@@ -212,7 +212,7 @@ func newRecvMMsgDispatcher(fd int, e *endpoint) (linkDispatcher, error) {
bufs: make([]*iovecBuffer, MaxMsgsPerRecv),
msgHdrs: make([]rawfile.MMsgHdr, MaxMsgsPerRecv),
}
- skipsVnetHdr := d.e.Capabilities()&stack.CapabilityHardwareGSO != 0
+ skipsVnetHdr := d.e.gsoKind == stack.HWGSOSupported
for i := range d.bufs {
d.bufs[i] = newIovecBuffer(BufConfig, skipsVnetHdr)
}