[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>
This commit is contained in:
parent
5d0dbc4a9b
commit
2ff52f282c
1 changed files with 2 additions and 3 deletions
|
@ -227,7 +227,8 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
|
||||||
struct tcp_sock {
|
struct tcp_sock {
|
||||||
/* inet_connection_sock has to be the first member of tcp_sock */
|
/* inet_connection_sock has to be the first member of tcp_sock */
|
||||||
struct inet_connection_sock inet_conn;
|
struct inet_connection_sock inet_conn;
|
||||||
int tcp_header_len; /* Bytes of tcp header to send */
|
u16 tcp_header_len; /* Bytes of tcp header to send */
|
||||||
|
u16 xmit_size_goal; /* Goal for segmenting output packets */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Header prediction flags
|
* Header prediction flags
|
||||||
|
@ -268,8 +269,6 @@ struct tcp_sock {
|
||||||
__u32 snd_wnd; /* The window we expect to receive */
|
__u32 snd_wnd; /* The window we expect to receive */
|
||||||
__u32 max_window; /* Maximal window ever seen from peer */
|
__u32 max_window; /* Maximal window ever seen from peer */
|
||||||
__u32 mss_cache; /* Cached effective mss, not including SACKS */
|
__u32 mss_cache; /* Cached effective mss, not including SACKS */
|
||||||
__u16 xmit_size_goal; /* Goal for segmenting output packets */
|
|
||||||
/* XXX Two bytes hole, try to pack */
|
|
||||||
|
|
||||||
__u32 window_clamp; /* Maximal window to advertise */
|
__u32 window_clamp; /* Maximal window to advertise */
|
||||||
__u32 rcv_ssthresh; /* Current window clamp */
|
__u32 rcv_ssthresh; /* Current window clamp */
|
||||||
|
|
Loading…
Reference in a new issue