All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>
Cc: David Ahern <dsahern@kernel.org>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com,
	 Eric Dumazet <edumazet@google.com>
Subject: [PATCH net-next 01/13] ipv6: add ipv6_devconf_read_txrx cacheline_group
Date: Mon, 26 Feb 2024 15:50:43 +0000	[thread overview]
Message-ID: <20240226155055.1141336-2-edumazet@google.com> (raw)
In-Reply-To: <20240226155055.1141336-1-edumazet@google.com>

IPv6 TX and RX fast path use the following fields:

- disable_ipv6
- hop_limit
- mtu6
- forwarding
- disable_policy
- proxy_ndp

Place them in a group to increase data locality.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 include/linux/ipv6.h | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index ef3aa060a289ea4eecf4d6e8c1dc614101f37c3f..383a0ea2ab9131e685822e5df506582802642e84 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -3,6 +3,7 @@
 #define _IPV6_H
 
 #include <uapi/linux/ipv6.h>
+#include <linux/cache.h>
 
 #define ipv6_optlen(p)  (((p)->hdrlen+1) << 3)
 #define ipv6_authlen(p) (((p)->hdrlen+2) << 2)
@@ -10,9 +11,16 @@
  * This structure contains configuration options per IPv6 link.
  */
 struct ipv6_devconf {
-	__s32		forwarding;
+	/* RX & TX fastpath fields. */
+	__cacheline_group_begin(ipv6_devconf_read_txrx);
+	__s32		disable_ipv6;
 	__s32		hop_limit;
 	__s32		mtu6;
+	__s32		forwarding;
+	__s32		disable_policy;
+	__s32		proxy_ndp;
+	__cacheline_group_end(ipv6_devconf_read_txrx);
+
 	__s32		accept_ra;
 	__s32		accept_redirects;
 	__s32		autoconf;
@@ -45,7 +53,6 @@ struct ipv6_devconf {
 	__s32		accept_ra_rt_info_max_plen;
 #endif
 #endif
-	__s32		proxy_ndp;
 	__s32		accept_source_route;
 	__s32		accept_ra_from_local;
 #ifdef CONFIG_IPV6_OPTIMISTIC_DAD
@@ -55,7 +62,6 @@ struct ipv6_devconf {
 #ifdef CONFIG_IPV6_MROUTE
 	atomic_t	mc_forwarding;
 #endif
-	__s32		disable_ipv6;
 	__s32		drop_unicast_in_l2_multicast;
 	__s32		accept_dad;
 	__s32		force_tllao;
@@ -76,7 +82,6 @@ struct ipv6_devconf {
 #endif
 	__u32		enhanced_dad;
 	__u32		addr_gen_mode;
-	__s32		disable_policy;
 	__s32           ndisc_tclass;
 	__s32		rpl_seg_enabled;
 	__u32		ioam6_id;
-- 
2.44.0.rc1.240.g4c46232300-goog


  reply	other threads:[~2024-02-26 15:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 15:50 [PATCH net-next 00/13] ipv6: lockless accesses to devconf Eric Dumazet
2024-02-26 15:50 ` Eric Dumazet [this message]
2024-02-26 15:50 ` [PATCH net-next 02/13] ipv6: annotate data-races around cnf.disable_ipv6 Eric Dumazet
2024-02-26 16:09   ` Jiri Pirko
2024-02-26 16:14     ` Eric Dumazet
2024-02-26 16:18       ` Jiri Pirko
2024-02-26 16:24         ` Eric Dumazet
2024-02-26 16:46           ` Jiri Pirko
2024-02-26 15:50 ` [PATCH net-next 03/13] ipv6: annotate data-races around cnf.mtu6 Eric Dumazet
2024-02-26 15:50 ` [PATCH net-next 04/13] ipv6: annotate data-races around cnf.hop_limit Eric Dumazet
2024-02-26 15:50 ` [PATCH net-next 05/13] ipv6: annotate data-races around cnf.forwarding Eric Dumazet
2024-02-26 15:50 ` [PATCH net-next 06/13] ipv6: annotate data-races in ndisc_router_discovery() Eric Dumazet
2024-02-26 15:50 ` [PATCH net-next 07/13] ipv6: annotate data-races around idev->cnf.ignore_routes_with_linkdown Eric Dumazet
2024-02-26 15:50 ` [PATCH net-next 08/13] ipv6: annotate data-races in rt6_probe() Eric Dumazet
2024-02-26 15:50 ` [PATCH net-next 09/13] ipv6: annotate data-races around devconf->proxy_ndp Eric Dumazet
2024-02-26 15:50 ` [PATCH net-next 10/13] ipv6: annotate data-races around devconf->disable_policy Eric Dumazet
2024-02-26 15:50 ` [PATCH net-next 11/13] ipv6/addrconf: annotate data-races around devconf fields (I) Eric Dumazet
2024-02-26 15:50 ` [PATCH net-next 12/13] ipv6/addrconf: annotate data-races around devconf fields (II) Eric Dumazet
2024-02-26 15:50 ` [PATCH net-next 13/13] ipv6: use xa_array iterator to implement inet6_netconf_dump_devconf() Eric Dumazet
2024-02-26 16:55   ` Jiri Pirko
2024-02-27 11:49     ` Eric Dumazet

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=20240226155055.1141336-2-edumazet@google.com \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.