tcp: simplify tcp_current_mss
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Sat, 14 Mar 2009 14:23:05 +0000 (14:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Mar 2009 03:09:54 +0000 (20:09 -0700)
commit0c54b85f2828128274f319a1eb3ce7f604fe2a53
tree8ff84b9aa9cd4775f244c2421e11adfbd206a7bf
parent72211e90501f954f586481c25521c3724cda3cc7
tcp: simplify tcp_current_mss

There's very little need for most of the callsites to get
tp->xmit_goal_size updated. That will cost us divide as is,
so slice the function in two. Also, the only users of the
tp->xmit_goal_size are directly behind tcp_current_mss(),
so there's no need to store that variable into tcp_sock
at all! The drop of xmit_goal_size currently leaves 16-bit
hole and some reorganization would again be necessary to
change that (but I'm aiming to fill that hole with u16
xmit_goal_size_segs to cache the results of the remaining
divide to get that tso on regression).

Bring xmit_goal_size parts into tcp.c

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/tcp.h
include/net/tcp.h
net/ipv4/tcp.c
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c