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 <shanwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5318d809d7
commit
712ae51afd
1 changed files with 5 additions and 0 deletions
|
@ -586,9 +586,14 @@ static void vlan_dev_uninit(struct net_device *dev)
|
||||||
static u32 vlan_dev_fix_features(struct net_device *dev, u32 features)
|
static u32 vlan_dev_fix_features(struct net_device *dev, u32 features)
|
||||||
{
|
{
|
||||||
struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
|
struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
|
||||||
|
u32 old_features = features;
|
||||||
|
|
||||||
features &= real_dev->features;
|
features &= real_dev->features;
|
||||||
features &= real_dev->vlan_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))
|
if (dev_ethtool_get_rx_csum(real_dev))
|
||||||
features |= NETIF_F_RXCSUM;
|
features |= NETIF_F_RXCSUM;
|
||||||
features |= NETIF_F_LLTX;
|
features |= NETIF_F_LLTX;
|
||||||
|
|
Loading…
Reference in a new issue