summaryrefslogtreecommitdiff
path: root/src/network/networkd-netdev-tuntap.c
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@gmail.com>2015-07-14 13:55:52 +0530
committerSusant Sahani <susant@redhat.com>2015-07-14 14:10:56 +0530
commitf5f07dbf06f6df9d12e092c05ad8cfbe244d203f (patch)
treed2a371bb533afb8a057dffe09ae496ac79e417ee /src/network/networkd-netdev-tuntap.c
parentff89f8b917a83a3fc0dc3ad0961c3bc953f78e8f (diff)
networkd: tap add support for vnet_hdr
This patch adds support to configure IFF_VNET_HDR flag for a tap device. It allows whether sending and receiving large pass larger (GSO) packets. This greatly increases the achievable throughput.
Diffstat (limited to 'src/network/networkd-netdev-tuntap.c')
-rw-r--r--src/network/networkd-netdev-tuntap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/networkd-netdev-tuntap.c b/src/network/networkd-netdev-tuntap.c
index 378312f091..ba84e802fc 100644
--- a/src/network/networkd-netdev-tuntap.c
+++ b/src/network/networkd-netdev-tuntap.c
@@ -51,6 +51,9 @@ static int netdev_fill_tuntap_message(NetDev *netdev, struct ifreq *ifr) {
if (t->multi_queue)
ifr->ifr_flags |= IFF_MULTI_QUEUE;
+ if (t->vnet_hdr)
+ ifr->ifr_flags |= IFF_VNET_HDR;
+
strncpy(ifr->ifr_name, netdev->ifname, IFNAMSIZ-1);
return 0;