Commit f6eec614 authored by Pravin B Shelar's avatar Pravin B Shelar

openvswitch: Enable tunnel GSO for OVS bridge.

Following patch enables all available tunnel GSO features for OVS
bridge device so that ovs can use hardware offloads available to
underling device.
Signed-off-by: default avatarPravin B Shelar <pshelar@nicira.com>
Acked-by: default avatarAndy Zhou <azhou@nicira.com>
parent 5cd667b0
...@@ -176,4 +176,12 @@ enum { ...@@ -176,4 +176,12 @@ enum {
NETIF_F_HW_VLAN_STAG_RX | \ NETIF_F_HW_VLAN_STAG_RX | \
NETIF_F_HW_VLAN_STAG_TX) NETIF_F_HW_VLAN_STAG_TX)
#define NETIF_F_GSO_ENCAP_ALL (NETIF_F_GSO_GRE | \
NETIF_F_GSO_GRE_CSUM | \
NETIF_F_GSO_IPIP | \
NETIF_F_GSO_SIT | \
NETIF_F_GSO_UDP_TUNNEL | \
NETIF_F_GSO_UDP_TUNNEL_CSUM | \
NETIF_F_GSO_MPLS)
#endif /* _LINUX_NETDEV_FEATURES_H */ #endif /* _LINUX_NETDEV_FEATURES_H */
...@@ -140,11 +140,14 @@ static void do_setup(struct net_device *netdev) ...@@ -140,11 +140,14 @@ static void do_setup(struct net_device *netdev)
netdev->tx_queue_len = 0; netdev->tx_queue_len = 0;
netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST | netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE; NETIF_F_HIGHDMA | NETIF_F_HW_CSUM |
NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ENCAP_ALL;
netdev->vlan_features = netdev->features; netdev->vlan_features = netdev->features;
netdev->hw_enc_features = netdev->features;
netdev->features |= NETIF_F_HW_VLAN_CTAG_TX; netdev->features |= NETIF_F_HW_VLAN_CTAG_TX;
netdev->hw_features = netdev->features & ~NETIF_F_LLTX; netdev->hw_features = netdev->features & ~NETIF_F_LLTX;
eth_hw_addr_random(netdev); eth_hw_addr_random(netdev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment