Skip to contentSkip to conversation

tunnel: Inherit NETIF_F_SG for hw_enc_features.

PATCH Applied Pravin B Shelar 2 participants 2 messages Mar 7, 2013 – Mar 9, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 tunnel: Inherit NETIF_F_SG for hw_enc_features.

Inherit scatergather feature for tunnel devices to avoid copy for TSO packets of tunneling device like GRE.

---
 net/core/dev.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
net/core/dev.c +4 -0
index bb99993..90cee5b 100644
@@ -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)
Signature · 1 line
1.7.1