[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    tcp: change ICSK_CA_PRIV_SIZE definition
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2021-06-30 23:50:44
Message-ID: git-mailbomb-linux-master-3f8ad50a9e43b6a59070e6c9c5eec79626f81095 () kernel ! org
[Download RAW message or body]

Commit:     3f8ad50a9e43b6a59070e6c9c5eec79626f81095
Parent:     6706721d82f86e9360c3ad5339fe3da5e0988a51
Refname:    refs/heads/master
Web:        https://git.kernel.org/torvalds/c/3f8ad50a9e43b6a59070e6c9c5eec79626f81095
Author:     Eric Dumazet <edumazet@google.com>
AuthorDate: Tue Jun 29 06:53:14 2021 -0700
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Tue Jun 29 11:54:36 2021 -0700

    tcp: change ICSK_CA_PRIV_SIZE definition
    
    Instead of a magic number (13 currently) and having
    to change it every other year, use sizeof_field() macro.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 include/net/inet_connection_sock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 3c8c59471bc19..b06c2d02ec84e 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -135,7 +135,7 @@ struct inet_connection_sock {
 	u32			  icsk_user_timeout;
 
 	u64			  icsk_ca_priv[104 / sizeof(u64)];
-#define ICSK_CA_PRIV_SIZE      (13 * sizeof(u64))
+#define ICSK_CA_PRIV_SIZE	  sizeof_field(struct inet_connection_sock, icsk_ca_priv)
 };
 
 #define ICSK_TIME_RETRANS	1	/* Retransmit timer */
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic