]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
tcp: introduce struct tcp_sacktag_state to reduce arg pressure
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Sat, 6 Dec 2008 06:42:22 +0000 (22:42 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Dec 2008 06:42:22 +0000 (22:42 -0800)
commita1197f5a6faa23e5d0c1f8ed97b011deb2a75457
tree37c828e0fee0c8adea50b69fb2d8659668ac17c3
parent775ffabf77a648d78fe1d20cb3a620e771abb921
tcp: introduce struct tcp_sacktag_state to reduce arg pressure

There are just too many args to some sacktag functions. This
idea was first proposed by David S. Miller around a year ago,
and the current situation is much worse that what it was back
then.

tcp_sacktag_one can be made a bit simpler by returning the
new sacked (it can be achieved with a single variable though
the previous code "caching" sacked into a local variable and
therefore it is not exactly equal but the results will be the
same).

codiff on x86_64
  tcp_sacktag_one         |  -15
  tcp_shifted_skb         |  -50
  tcp_match_skb_to_sack   |   -1
  tcp_sacktag_walk        |  -64
  tcp_sacktag_write_queue |  -59
  tcp_urg                 |   +1
  tcp_event_data_recv     |   -1
 7 functions changed, 1 bytes added, 190 bytes removed, diff: -189

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