Merge pull request #579 from ssahani/tap-vnet-hdr
networkd: tap add support for vnet_hdr
This commit is contained in:
@@ -562,6 +562,16 @@
|
||||
<literal>no</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>VnetHeader=</varname></term>
|
||||
<listitem><para>Takes a boolean argument. Configures
|
||||
IFF_VNET_HDR flag for a tap device. It allows sending
|
||||
and receiving larger Generic Segmentation Offload (GSO)
|
||||
packets. This may increase throughput significantly.
|
||||
Defaults to
|
||||
<literal>no</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>User=</varname></term>
|
||||
<listitem><para>User to grant access to the
|
||||
|
||||
@@ -59,6 +59,7 @@ Tun.Group, config_parse_string, 0,
|
||||
Tap.OneQueue, config_parse_bool, 0, offsetof(TunTap, one_queue)
|
||||
Tap.MultiQueue, config_parse_bool, 0, offsetof(TunTap, multi_queue)
|
||||
Tap.PacketInfo, config_parse_bool, 0, offsetof(TunTap, packet_info)
|
||||
Tap.VnetHeader, config_parse_bool, 0, offsetof(TunTap, vnet_hdr)
|
||||
Tap.User, config_parse_string, 0, offsetof(TunTap, user_name)
|
||||
Tap.Group, config_parse_string, 0, offsetof(TunTap, group_name)
|
||||
Bond.Mode, config_parse_bond_mode, 0, offsetof(Bond, mode)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -33,6 +33,7 @@ struct TunTap {
|
||||
bool one_queue;
|
||||
bool multi_queue;
|
||||
bool packet_info;
|
||||
bool vnet_hdr;
|
||||
};
|
||||
|
||||
extern const NetDevVTable tun_vtable;
|
||||
|
||||
Reference in New Issue
Block a user