summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2020-09-07 12:56:05 +0300
committerJakub Kicinski <kuba@kernel.org>2020-09-07 23:16:34 +0300
commit6ec0d0ee66473469ea85a2da204eefc14c465c5e (patch)
treebccfa71b5e62ef4d1dec0ddba5e234ff6bc74b1c /net/bridge
parentbb1416adb8a084f2979ac9536dca3e4c44d45821 (diff)
downloadlinux-6ec0d0ee66473469ea85a2da204eefc14c465c5e.tar.xz
net: bridge: mdb: arrange internal structs so fast-path fields are close
Before this patch we'd need 2 cache lines for fast-path, now all used fields are in the first cache line. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_private.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index baa1500f384f..357b6905ecef 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -217,23 +217,27 @@ struct net_bridge_fdb_entry {
struct net_bridge_port_group {
struct net_bridge_port *port;
struct net_bridge_port_group __rcu *next;
- struct hlist_node mglist;
- struct rcu_head rcu;
- struct timer_list timer;
struct br_ip addr;
unsigned char eth_addr[ETH_ALEN] __aligned(2);
unsigned char flags;
+
+ struct timer_list timer;
+ struct hlist_node mglist;
+
+ struct rcu_head rcu;
};
struct net_bridge_mdb_entry {
struct rhash_head rhnode;
struct net_bridge *br;
struct net_bridge_port_group __rcu *ports;
- struct rcu_head rcu;
- struct timer_list timer;
struct br_ip addr;
bool host_joined;
+
+ struct timer_list timer;
struct hlist_node mdb_node;
+
+ struct rcu_head rcu;
};
struct net_bridge_port {