From owner-p4-projects@FreeBSD.ORG Sun Jul 19 12:05:47 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 65E3A10656C9; Sun, 19 Jul 2009 12:05:43 +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 DF38010656C5 for ; Sun, 19 Jul 2009 12:05:42 +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 CA1298FC0C for ; Sun, 19 Jul 2009 12:05:42 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n6JC5gEH036709 for ; Sun, 19 Jul 2009 12:05:42 GMT (envelope-from andre@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6JC5gkG036707 for perforce@freebsd.org; Sun, 19 Jul 2009 12:05:42 GMT (envelope-from andre@freebsd.org) Date: Sun, 19 Jul 2009 12:05:42 GMT Message-Id: <200907191205.n6JC5gkG036707@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 Cc: Subject: PERFORCE change 166265 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2009 12:05:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=166265 Change 166265 by andre@andre_flirtbox on 2009/07/19 12:05:31 Compile. Affected files ... .. //depot/projects/tcp_new/netinet/tcp_input.c#15 edit .. //depot/projects/tcp_new/netinet/tcp_output.c#15 edit .. //depot/projects/tcp_new/netinet/tcp_sack.c#11 edit .. //depot/projects/tcp_new/netinet/tcp_var.h#15 edit Differences ... ==== //depot/projects/tcp_new/netinet/tcp_input.c#15 (text+ko) ==== @@ -1766,8 +1766,9 @@ * Update congestion control information. * NB: The algorithm must not increase cwnd when acked is zero. */ - if (tp->t_phase < TP_LOSSRECOV) - tcp_cc_ack(tp, th, tiwin, acked, tlen, sacked); + if (tp->t_phase < TP_LOSSRECOV) { + //tcp_cc_ack(tp, th, tiwin, acked, tlen, sacked); + } KASSERT(tp->snd_cwnd > tp->snd_mss, ("%s: cwnd < 1*mss after congestion control function", __func__)); @@ -2967,12 +2968,12 @@ if (SEQ_GEQ(tp->snd_una, tp->snd_recover)) { tp->snd_pipe = 0; tp->t_phase = TP_SENDING; - tcp_cc_post_fr(tp); + //tcp_cc_post_fr(tp); } /* Enter loss recovery phase. */ if (tp->snd_dupack == 3 && tp->t_phase < TP_LOSSRECOV) { - tcp_cc_pre_fr(tp); /* updates ssthresh */ + //tcp_cc_pre_fr(tp); /* updates ssthresh */ tp->t_phase = TP_LOSSRECOV; tp->snd_recover = tp->snd_nxt; tp->snd_rxmit = tp->snd_una; ==== //depot/projects/tcp_new/netinet/tcp_output.c#15 (text+ko) ==== @@ -810,17 +810,17 @@ * (C.1) modulo (C.3) */ if (tp->snd_rxmit == tp->snd_una) - rlen = tcp_sack_firsthole(tp, &rexmit); + rlen = tcp_sack_firsthole(tp, &rxmit); else - rlen = tcp_sack_nextseg(tp, &tp->snd_rexmit, slen); + rlen = tcp_sack_nextseg(tp, &tp->snd_rxmit, slen); /* * If we have nothing to retransmit, see if we can * send some new data. * (C.3) */ - if (rlen == 0) + if (rlen == 0) { if (slen > 0 && (rxmit >= tp->snd_mss || - (rxmit >= slen && dlen == slen)) + (rxmit >= slen && dlen == slen))) *len = min(slen, rxmit); else *len = 0; @@ -831,10 +831,10 @@ * (C.1) */ if (rxmit >= rlen || (rlen > rxmit && rxmit > tp->snd_mss)) - rlen = min(rlen, pipe); + rlen = min(rlen, tp->snd_pipe); else break; - } else if (tp->snd_rexmit == tp->snd_una) + } else if (tp->snd_rxmit == tp->snd_una) rlen = min(tp->snd_mss, SEQ_DELTA(tp->snd_una, tp->snd_nxt)); else break; ==== //depot/projects/tcp_new/netinet/tcp_sack.c#11 (text+ko) ==== @@ -89,10 +89,10 @@ static int tcp_sack_maxblocks = 32; SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, maxblocks, CTLFLAG_RW, - &tcp_sack_maxholes, 0, + &tcp_sack_maxblocks, 0, "Per connection limit on the number of SACK blocks"); -static int tcp_sack_globalmaxholes = 65536; +static int tcp_sack_globalmaxblocks = 65536; SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, globalmaxblocks, CTLFLAG_RW, &tcp_sack_globalmaxblocks, 0, "Global total limit on the number of SACK blocks"); @@ -105,7 +105,7 @@ tcp_sackblock_zone = uma_zcreate("tcpsackblk", sizeof(struct tcp_sack_block), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); /* XXXAO: limit is not adjusted when changed at runtime. */ - uma_zone_set_max(tcp_sackblock_zone, tcp_sack_globalmaxholes); + uma_zone_set_max(tcp_sackblock_zone, tcp_sack_globalmaxblocks); } /* @@ -223,9 +223,9 @@ * We try our best here to avoid false positives. * RFC2018: section 8 */ - if (to->to_nsacks == 1 && !RB_EMPTY(tp->snd_sackblocks) && + if (to->to_nsacks == 1 && !RB_EMPTY(&tp->snd_sackblocks) && to->to_len <= TCP_MAXOLEN - TCPOLEN_SACK && - SEQ_DELTA(sack.tsb_blk.start, sack.tsb_blk.end) <= tp->snd_mss) + SEQ_DELTA(sack.tsb_blk.start, sack.tsb_blk.end) <= tp->snd_mss) { tcp_sack_flush(tp); } @@ -323,8 +323,8 @@ struct tcp_sack_block *tsb, *tsbp; struct tcp_sack_block sack; - sack.tsb_blk.start = rexmit; - sack.tsb_blk.end = rexmit; + sack.tsb_blk.start = *rexmit; + sack.tsb_blk.end = *rexmit; /* * Find the sackblock that covers rexmit, or the first one above it. ==== //depot/projects/tcp_new/netinet/tcp_var.h#15 (text+ko) ==== @@ -313,6 +313,7 @@ #define TOF_SIGNATURE 0x0040 /* TCP-MD5 signature option (RFC2385) */ #define TOF_SACK 0x0080 /* Peer sent SACK option */ #define TOF_MAXOPT 0x0100 /* highest option shift one */ + u_int to_len; /* total length of all options */ tcp_ts to_tsval; /* new timestamp */ tcp_ts to_tsecr; /* reflected timestamp */ u_int16_t to_mss; /* maximum segment size */ @@ -646,7 +647,8 @@ int tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); void tcp_sack_flush(struct tcpcb *); void tcp_sack_init(void); -int tcp_sack_nextseg(struct tcpcb *, tcp_seq *); +int tcp_sack_firsthole(struct tcpcb *, tcp_seq *); +int tcp_sack_nextseg(struct tcpcb *, tcp_seq *, int); int tcp_sack_pipe(struct tcpcb *tp); int tcp_newreno(struct tcpcb *, struct tcphdr *);