summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/network.go
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2019-01-29 01:37:54 -0800
committerShentubot <shentubot@google.com>2019-01-29 01:39:01 -0800
commit24cb2c0a7256cdb515c2fc2cfc90d130e2a405ef (patch)
tree602c0214434145c9ee6518fbb6a2c422149e026a /runsc/boot/network.go
parentb44699c5299bb0fc1b16d25a9ac2250cf0a7446d (diff)
Use recvmmsg() instead of readv() to read packets from NIC.
This should reduce the number of syscalls required to process packets significantly and improve throughputs. PiperOrigin-RevId: 231366886 Change-Id: I8b38077262bf9c53176bc4a94b530188d3d7c0ca
Diffstat (limited to 'runsc/boot/network.go')
-rw-r--r--runsc/boot/network.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/runsc/boot/network.go b/runsc/boot/network.go
index 89f186139..83d56f93a 100644
--- a/runsc/boot/network.go
+++ b/runsc/boot/network.go
@@ -140,6 +140,7 @@ func (n *Network) CreateLinksAndRoutes(args *CreateLinksAndRoutesArgs, _ *struct
EthernetHeader: true,
HandleLocal: true,
Address: mac,
+ UseRecvMMsg: true,
})
log.Infof("Enabling interface %q with id %d on addresses %+v (%v)", link.Name, nicID, link.Addresses, mac)