mirror of
https://github.com/openvswitch/ovs
synced 2025-10-21 14:49:41 +00:00
datapath: Enable vlan offload on internal devices.
Although it is generally best to configure vlans directly though Open vSwitch, enabling vlan acceleration on internal devices can avoid some issues and hardware limitations if Linux vlan devices are used. It is only used on kernels that support modern vlan data structures, which are 2.6.27 and later. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -176,6 +176,11 @@ static void do_setup(struct net_device *netdev)
|
||||
netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
|
||||
NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_TSO;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
|
||||
netdev->vlan_features = netdev->features;
|
||||
netdev->features |= NETIF_F_HW_VLAN_TX;
|
||||
#endif
|
||||
|
||||
vport_gen_rand_ether_addr(netdev->dev_addr);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user