tmp_suning_uos_patched/net/ipv4
Neal Cardwell 5b35e1e6e9 tcp: fix tcp_trim_head() to adjust segment count with skb MSS
This commit fixes tcp_trim_head() to recalculate the number of
segments in the skb with the skb's existing MSS, so trimming the head
causes the skb segment count to be monotonically non-increasing - it
should stay the same or go down, but not increase.

Previously tcp_trim_head() used the current MSS of the connection. But
if there was a decrease in MSS between original transmission and ACK
(e.g. due to PMTUD), this could cause tcp_trim_head() to
counter-intuitively increase the segment count when trimming bytes off
the head of an skb. This violated assumptions in tcp_tso_acked() that
tcp_trim_head() only decreases the packet count, so that packets_acked
in tcp_tso_acked() could underflow, leading tcp_clean_rtx_queue() to
pass u32 pkts_acked values as large as 0xffffffff to
ca_ops->pkts_acked().

As an aside, if tcp_trim_head() had really wanted the skb to reflect
the current MSS, it should have called tcp_set_skb_tso_segs()
unconditionally, since a decrease in MSS would mean that a
single-packet skb should now be sliced into multiple segments.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Nandita Dukkipati <nanditad@google.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-30 12:42:58 -05:00
..
netfilter
af_inet.c
ah4.c
arp.c
cipso_ipv4.c
datagram.c
devinet.c
esp4.c
fib_frontend.c
fib_lookup.h
fib_rules.c
fib_semantics.c
fib_trie.c
gre.c
icmp.c
igmp.c
inet_connection_sock.c tcp: bind() optimize port allocation 2012-01-25 21:50:43 -05:00
inet_diag.c
inet_fragment.c
inet_hashtables.c
inet_lro.c
inet_timewait_sock.c
inetpeer.c
ip_forward.c
ip_fragment.c
ip_gre.c ipv6: Fix ip_gre lockless xmits. 2012-01-26 16:34:08 -05:00
ip_input.c
ip_options.c
ip_output.c
ip_sockglue.c
ipcomp.c
ipconfig.c
ipip.c
ipmr.c
Kconfig
Makefile
netfilter.c
ping.c
proc.c tcp: detect loss above high_seq in recovery 2012-01-22 15:08:44 -05:00
protocol.c
raw.c
route.c
syncookies.c
sysctl_net_ipv4.c net/tcp: Fix tcp memory limits initialization when !CONFIG_SYSCTL 2012-01-30 12:41:06 -05:00
tcp_bic.c
tcp_cong.c
tcp_cubic.c tcp: fix undo after RTO for CUBIC 2012-01-20 14:17:26 -05:00
tcp_diag.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: detect loss above high_seq in recovery 2012-01-22 15:08:44 -05:00
tcp_ipv4.c tcp: md5: using remote adress for md5 lookup in rst packet 2012-01-22 15:08:45 -05:00
tcp_lp.c
tcp_memcontrol.c
tcp_minisocks.c
tcp_output.c tcp: fix tcp_trim_head() to adjust segment count with skb MSS 2012-01-30 12:42:58 -05:00
tcp_probe.c
tcp_scalable.c
tcp_timer.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tcp.c net/tcp: Fix tcp memory limits initialization when !CONFIG_SYSCTL 2012-01-30 12:41:06 -05:00
tunnel4.c
udp_diag.c
udp_impl.h
udp.c
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_state.c
xfrm4_tunnel.c