Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jul 2010 07:23:19 GMT
From:      Andre Oppermann <andre@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 180367 for review
Message-ID:  <201007010723.o617NJtu063386@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@180367?ac=10

Change 180367 by andre@andre_t61 on 2010/07/01 07:22:20

	Add more comments.

Affected files ...

.. //depot/projects/tcp_new/netinet/tcp_sack.c#14 edit

Differences ...

==== //depot/projects/tcp_new/netinet/tcp_sack.c#14 (text+ko) ====

@@ -67,14 +67,34 @@
 #endif /* TCPDEBUG */
 
 /*
- * Implementation of Selective Acknowledgements (SACK) as described in
- * RFC2018.
+ * Implementation of the data sender part of Selective Acknowledgements
+ * (SACK) as described in RFC2018 including detection of duplicate SACK
+ * (D-SACK) as described in RFC2883.
  *
- * This file implements the data sender part of SACK.  It stores all
- * received SACK blocks in a scoreboard built on a ranged red-black tree.
- * 
  * The data receiver part (RFC2018: section 4) is part of the reassembly
  * queue.
+ *
+ * With SACK a receiver can signal the sender about the segments received
+ * beyond a lost one waiting in the reassembly queue.  Based on this
+ * information the sender can make an informed decision about which parts
+ * of the send buffer to retransmit.  Network resources are saved because
+ * only the missing parts are retransmitted.
+ *
+ * Implementation details and choices:
+ *
+ * The data sender part of SACK stores all received SACK blocks in a
+ * scoreboard.  With large windows and large delay*bandwidth products and
+ * losses in the network the scoreboard can get quite large.  To prevent
+ * long linked list chain traversals and complexity attacks a ranged
+ * red-black tree has been chosen.  The overhead for small scoreboards
+ * is about the same as in a linked list but for larger ones it goes down
+ * to n log(n).  All overlapping or contigous SACK blocks are automatically
+ * merged into one block at insert time.  The red-black tree is layed out
+ * in a way to preserve the ordering of the SACK blocks upon lookup operations.
+ *
+ * To prevent resource exhaustion attacks a local and a global limit governs
+ * the SACK scoreboard.  The local limits prevents single connections from
+ * (possibly maliciously) monopolizing the global limit.
  */
 
 SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007010723.o617NJtu063386>