From patchwork Tue Mar 25 21:03:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris J Arges X-Patchwork-Id: 333711 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id B31361400A7 for ; Wed, 26 Mar 2014 08:03:18 +1100 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1WSYV6-00034X-Dy; Tue, 25 Mar 2014 21:03:12 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1WSYUz-00033U-5r for kernel-team@lists.ubuntu.com; Tue, 25 Mar 2014 21:03:05 +0000 Received: from cpe-66-68-155-223.austin.res.rr.com ([66.68.155.223] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1WSYUy-0005X0-Qh for kernel-team@lists.ubuntu.com; Tue, 25 Mar 2014 21:03:05 +0000 From: Chris J Arges To: kernel-team@lists.ubuntu.com Subject: [precise][sru][PATCH 2/5] veth: extend device features Date: Tue, 25 Mar 2014 16:03:04 -0500 Message-Id: <1395781387-10928-3-git-send-email-chris.j.arges@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1395781387-10928-1-git-send-email-chris.j.arges@canonical.com> References: <1395781387-10928-1-git-send-email-chris.j.arges@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Eric Dumazet BugLink: http://bugs.launchpad.net/bugs/1201869 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 Signed-off-by: Eric Dumazet Cc: Michał Mirosław Signed-off-by: David S. Miller (cherry picked from commit 8093315a91340bca52549044975d8c7f673b28a1) Conflicts: drivers/net/veth.c --- 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 675a12c..d123597 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -239,6 +239,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); @@ -248,9 +252,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_NO_CSUM | NETIF_F_SG | NETIF_F_RXCSUM; + dev->hw_features = VETH_FEATURES; } /*