From owner-svn-src-head@freebsd.org Fri Apr 21 03:12:41 2017 Return-Path: Delivered-To: svn-src-head@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 A8329D4901F; Fri, 21 Apr 2017 03:12:41 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D0E21D16; Fri, 21 Apr 2017 03:12:41 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id 1Ozndde7lol5Z1OzodEyxq; Thu, 20 Apr 2017 21:12:33 -0600 X-Authority-Analysis: v=2.2 cv=B8rJ6KlM c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=AzvcPWV-tVgA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=v2JZ80VQ7frUTbXu9uYA:9 a=CjuIK1q_8ugA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 949061131; Thu, 20 Apr 2017 20:12:31 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v3L3CTKK086513; Thu, 20 Apr 2017 20:12:29 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201704210312.v3L3CTKK086513@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: Michael Tuexen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317208 - head/sys/netinet In-Reply-To: Message from Cy Schubert of "Thu, 20 Apr 2017 18:43:09 -0700." <201704210143.v3L1h99s037727@slippy.cwsent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 20 Apr 2017 20:12:29 -0700 X-CMAE-Envelope: MS4wfIWaH47o5IWxTyDRD3uChj6EeFi9h0QcO6dEKep/zzytTdexXqldNN1td3J7r/RBpeZgjGMUL/1RrWy9l+xYxlZYrAFkFvNhTH06F4WH1PCoAR85TSlR 48sg4708RbZhW4jPh+mFdbNaR4igm97MMD0l1JN54FiGQPdQSeAEiMwpNYIrxsrKoFB7WeJWaYnc15LgWdKkEuHkwkv82NS0I2PT+Gg2GiUI9nVr1lbHW+R9 Swmwl9A3UUR9oKmYSPb8wHUwu9t1H3C1SvJDxElkwt1Fxk0nNKCFsPtruxJq/6nE X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2017 03:12:41 -0000 In message <201704210143.v3L1h99s037727@slippy.cwsent.com>, Cy Schubert writes: > In message <201704201919.v3KJJYko052651@repo.freebsd.org>, Michael Tuexen > write > s: > > Author: tuexen > > Date: Thu Apr 20 19:19:33 2017 > > New Revision: 317208 > > URL: https://svnweb.freebsd.org/changeset/base/317208 > > > > Log: > > Syncoockies can be used in combination with the syncache. If the cache > > overflows, syncookies are used. > > This patch restricts the usage of syncookies in this case: accept > > syncookies only if there was an overflow of the syncache recently. > > This mitigates a problem reported in PR217637, where is syncookie was > > accepted without any recent drops. > > Thanks to glebius@ for suggesting an improvement. > > > > PR: 217637 > > Reviewed by: gnn, glebius > > MFC after: 1 week > > Sponsored by: Netflix, Inc. > > Differential Revision: https://reviews.freebsd.org/D10272 > > > > Modified: > > head/sys/netinet/tcp_syncache.c > > head/sys/netinet/tcp_syncache.h > > > > Modified: head/sys/netinet/tcp_syncache.c > > =========================================================================== > == > > = > > --- head/sys/netinet/tcp_syncache.c Thu Apr 20 19:14:52 2017 (r31720 > > 7) > > +++ head/sys/netinet/tcp_syncache.c Thu Apr 20 19:19:33 2017 (r31720 > > 8) > > @@ -260,6 +260,7 @@ syncache_init(void) > > &V_tcp_syncache.hashbase[i].sch_mtx, 0); > > V_tcp_syncache.hashbase[i].sch_length = 0; > > V_tcp_syncache.hashbase[i].sch_sc = &V_tcp_syncache; > > + V_tcp_syncache.hashbase[i].sch_last_overflow = INT64_MIN; > > > Hi Michael, > > This line produced the following on i386: > > /opt/src/svn-current/sys/netinet/tcp_syncache.c:263:50: error: implicit > conversion from 'long long' to 'time_t' (aka 'int') changes value from > -9223372036854775808 to 0 [-Werror,-Wconstant-conversion] > V_tcp_syncache.hashbase[i].sch_last_overflow = INT64_MIN; > ~ ^~~~~~~~~ > ./x86/_stdint.h:91:41: note: expanded from macro 'INT64_MIN' > #define INT64_MIN (-0x7fffffffffffffffLL-1) > ~~~~~~~~~~~~~~~~~~~~~^~ > > Looks like it needs a time_t cast. Playing with it for a short while, a cast doesn't produce the desired results. My solution is ugly so far. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.