From owner-p4-projects@FreeBSD.ORG Thu Jul 1 07:23:20 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3022F1065672; Thu, 1 Jul 2010 07:23:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E835B106564A for ; Thu, 1 Jul 2010 07:23:19 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BDC608FC12 for ; Thu, 1 Jul 2010 07:23:19 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o617NJgc063388 for ; Thu, 1 Jul 2010 07:23:19 GMT (envelope-from andre@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o617NJtu063386 for perforce@freebsd.org; Thu, 1 Jul 2010 07:23:19 GMT (envelope-from andre@freebsd.org) Date: Thu, 1 Jul 2010 07:23:19 GMT Message-Id: <201007010723.o617NJtu063386@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andre@freebsd.org using -f From: Andre Oppermann To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 180367 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 07:23:20 -0000 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");