From ffd9a99e116775904762b688b2caabbc61e74c82 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 14 Jul 2015 13:55:52 +0530 Subject: [PATCH] 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. --- src/shared/virt.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/shared/virt.h b/src/shared/virt.h index 7194ab2bf..29f8bb0ea 100644 --- a/src/shared/virt.h +++ b/src/shared/virt.h @@ -1,11 +1,9 @@ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -#pragma once - /*** This file is part of systemd. - Copyright 2011 Lennart Poettering + Copyright 2014 Tom Gundersen systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -21,15 +19,22 @@ along with systemd; If not, see . ***/ -int detect_vm(const char **id); -int detect_container(const char **id); +#pragma once + +typedef struct TunTap TunTap; + +#include "networkd-netdev.h" + +struct TunTap { + NetDev meta; -enum { - VIRTUALIZATION_NONE = 0, - VIRTUALIZATION_VM, - VIRTUALIZATION_CONTAINER, - _VIRTUALIZATION_MAX, - _VIRTUALIZATION_INVALID = -1 + char *user_name; + char *group_name; + bool one_queue; + bool multi_queue; + bool packet_info; + bool vnet_hdr; }; -int detect_virtualization(const char **id); +extern const NetDevVTable tun_vtable; +extern const NetDevVTable tap_vtable; -- 2.30.2