aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/veth.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-12-29 11:26:10 -0500
committerDavid S. Miller <davem@davemloft.net>2012-12-30 05:31:59 -0500
commit8093315a91340bca52549044975d8c7f673b28a1 (patch)
treeee859ec659115fb11da91c849b81adb3769a8b2c /drivers/net/veth.c
parent2681128f0ced8aa4e66f221197e183cc16d244fe (diff)
veth: extend device features
veth is lacking most modern facilities, like SG, checksums, TSO. It makes sense to extend dev->features to get them, or GRO aggregation is defeated by a forced segmentation. Reported-by: Andrew Vagin <avagin@parallels.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r--drivers/net/veth.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index c048f8d27bbf..8b2e11238efa 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -238,6 +238,10 @@ static const struct net_device_ops veth_netdev_ops = {
238 .ndo_set_mac_address = eth_mac_addr, 238 .ndo_set_mac_address = eth_mac_addr,
239}; 239};
240 240
241#define VETH_FEATURES (NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \
242 NETIF_F_HW_CSUM | NETIF_F_RXCSUM | NETIF_F_HIGHDMA | \
243 NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX)
244
241static void veth_setup(struct net_device *dev) 245static void veth_setup(struct net_device *dev)
242{ 246{
243 ether_setup(dev); 247 ether_setup(dev);
@@ -248,9 +252,10 @@ static void veth_setup(struct net_device *dev)
248 dev->netdev_ops = &veth_netdev_ops; 252 dev->netdev_ops = &veth_netdev_ops;
249 dev->ethtool_ops = &veth_ethtool_ops; 253 dev->ethtool_ops = &veth_ethtool_ops;
250 dev->features |= NETIF_F_LLTX; 254 dev->features |= NETIF_F_LLTX;
255 dev->features |= VETH_FEATURES;
251 dev->destructor = veth_dev_free; 256 dev->destructor = veth_dev_free;
252 257
253 dev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_RXCSUM; 258 dev->hw_features = VETH_FEATURES;
254} 259}
255 260
256/* 261/*