Skip to content

Commit

Permalink
net: enable GRO by default for vlan devices
Browse files Browse the repository at this point in the history
Currently vlan devices don't have GRO by default as none of the Ethernet
drivers add NETIF_F_GRO to their vlan_features.

As GRO is a software feature add GRO to dev->vlan_features in
register_netdevice() and let vlan_dev_init() take care that it gets
enabled only when dev->features has NETIF_F_GRO too.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Brandon Philips authored and David S. Miller committed Sep 16, 2010
1 parent b1cbd5f commit 16c3ea7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5057,6 +5057,11 @@ int register_netdevice(struct net_device *dev)
if (dev->features & NETIF_F_SG)
dev->features |= NETIF_F_GSO;

/* Enable GRO for vlans by default if dev->features has GRO also.
* vlan_dev_init() will do the dev->features check.
*/
dev->vlan_features |= NETIF_F_GRO;

ret = call_netdevice_notifiers(NETDEV_POST_INIT, dev);
ret = notifier_to_errno(ret);
if (ret)
Expand Down

0 comments on commit 16c3ea7

Please sign in to comment.