diff mbox series

[net-next] tcp: align tcp_sock_write_rx group

Message ID 20240301171945.2958176-1-edumazet@google.com (mailing list archive)
State Accepted
Commit 345a6e2631c1267221b684e110bba03e4c26ece0
Delegated to: Netdev Maintainers
Headers show
Series [net-next] tcp: align tcp_sock_write_rx group | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next, async
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 2925 this patch: 2925
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 1 blamed authors not CCed: jiri@resnulli.us; 2 maintainers not CCed: jiri@resnulli.us dsahern@kernel.org
netdev/build_clang success Errors and warnings before: 1007 this patch: 1007
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 3139 this patch: 3139
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-03-05--03-00 (tests: 890)

Commit Message

Eric Dumazet March 1, 2024, 5:19 p.m. UTC
Stephen Rothwell and kernel test robot reported that some arches
(parisc, hexagon) and/or compilers would not like blamed commit.

Lets make sure tcp_sock_write_rx group does not start with a hole.

While we are at it, correct tcp_sock_write_tx CACHELINE_ASSERT_GROUP_SIZE()
since after the blamed commit, we went to 105 bytes.

Fixes: 99123622050f ("tcp: remove some holes in struct tcp_sock")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/netdev/20240301121108.5d39e4f9@canb.auug.org.au/
Closes: https://lore.kernel.org/oe-kbuild-all/202403011451.csPYOS3C-lkp@intel.com/
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 include/linux/tcp.h | 2 +-
 net/ipv4/tcp.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Horman March 4, 2024, 5:09 p.m. UTC | #1
On Fri, Mar 01, 2024 at 05:19:45PM +0000, Eric Dumazet wrote:
> Stephen Rothwell and kernel test robot reported that some arches
> (parisc, hexagon) and/or compilers would not like blamed commit.
> 
> Lets make sure tcp_sock_write_rx group does not start with a hole.
> 
> While we are at it, correct tcp_sock_write_tx CACHELINE_ASSERT_GROUP_SIZE()
> since after the blamed commit, we went to 105 bytes.
> 
> Fixes: 99123622050f ("tcp: remove some holes in struct tcp_sock")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/netdev/20240301121108.5d39e4f9@canb.auug.org.au/
> Closes: https://lore.kernel.org/oe-kbuild-all/202403011451.csPYOS3C-lkp@intel.com/
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org> # build-tested

...
patchwork-bot+netdevbpf@kernel.org March 5, 2024, 5 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri,  1 Mar 2024 17:19:45 +0000 you wrote:
> Stephen Rothwell and kernel test robot reported that some arches
> (parisc, hexagon) and/or compilers would not like blamed commit.
> 
> Lets make sure tcp_sock_write_rx group does not start with a hole.
> 
> While we are at it, correct tcp_sock_write_tx CACHELINE_ASSERT_GROUP_SIZE()
> since after the blamed commit, we went to 105 bytes.
> 
> [...]

Here is the summary with links:
  - [net-next] tcp: align tcp_sock_write_rx group
    https://git.kernel.org/netdev/net-next/c/345a6e2631c1

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 988a30ef6bfe956fa573f1f18c8284aa382dc1cc..55399ee2a57e736b55ed067fc06ea620bbe62fd3 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -304,7 +304,7 @@  struct tcp_sock {
 	__cacheline_group_end(tcp_sock_write_txrx);
 
 	/* RX read-write hotpath cache lines */
-	__cacheline_group_begin(tcp_sock_write_rx);
+	__cacheline_group_begin(tcp_sock_write_rx) __aligned(8);
 	u64	bytes_received;
 				/* RFC4898 tcpEStatsAppHCThruOctetsReceived
 				 * sum(delta(rcv_nxt)), or how many bytes
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index c82dc42f57c65df112f79080ff407cd98d11ce68..7e1b848398d04f2da2a91c3af97b1e2e3895b8ee 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -4651,7 +4651,7 @@  static void __init tcp_struct_check(void)
 	CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, tsorted_sent_queue);
 	CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, highest_sack);
 	CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, ecn_flags);
-	CACHELINE_ASSERT_GROUP_SIZE(struct tcp_sock, tcp_sock_write_tx, 113);
+	CACHELINE_ASSERT_GROUP_SIZE(struct tcp_sock, tcp_sock_write_tx, 105);
 
 	/* TXRX read-write hotpath cache lines */
 	CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_txrx, pred_flags);