net: vlan: enable soft features regardless of underlying device
Subsystems (2)
PATCH v2 1/1 net: vlan: enable soft features regardless of underlying device
If gso/gro feature of underlying device is turned off, then new created vlan device never can turn gso/gro on.
Although underlying device don't support TSO, we still should use software segments for vlan device.
Signed-off-by Shan Wei <[email protected]>
---
v2: only update changelog and title.
--- net/8021q/vlan_dev.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
net/8021q/vlan_dev.c +5 -0
@@ -588,9 +588,14 @@ static void vlan_dev_uninit(struct net_device *dev)static u32 vlan_dev_fix_features (struct net_device *dev,u32 features) {struct net_device *real_dev =vlan_dev_info (dev)->real_dev; +u32 old_features = features; features &= real_dev->features; features &= real_dev->vlan_features; + +if (old_features &NETIF_F_SOFT_FEATURES ) + features |= old_features &NETIF_F_SOFT_FEATURES ; +if (dev_ethtool_get_rx_csum (real_dev)) features |=NETIF_F_RXCSUM ; features |=NETIF_F_LLTX ;
Signature · 1 line
1.7.4.1
From: Shan Wei <[email protected]>
Date: Wed, 06 Jul 2011 10:08:44 +0800
Quoted 7 lines
If gso/gro feature of underlying device is turned off, then new created vlan device never can turn gso/gro on.
Although underlying device don't support TSO, we still should use software segments for vlan device.
Signed-off-by Shan Wei <[email protected]>
Applied to net-2.6, thanks.