Patchwork [net-next,2/2] tunnel: Inherit NETIF_F_SG for hw_enc_features.

login
register
mail settings
Submitter Pravin B Shelar
Date March 7, 2013, 7:28 p.m.
Message ID <1362684488-1822-1-git-send-email-pshelar@nicira.com>
Download mbox | patch
Permalink /patch/225899/
State Accepted
Delegated to: David Miller
Headers show

Comments

Pravin B Shelar - March 7, 2013, 7:28 p.m.
Inherit scatergather feature for tunnel devices to avoid
copy for TSO packets of tunneling device like GRE.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
---
 net/core/dev.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
David Miller - March 9, 2013, 9:11 p.m.
From: Pravin B Shelar <pshelar@nicira.com>
Date: Thu,  7 Mar 2013 11:28:08 -0800

> Inherit scatergather feature for tunnel devices to avoid
> copy for TSO packets of tunneling device like GRE.
> 
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/core/dev.c b/net/core/dev.c
index bb99993..90cee5b 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5205,6 +5205,10 @@  int register_netdevice(struct net_device *dev)
 	 */
 	dev->vlan_features |= NETIF_F_HIGHDMA;
 
+	/* Make NETIF_F_SG inheritable to tunnel devices.
+	 */
+	dev->hw_enc_features |= NETIF_F_SG;
+
 	ret = call_netdevice_notifiers(NETDEV_POST_INIT, dev);
 	ret = notifier_to_errno(ret);
 	if (ret)