summaryrefslogtreecommitdiff
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-05-05 19:51:31 -0700
committerDavid S. Miller <davem@davemloft.net>2022-05-06 12:07:56 +0100
commit6df6398f7c8b481ce83f28143bc08a5231616deb (patch)
tree5e61db4831d6b8a01f40a5e30e81b91429c9236e /drivers/net/macvlan.c
parentbeb21e3e8e261fc9f11050af17efe6de183b33d3 (diff)
net: add netif_inherit_tso_max()
To make later patches smaller create a helper for inheriting the TSO limitations of a lower device. The TSO in the name is not an accident, subsequent patches will replace GSO with TSO in more names. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index b00bc8173abe..0017bd0fe3bb 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -904,8 +904,7 @@ static int macvlan_init(struct net_device *dev)
dev->vlan_features = lowerdev->vlan_features & MACVLAN_FEATURES;
dev->vlan_features |= ALWAYS_ON_OFFLOADS;
dev->hw_enc_features |= dev->features;
- netif_set_gso_max_size(dev, lowerdev->gso_max_size);
- netif_set_gso_max_segs(dev, lowerdev->gso_max_segs);
+ netif_inherit_tso_max(dev, lowerdev);
dev->hard_header_len = lowerdev->hard_header_len;
macvlan_set_lockdep_class(dev);
@@ -1763,8 +1762,7 @@ static int macvlan_device_event(struct notifier_block *unused,
break;
case NETDEV_FEAT_CHANGE:
list_for_each_entry(vlan, &port->vlans, list) {
- netif_set_gso_max_size(vlan->dev, dev->gso_max_size);
- netif_set_gso_max_segs(vlan->dev, dev->gso_max_segs);
+ netif_inherit_tso_max(vlan->dev, dev);
netdev_update_features(vlan->dev);
}
break;