[TCP]: Perform setting of common control fields in one place
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Fri, 4 Jan 2008 04:39:01 +0000 (20:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:00:34 +0000 (15:00 -0800)
commite870a8efcddaaa3da7e180b6ae21239fb96aa2bb
treed7e5930e78eb1c81ac10c59e0f74b89188e8abf7
parent19773b4923ed0e21e3289361dba5e69e1ce6e00b
[TCP]: Perform setting of common control fields in one place

In case of segments which are purely for control without any
data (SYN/ACK/FIN/RST), many fields are set to common values
in multiple places.

i386 results:

$ gcc --version
gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-13)

$ codiff tcp_output.o.old tcp_output.o.new
net/ipv4/tcp_output.c:
  tcp_xmit_probe_skb    |  -48
  tcp_send_ack          |  -56
  tcp_retransmit_skb    |  -79
  tcp_connect           |  -43
  tcp_send_active_reset |  -35
  tcp_make_synack       |  -42
  tcp_send_fin          |  -48
 7 functions changed, 351 bytes removed

net/ipv4/tcp_output.c:
  tcp_init_nondata_skb |  +90
 1 function changed, 90 bytes added

tcp_output.o.mid:
 8 functions changed, 90 bytes added, 351 bytes removed, diff: -261

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c