From owner-svn-src-all@freebsd.org Sat Aug 27 03:47:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3774EA948C0; Sat, 27 Aug 2016 03:47:16 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A8F3E55; Sat, 27 Aug 2016 03:47:15 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id 13B9B7E88D; Sat, 27 Aug 2016 13:47:11 +1000 (EST) From: Lawrence Stewart Subject: Re: svn commit: r304857 - head/sys/netinet/tcp_stacks To: Hiren Panchasara , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201608261923.u7QJNHIY058386@repo.freebsd.org> Message-ID: <9f1c8561-d3cc-5871-5b7a-cfe1b016f4d7@freebsd.org> Date: Sat, 27 Aug 2016 13:47:10 +1000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201608261923.u7QJNHIY058386@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.4 required=5.0 tests=DNS_FROM_AHBL_RHSBL, UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2016 03:47:16 -0000 Pointy hat to: lstewart@ Apologies all for the breakage, thanks Hiren for fixing and apologies also for missing your email. For some reason your reply to my commit did not make it to my inbox and was filtered straight to my mailing list folder which is annoying - I must have introduced a bug in my .procmailrc at some point. I don't understand why my buildkernel prior to commit succeeded though. Is fastpath not build by default? Cheers, Lawrence On 08/27/16 05:23, Hiren Panchasara wrote: > Author: hiren > Date: Fri Aug 26 19:23:17 2016 > New Revision: 304857 > URL: https://svnweb.freebsd.org/changeset/base/304857 > > Log: > Adjust TCP module fastpath after r304803's cc_ack_received() changes. > > Reported by: hiren, bz, np > Reviewed by: rrs > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D7664 > > Modified: > head/sys/netinet/tcp_stacks/fastpath.c > > Modified: head/sys/netinet/tcp_stacks/fastpath.c > ============================================================================== > --- head/sys/netinet/tcp_stacks/fastpath.c Fri Aug 26 19:08:58 2016 (r304856) > +++ head/sys/netinet/tcp_stacks/fastpath.c Fri Aug 26 19:23:17 2016 (r304857) > @@ -172,7 +172,10 @@ tcp_do_fastack(struct mbuf *m, struct tc > int ti_locked, u_long tiwin) > { > int acked; > + uint16_t nsegs; > int winup_only=0; > + > + nsegs = max(1, m->m_pkthdr.lro_nsegs); > #ifdef TCPDEBUG > /* > * The size of tcp_saveipgen must be the size of the max ip header, > @@ -278,7 +281,7 @@ tcp_do_fastack(struct mbuf *m, struct tc > * typically means increasing the congestion > * window. > */ > - cc_ack_received(tp, th, CC_ACK); > + cc_ack_received(tp, th, nsegs, CC_ACK); > > tp->snd_una = th->th_ack; > /* > @@ -502,9 +505,12 @@ tcp_do_slowpath(struct mbuf *m, struct t > { > int acked, ourfinisacked, needoutput = 0; > int rstreason, todrop, win; > + uint16_t nsegs; > char *s; > struct in_conninfo *inc; > struct mbuf *mfree = NULL; > + > + nsegs = max(1, m->m_pkthdr.lro_nsegs); > #ifdef TCPDEBUG > /* > * The size of tcp_saveipgen must be the size of the max ip header, > @@ -1085,7 +1091,8 @@ tcp_do_slowpath(struct mbuf *m, struct t > tp->t_dupacks = 0; > else if (++tp->t_dupacks > tcprexmtthresh || > IN_FASTRECOVERY(tp->t_flags)) { > - cc_ack_received(tp, th, CC_DUPACK); > + cc_ack_received(tp, th, nsegs, > + CC_DUPACK); > if ((tp->t_flags & TF_SACK_PERMIT) && > IN_FASTRECOVERY(tp->t_flags)) { > int awnd; > @@ -1135,7 +1142,8 @@ tcp_do_slowpath(struct mbuf *m, struct t > } > /* Congestion signal before ack. */ > cc_cong_signal(tp, th, CC_NDUPACK); > - cc_ack_received(tp, th, CC_DUPACK); > + cc_ack_received(tp, th, nsegs, > + CC_DUPACK); > tcp_timer_activate(tp, TT_REXMT, 0); > tp->t_rtttime = 0; > if (tp->t_flags & TF_SACK_PERMIT) { > @@ -1169,7 +1177,8 @@ tcp_do_slowpath(struct mbuf *m, struct t > * segment. Restore the original > * snd_cwnd after packet transmission. > */ > - cc_ack_received(tp, th, CC_DUPACK); > + cc_ack_received(tp, th, nsegs, > + CC_DUPACK); > u_long oldcwnd = tp->snd_cwnd; > tcp_seq oldsndmax = tp->snd_max; > u_int sent; > @@ -1323,7 +1332,7 @@ process_ACK: > * control related information. This typically means increasing > * the congestion window. > */ > - cc_ack_received(tp, th, CC_ACK); > + cc_ack_received(tp, th, nsegs, CC_ACK); > > SOCKBUF_LOCK(&so->so_snd); > if (acked > sbavail(&so->so_snd)) { > @@ -1758,6 +1767,7 @@ tcp_do_segment_fastslow(struct mbuf *m, > int thflags; > u_long tiwin; > char *s; > + uint16_t nsegs; > int can_enter; > struct in_conninfo *inc; > struct tcpopt to; > @@ -1765,6 +1775,7 @@ tcp_do_segment_fastslow(struct mbuf *m, > thflags = th->th_flags; > tp->sackhint.last_sack_ack = 0; > inc = &tp->t_inpcb->inp_inc; > + nsegs = max(1, m->m_pkthdr.lro_nsegs); > /* > * If this is either a state-changing packet or current state isn't > * established, we require a write lock on tcbinfo. Otherwise, we > @@ -1983,7 +1994,10 @@ tcp_fastack(struct mbuf *m, struct tcphd > int ti_locked, u_long tiwin) > { > int acked; > + uint16_t nsegs; > int winup_only=0; > + > + nsegs = max(1, m->m_pkthdr.lro_nsegs); > #ifdef TCPDEBUG > /* > * The size of tcp_saveipgen must be the size of the max ip header, > @@ -2128,7 +2142,7 @@ tcp_fastack(struct mbuf *m, struct tcphd > * typically means increasing the congestion > * window. > */ > - cc_ack_received(tp, th, CC_ACK); > + cc_ack_received(tp, th, nsegs, CC_ACK); > > tp->snd_una = th->th_ack; > tp->t_dupacks = 0; >