aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-27 21:48:32 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:30:53 -0500
commit2ff52f282cf287d60e9eda1f3b5ec83e00a86130 (patch)
tree1838d36bbe158bb5e82d7f4b5b699e8b685930e1 /include
parent5d0dbc4a9b2d325458dcbf9a8329bd1d2cc7bd7e (diff)
[TCP]: Change tcp_header_len member in tcp_sock to u16
With this we eliminate the last hole in struct tcp_sock. End result: [acme@newtoy net-2.6.20]$ codiff -sV /tmp/tcp.o.before net/ipv4/tcp.o /pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv4/tcp.c: struct tcp_sock | -4 tcp_header_len; from: int /* 1000(0) 4(0) */ to: u16 /* 1000(0) 2(0) */ 1 struct changed [acme@newtoy net-2.6.20]$ Now sizeof(tcp_sock) is just... [acme@newtoy net-2.6.20]$ pahole --sizes ../OUTPUT/qemu/net-2.6.20/net/ipv4/tcp.o | grep -w tcp_sock struct tcp_sock: 1500 0 1500 bytes ;-) Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tcp.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index dd61b172ac68..b42ff0efc2df 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -227,7 +227,8 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
227struct tcp_sock { 227struct tcp_sock {
228 /* inet_connection_sock has to be the first member of tcp_sock */ 228 /* inet_connection_sock has to be the first member of tcp_sock */
229 struct inet_connection_sock inet_conn; 229 struct inet_connection_sock inet_conn;
230 int tcp_header_len; /* Bytes of tcp header to send */ 230 u16 tcp_header_len; /* Bytes of tcp header to send */
231 u16 xmit_size_goal; /* Goal for segmenting output packets */
231 232
232/* 233/*
233 * Header prediction flags 234 * Header prediction flags
@@ -268,8 +269,6 @@ struct tcp_sock {
268 __u32 snd_wnd; /* The window we expect to receive */ 269 __u32 snd_wnd; /* The window we expect to receive */
269 __u32 max_window; /* Maximal window ever seen from peer */ 270 __u32 max_window; /* Maximal window ever seen from peer */
270 __u32 mss_cache; /* Cached effective mss, not including SACKS */ 271 __u32 mss_cache; /* Cached effective mss, not including SACKS */
271 __u16 xmit_size_goal; /* Goal for segmenting output packets */
272 /* XXX Two bytes hole, try to pack */
273 272
274 __u32 window_clamp; /* Maximal window to advertise */ 273 __u32 window_clamp; /* Maximal window to advertise */
275 __u32 rcv_ssthresh; /* Current window clamp */ 274 __u32 rcv_ssthresh; /* Current window clamp */