netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: netdev@vger.kernel.org
Cc: roopa@nvidia.com, bridge@lists.linux-foundation.org,
	davem@davemloft.net,
	Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Subject: [PATCH net-next v3 01/15] net: bridge: mdb: arrange internal structs so fast-path fields are close
Date: Sat,  5 Sep 2020 11:23:56 +0300	[thread overview]
Message-ID: <20200905082410.2230253-2-nikolay@cumulusnetworks.com> (raw)
In-Reply-To: <20200905082410.2230253-1-nikolay@cumulusnetworks.com>

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>
---
 net/bridge/br_private.h | 14 +++++++++-----
 1 file 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 {
-- 
2.25.4


  reply	other threads:[~2020-09-05  8:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-05  8:23 [PATCH net-next v3 00/15] net: bridge: mcast: initial IGMPv3/MLDv2 support (part 1) Nikolay Aleksandrov
2020-09-05  8:23 ` Nikolay Aleksandrov [this message]
2020-09-05  8:23 ` [PATCH net-next v3 02/15] net: bridge: mcast: add support for group source list Nikolay Aleksandrov
2020-09-05  8:23 ` [PATCH net-next v3 03/15] net: bridge: mcast: add support for src list and filter mode dumping Nikolay Aleksandrov
2020-09-05  8:23 ` [PATCH net-next v3 04/15] net: bridge: mcast: add support for group-and-source specific queries Nikolay Aleksandrov
2020-09-05  8:24 ` [PATCH net-next v3 05/15] net: bridge: mcast: factor out port group del Nikolay Aleksandrov
2020-09-06 20:56   ` Jakub Kicinski
2020-09-06 21:29     ` Nikolay Aleksandrov
2020-09-06 21:31       ` Nikolay Aleksandrov
2020-09-06 21:33       ` Jakub Kicinski
2020-09-05  8:24 ` [PATCH net-next v3 06/15] net: bridge: mcast: add support for group query retransmit Nikolay Aleksandrov
2020-09-06 21:01   ` Jakub Kicinski
2020-09-06 21:14     ` Nikolay Aleksandrov
2020-09-06 21:32       ` Jakub Kicinski
2020-09-05  8:24 ` [PATCH net-next v3 07/15] net: bridge: mdb: push notifications in __br_mdb_add/del Nikolay Aleksandrov
2020-09-05  8:24 ` [PATCH net-next v3 08/15] net: bridge: mdb: use mdb and port entries in notifications Nikolay Aleksandrov
2020-09-05  8:24 ` [PATCH net-next v3 09/15] net: bridge: mcast: delete expired port groups without srcs Nikolay Aleksandrov
2020-09-05  8:24 ` [PATCH net-next v3 10/15] net: bridge: mcast: support for IGMPv3/MLDv2 ALLOW_NEW_SOURCES report Nikolay Aleksandrov
2020-09-05  8:24 ` [PATCH net-next v3 11/15] net: bridge: mcast: support for IGMPV3/MLDv2 MODE_IS_INCLUDE/EXCLUDE report Nikolay Aleksandrov
2020-09-05  8:24 ` [PATCH net-next v3 12/15] net: bridge: mcast: support for IGMPV3/MLDv2 CHANGE_TO_INCLUDE/EXCLUDE report Nikolay Aleksandrov
2020-09-05  8:24 ` [PATCH net-next v3 13/15] net: bridge: mcast: support for IGMPV3/MLDv2 BLOCK_OLD_SOURCES report Nikolay Aleksandrov
2020-09-05  8:24 ` [PATCH net-next v3 14/15] net: bridge: mcast: improve IGMPv3/MLDv2 query processing Nikolay Aleksandrov
2020-09-05  8:24 ` [PATCH net-next v3 15/15] net: bridge: mcast: destroy all entries via gc Nikolay Aleksandrov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200905082410.2230253-2-nikolay@cumulusnetworks.com \
    --to=nikolay@cumulusnetworks.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).