diff options
| author | Eric Dumazet <edumazet@google.com> | 2026-01-30 21:03:03 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-02-02 17:49:30 -0800 |
| commit | b409a7f7176bb8fc0002b8592d14b11ebe481b1d (patch) | |
| tree | 892fa362d9916a99eeb66b3bac3d61728d5e6212 /include/net/inet_sock.h | |
| parent | fe8570186f100b6cc499b2f7705946baf1388cde (diff) | |
ipv6: colocate inet6_cork in inet_cork_full
All inet6_cork users also use one inet_cork_full.
Reduce number of parameters and increase data locality.
This saves ~275 bytes of code on x86_64.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260130210303.3888261-9-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/inet_sock.h')
| -rw-r--r-- | include/net/inet_sock.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 903b2263ec80..7cdcbed3e5cb 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -159,6 +159,13 @@ static inline bool inet_sk_bound_dev_eq(const struct net *net, #endif } +struct inet6_cork { + struct ipv6_txoptions *opt; + u8 hop_limit; + u8 tclass; + u8 dontfrag:1; +}; + struct inet_cork { unsigned int flags; __be32 addr; @@ -179,6 +186,9 @@ struct inet_cork { struct inet_cork_full { struct inet_cork base; struct flowi fl; +#if IS_ENABLED(CONFIG_IPV6) + struct inet6_cork base6; +#endif }; struct ip_mc_socklist; |
