From: Eric Dumazet <erdnetdev@gmail.com>
To: "Michał Mirosław" <mirqus@gmail.com>,
"David Miller" <davem@davemloft.net>
Cc: "Andrew Vagin" <avagin@parallels.com>,
netdev@vger.kernel.org, vvs@parallels.com,
"Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Subject: [PATCH] veth: extend device features
Date: Sat, 29 Dec 2012 18:26:10 -0800 [thread overview]
Message-ID: <1356834370.21409.6234.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAHXqBFL+Ycw4-_LRcOCT0bjhALE3HfVMB7YfcoCruu=zW5PN-g@mail.gmail.com>
From: Eric Dumazet <edumazet@google.com>
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>
---
drivers/net/veth.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 95814d9..ccf211f 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -259,6 +259,10 @@ static const struct net_device_ops veth_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
};
+#define VETH_FEATURES (NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \
+ NETIF_F_HW_CSUM | NETIF_F_RXCSUM | NETIF_F_HIGHDMA | \
+ NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX)
+
static void veth_setup(struct net_device *dev)
{
ether_setup(dev);
@@ -269,9 +273,10 @@ static void veth_setup(struct net_device *dev)
dev->netdev_ops = &veth_netdev_ops;
dev->ethtool_ops = &veth_ethtool_ops;
dev->features |= NETIF_F_LLTX;
+ dev->features |= VETH_FEATURES;
dev->destructor = veth_dev_free;
- dev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_RXCSUM;
+ dev->hw_features = VETH_FEATURES;
}
/*
next prev parent reply other threads:[~2012-12-30 2:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-29 9:24 Slow speed of tcp connections in a network namespace Andrew Vagin
2012-12-29 13:53 ` Eric Dumazet
2012-12-29 14:50 ` Andrew Vagin
2012-12-29 17:40 ` Eric Dumazet
2012-12-29 18:29 ` Andrew Vagin
2012-12-29 18:58 ` Eric Dumazet
2012-12-29 19:41 ` Eric Dumazet
2012-12-29 20:08 ` Andrew Vagin
2012-12-29 20:20 ` Eric Dumazet
2012-12-29 21:07 ` Andrew Vagin
2012-12-29 21:12 ` Eric Dumazet
2012-12-29 21:19 ` Andrew Vagin
2012-12-29 21:15 ` Andrew Vagin
2012-12-29 16:01 ` Michał Mirosław
2012-12-30 2:26 ` Eric Dumazet [this message]
2012-12-30 10:32 ` [PATCH] veth: extend device features David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1356834370.21409.6234.camel@edumazet-glaptop \
--to=erdnetdev@gmail.com \
--cc=avagin@parallels.com \
--cc=davem@davemloft.net \
--cc=mirq-linux@rere.qmqm.pl \
--cc=mirqus@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vvs@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox