diff mbox series

[net-next,9/9] ipv6: move ip6_dst_ops first in netns_ipv6

Message ID 20210331175213.691460-10-eric.dumazet@gmail.com (mailing list archive)
State Accepted
Commit 0dd39d952f75a678b2ebcac8bd60f449f303c755
Delegated to: Netdev Maintainers
Headers show
Series inet: shrink netns_ipv{4|6} | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 2 maintainers not CCed: idosch@nvidia.com amcohen@nvidia.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 7030 this patch: 7030
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch warning WARNING: 'alignement' may be misspelled - perhaps 'alignment'?
netdev/build_allmodconfig_warn success Errors and warnings before: 7245 this patch: 7245
netdev/header_inline success Link

Commit Message

Eric Dumazet March 31, 2021, 5:52 p.m. UTC
From: Eric Dumazet <edumazet@google.com>

ip6_dst_ops have cache line alignement.

Moving it at beginning of netns_ipv6
removes a 48 byte hole, and shrinks netns_ipv6
from 12 to 11 cache lines.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 include/net/netns/ipv6.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h
index 84f4a8bec397dc5a15d84fae118cda33d87671bb..808f0f79ea9c9b9094dc94b71e295e26a9202ad1 100644
--- a/include/net/netns/ipv6.h
+++ b/include/net/netns/ipv6.h
@@ -55,6 +55,9 @@  struct netns_sysctl_ipv6 {
 };
 
 struct netns_ipv6 {
+	/* Keep ip6_dst_ops at the beginning of netns_sysctl_ipv6 */
+	struct dst_ops		ip6_dst_ops;
+
 	struct netns_sysctl_ipv6 sysctl;
 	struct ipv6_devconf	*devconf_all;
 	struct ipv6_devconf	*devconf_dflt;
@@ -76,7 +79,6 @@  struct netns_ipv6 {
 	struct hlist_head       *fib_table_hash;
 	struct fib6_table       *fib6_main_tbl;
 	struct list_head	fib6_walkers;
-	struct dst_ops		ip6_dst_ops;
 	rwlock_t		fib6_walker_lock;
 	spinlock_t		fib6_gc_lock;
 	unsigned int		 ip6_rt_gc_expire;