kernel-hacking-2024-linux-s.../net/ipv4
Ilpo Järvinen e56d6cd605 [TCP]: Process DSACKs that reside within a SACK block
DSACK inside another SACK block were missed if start_seq of DSACK
was larger than SACK block's because sorting prioritizes full
processing of the SACK block before DSACK. After SACK block
sorting situation is like this:

             SSSSSSSSS
                  D
                        SSSSSS
                               SSSSSSS

Because write_queue is walked in-order, when the first SACK block
has been processed, TCP is already past the skb for which the
DSACK arrived and we haven't taught it to backtrack (nor should
we), so TCP just continues processing by going to the next SACK
block after the DSACK (if any).

Whenever such DSACK is present, do an embedded checking during
the previous SACK block.

If the DSACK is below snd_una, there won't be overlapping SACK
block, and thus no problem in that case. Also if start_seq of
the DSACK is equal to the actual block, it will be processed
first.

Tested this by using netem to duplicate 15% of packets, and
by printing SACK block when found_dup_sack is true and the 
selected skb in the dup_sack = 1 branch (if taken):

  SACK block 0: 4344-5792 (relative to snd_una 2019137317)
  SACK block 1: 4344-5792 (relative to snd_una 2019137317) 

equal start seqnos => next_dup = 0, dup_sack = 1 won't occur...

  SACK block 0: 5792-7240 (relative to snd_una 2019214061)
  SACK block 1: 2896-7240 (relative to snd_una 2019214061)
  DSACK skb match 5792-7240 (relative to snd_una)

...and next_dup = 1 case (after the not shown start_seq sort),
went to dup_sack = 1 branch.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:09:37 -07:00
..
ipvs [IPVS]: Remove /proc/net/ip_vs_lblcr 2007-10-30 21:16:27 -07:00
netfilter Kbuild/doc: fix links to Documentation files 2007-10-30 14:26:30 -07:00
af_inet.c [IPV4]: Add ICMPMsgStats MIB (RFC 4293) 2007-10-10 16:51:28 -07:00
ah4.c [IPSEC]: Move IP protocol setting from transforms into xfrm4_input.c 2007-10-10 16:55:56 -07:00
arp.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
cipso_ipv4.c [NetLabel]: correct usage of RCU locking 2007-10-26 04:29:08 -07:00
datagram.c
devinet.c [IPV4]: When possible test for IFF_LOOPBACK and not dev == loopback_dev 2007-10-10 16:52:48 -07:00
esp4.c [NET]: Fix incorrect sg_mark_end() calls. 2007-10-30 21:29:29 -07:00
fib_frontend.c [IPV4]: Explicitly call fib_get_table() in fib_frontend.c 2007-10-23 21:27:58 -07:00
fib_hash.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
fib_lookup.h
fib_rules.c [IPV4/IPV6/DECNET]: Small cleanup for fib rules. 2007-10-10 16:51:22 -07:00
fib_semantics.c [NETLINK]: Introduce nested and byteorder flag to netlink attribute 2007-10-10 16:49:16 -07:00
fib_trie.c remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
icmp.c [INET]: Unexport icmpmsg_statistics 2007-10-26 04:06:08 -07:00
igmp.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
inet_connection_sock.c [INET]: Justification for local port range robustness. 2007-10-18 22:00:17 -07:00
inet_diag.c [INET]: Let inet_diag and friends autoload 2007-10-22 02:59:54 -07:00
inet_fragment.c [INET]: Consolidate frag queues freeing 2007-10-17 19:48:26 -07:00
inet_hashtables.c [INET]: Justification for local port range robustness. 2007-10-18 22:00:17 -07:00
inet_lro.c fix endianness bug in inet_lro 2007-10-14 12:41:52 -07:00
inet_timewait_sock.c [NET]: DIV_ROUND_UP cleanup (part two) 2007-10-10 16:48:37 -07:00
inetpeer.c
ip_forward.c [IPV4]: Uninline netfilter okfns 2007-10-15 12:26:35 -07:00
ip_fragment.c [NET]: Fix uninitialised variable in ip_frag_reasm() 2007-10-17 21:37:22 -07:00
ip_gre.c [NET]: Treat the sign of the result of skb_headroom() consistently 2007-10-23 21:27:55 -07:00
ip_input.c [IPV4]: Uninline netfilter okfns 2007-10-15 12:26:35 -07:00
ip_options.c
ip_output.c [NET]: Treat the sign of the result of skb_headroom() consistently 2007-10-23 21:27:55 -07:00
ip_sockglue.c [NET]: sparse warning fixes 2007-10-10 16:54:48 -07:00
ipcomp.c [IPSEC]: Move IP protocol setting from transforms into xfrm4_input.c 2007-10-10 16:55:56 -07:00
ipconfig.c [NET]: Wrap netdevice hardware header creation. 2007-10-10 16:52:50 -07:00
ipip.c [NET]: Treat the sign of the result of skb_headroom() consistently 2007-10-23 21:27:55 -07:00
ipmr.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
Kconfig typo fixes 2007-10-20 01:34:40 +02:00
Makefile [INET]: Collect frag queues management objects together 2007-10-15 12:26:39 -07:00
netfilter.c [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
proc.c [IPv4] SNMP: Refer correct memory location to display ICMP out-going statistics 2007-10-29 22:37:36 -07:00
protocol.c
raw.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
route.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
syncookies.c
sysctl_net_ipv4.c [INET]: Justification for local port range robustness. 2007-10-18 22:00:17 -07:00
tcp.c [TCP]: Saner thash_entries default with much memory. 2007-10-30 00:59:25 -07:00
tcp_bic.c [TCP]: Remove num_acked>0 checks from cong.ctrl mods pkts_acked 2007-10-10 16:47:55 -07:00
tcp_cong.c
tcp_cubic.c [TCP]: Remove num_acked>0 checks from cong.ctrl mods pkts_acked 2007-10-10 16:47:55 -07:00
tcp_diag.c [INET]: Let inet_diag and friends autoload 2007-10-22 02:59:54 -07:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c [TCP]: Process DSACKs that reside within a SACK block 2007-11-01 00:09:37 -07:00
tcp_ipv4.c [NET]: Fix incorrect sg_mark_end() calls. 2007-10-30 21:29:29 -07:00
tcp_lp.c
tcp_minisocks.c [TCP]: Move sack_ok access to obviously named funcs & cleanup 2007-10-10 16:48:00 -07:00
tcp_output.c [TCP]: Limit processing lost_retrans loop to work-to-do cases 2007-10-11 17:36:13 -07:00
tcp_probe.c [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
tcp_scalable.c
tcp_timer.c [TCP]: Move sack_ok access to obviously named funcs & cleanup 2007-10-10 16:48:00 -07:00
tcp_vegas.c [TCP] vegas: Fix a bug in disabling slow start by gamma parameter. 2007-10-29 22:37:25 -07:00
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c
udp.c [UDP]: Make use of inet_iif() when doing socket lookups. 2007-10-25 18:54:46 -07:00
udp_impl.h [UDP]: Randomize port selection. 2007-10-10 16:48:31 -07:00
udplite.c [UDP]: Randomize port selection. 2007-10-10 16:48:31 -07:00
xfrm4_input.c [IPSEC]: Rename mode to outer_mode and add inner_mode 2007-10-17 21:35:51 -07:00
xfrm4_mode_beet.c [IPSEC]: Add missing BEET checks 2007-10-17 21:31:50 -07:00
xfrm4_mode_transport.c [IPSEC]: Use IPv6 calling convention as the convention for x->mode->output 2007-10-10 16:55:54 -07:00
xfrm4_mode_tunnel.c [IPSEC]: Add missing BEET checks 2007-10-17 21:31:50 -07:00
xfrm4_output.c [IPSEC]: Rename mode to outer_mode and add inner_mode 2007-10-17 21:35:51 -07:00
xfrm4_policy.c [IPSEC]: Rename mode to outer_mode and add inner_mode 2007-10-17 21:35:51 -07:00
xfrm4_state.c [IPSEC]: Store afinfo pointer in xfrm_mode 2007-10-17 21:33:12 -07:00
xfrm4_tunnel.c [IPSEC]: Move tunnel parsing for IPv4 out of xfrm4_input 2007-10-17 21:28:53 -07:00