Skip to content

Commit

Permalink
tcp: shrink inet_connection_sock icsk_mtup enabled and probe_size
Browse files Browse the repository at this point in the history
This commit shrinks inet_connection_sock by 4 bytes, by shrinking
icsk_mtup.enabled from 32 bits to 1 bit, and shrinking
icsk_mtup.probe_size from s32 to an unsuigned 31 bit field.

This is to save space to compensate for the recent introduction of a
new u32 in inet_connection_sock, icsk_probes_tstamp, in the recent bug
fix commit 9d9b1ee ("tcp: fix TCP_USER_TIMEOUT with zero window").

This should not change functionality, since icsk_mtup.enabled is only
ever set to 0 or 1, and icsk_mtup.probe_size can only be either 0
or a positive MTU value returned by tcp_mss_to_mtu()

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20210129185438.1813237-1-ncardwell.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Neal Cardwell authored and Jakub Kicinski committed Jan 30, 2021
1 parent 4e146de commit 14e8e0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/net/inet_connection_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ struct inet_connection_sock {
__u16 rcv_mss; /* MSS used for delayed ACK decisions */
} icsk_ack;
struct {
int enabled;

/* Range of MTUs to search */
int search_high;
int search_low;

/* Information on the current probe. */
int probe_size;
u32 probe_size:31,
/* Is the MTUP feature enabled for this connection? */
enabled:1;

u32 probe_timestamp;
} icsk_mtup;
Expand Down

0 comments on commit 14e8e0f

Please sign in to comment.