aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_vlan.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-06-08 08:46:32 -0700
committerJakub Kicinski <kuba@kernel.org>2022-06-09 21:53:09 -0700
commit09cca53c1656960c38c04bb12da30f61952ca660 (patch)
treea58ff2dad4ed05a59dce37b412ac38aaaa459d63 /include/linux/if_vlan.h
parentnet: rename reference+tracking helpers (diff)
downloadlinux-dev-09cca53c1656960c38c04bb12da30f61952ca660.tar.xz
linux-dev-09cca53c1656960c38c04bb12da30f61952ca660.zip
vlan: adopt u64_stats_t
As explained in commit 316580b69d0a ("u64_stats: provide u64_stats_t type") we should use u64_stats_t and related accessors to avoid load/store tearing. Add READ_ONCE() when reading rx_errors & tx_dropped. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r--include/linux/if_vlan.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 2be4dd7e90a9..e00c4ee81ff7 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -118,11 +118,11 @@ static inline void vlan_drop_rx_stag_filter_info(struct net_device *dev)
* @tx_dropped: number of tx drops
*/
struct vlan_pcpu_stats {
- u64 rx_packets;
- u64 rx_bytes;
- u64 rx_multicast;
- u64 tx_packets;
- u64 tx_bytes;
+ u64_stats_t rx_packets;
+ u64_stats_t rx_bytes;
+ u64_stats_t rx_multicast;
+ u64_stats_t tx_packets;
+ u64_stats_t tx_bytes;
struct u64_stats_sync syncp;
u32 rx_errors;
u32 tx_dropped;