Commit 82d8189826d54740607e6a240e602850ef62a07d

Authored by Eric Dumazet
Committed by David S. Miller
1 parent 8c3a897bfa

veth: extend features to support tunneling

While investigating on a recent vxlan regression, I found veth
was using a zero features set for vxlan tunnels.

We have to segment GSO frames, copy the payload, and do the checksum.

This patch brings a ~200% performance increase

We probably have to add hw_enc_features support
on other virtual devices.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

... ... @@ -261,6 +261,8 @@
261 261  
262 262 #define VETH_FEATURES (NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \
263 263 NETIF_F_HW_CSUM | NETIF_F_RXCSUM | NETIF_F_HIGHDMA | \
  264 + NETIF_F_GSO_GRE | NETIF_F_GSO_UDP_TUNNEL | \
  265 + NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT | NETIF_F_UFO | \
264 266 NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | \
265 267 NETIF_F_HW_VLAN_STAG_TX | NETIF_F_HW_VLAN_STAG_RX )
266 268  
... ... @@ -279,6 +281,7 @@
279 281 dev->destructor = veth_dev_free;
280 282  
281 283 dev->hw_features = VETH_FEATURES;
  284 + dev->hw_enc_features = VETH_FEATURES;
282 285 }
283 286  
284 287 /*