summaryrefslogtreecommitdiff
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-11-19 07:43:31 -0800
committerDavid S. Miller <davem@davemloft.net>2021-11-22 12:49:42 +0000
commit4b66d2161b8125b6caa6971815e85631cf3cf36f (patch)
tree10eeca9981b607abc9fe4801577a1434826ddfa6 /drivers/net/macvlan.c
parent8e2a2f90511aec3e076ecfac6de3bd96737f2282 (diff)
net: annotate accesses to dev->gso_max_size
dev->gso_max_size is written under RTNL protection, or when the device is not yet visible, but is read locklessly. Add the READ_ONCE()/WRITE_ONCE() pairs, and use netif_set_gso_max_size() where we can to better document what is going on. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index d2f830ec2969..506e9559df80 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -900,7 +900,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;
- dev->gso_max_size = lowerdev->gso_max_size;
+ netif_set_gso_max_size(dev, lowerdev->gso_max_size);
dev->gso_max_segs = lowerdev->gso_max_segs;
dev->hard_header_len = lowerdev->hard_header_len;
macvlan_set_lockdep_class(dev);
@@ -1748,7 +1748,7 @@ static int macvlan_device_event(struct notifier_block *unused,
break;
case NETDEV_FEAT_CHANGE:
list_for_each_entry(vlan, &port->vlans, list) {
- vlan->dev->gso_max_size = dev->gso_max_size;
+ netif_set_gso_max_size(vlan->dev, dev->gso_max_size);
vlan->dev->gso_max_segs = dev->gso_max_segs;
netdev_update_features(vlan->dev);
}