net: avoid initial "Features changed" message
Avoid "Features changed" message and ndo_set_features call on device registration caused by automatic enabling of GSO and GRO. Driver should have enabled hardware offloads it set in features, so the ndo_set_features() is not needed at registration time. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8e9b59b219
commit
14d1232f49
@@ -5476,12 +5476,14 @@ int register_netdevice(struct net_device *dev)
|
|||||||
* software offloads (GSO and GRO).
|
* software offloads (GSO and GRO).
|
||||||
*/
|
*/
|
||||||
dev->hw_features |= NETIF_F_SOFT_FEATURES;
|
dev->hw_features |= NETIF_F_SOFT_FEATURES;
|
||||||
dev->wanted_features = (dev->features & dev->hw_features)
|
dev->features |= NETIF_F_SOFT_FEATURES;
|
||||||
| NETIF_F_SOFT_FEATURES;
|
dev->wanted_features = dev->features & dev->hw_features;
|
||||||
|
|
||||||
/* Avoid warning from netdev_fix_features() for GSO without SG */
|
/* Avoid warning from netdev_fix_features() for GSO without SG */
|
||||||
if (!(dev->wanted_features & NETIF_F_SG))
|
if (!(dev->wanted_features & NETIF_F_SG)) {
|
||||||
dev->wanted_features &= ~NETIF_F_GSO;
|
dev->wanted_features &= ~NETIF_F_GSO;
|
||||||
|
dev->features &= ~NETIF_F_GSO;
|
||||||
|
}
|
||||||
|
|
||||||
/* Enable GRO and NETIF_F_HIGHDMA for vlans by default,
|
/* Enable GRO and NETIF_F_HIGHDMA for vlans by default,
|
||||||
* vlan_dev_init() will do the dev->features check, so these features
|
* vlan_dev_init() will do the dev->features check, so these features
|
||||||
|
Reference in New Issue
Block a user