summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-11-16 07:24:24 -0800
committerDavid S. Miller <davem@davemloft.net>2018-11-17 21:37:13 -0800
commit9a5ee462302512b7f3929c19f0711715613ac418 (patch)
treed5263091d182ab0fa517fce397c406b29beb32a7 /include
parent7c460cf9cd1a4edec0c2c4aa121c3aab9c0a17f1 (diff)
net: align pcpu_sw_netstats and pcpu_lstats structs
Do not risk spanning these small structures on two cache lines, it is absolutely not worth it. For 32bit arches, the hint might not be enough, but we do not really care anymore. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 917ae7b6263e..086e64d88597 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2389,13 +2389,13 @@ struct pcpu_sw_netstats {
u64 tx_packets;
u64 tx_bytes;
struct u64_stats_sync syncp;
-};
+} __aligned(4 * sizeof(u64));
struct pcpu_lstats {
u64 packets;
u64 bytes;
struct u64_stats_sync syncp;
-};
+} __aligned(2 * sizeof(u64));
#define __netdev_alloc_pcpu_stats(type, gfp) \
({ \