From owner-svn-src-all@freebsd.org Fri Apr 21 01:43:21 2017 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 B15F9D47375; Fri, 21 Apr 2017 01:43:21 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 5EF692E2; Fri, 21 Apr 2017 01:43:20 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id 1NbLdilfVBVcj1NbMd7G4g; Thu, 20 Apr 2017 19:43:13 -0600 X-Authority-Analysis: v=2.2 cv=RoC1FGuK c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=AzvcPWV-tVgA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=itYTvNewW3kXQSC1HmMA:9 a=CjuIK1q_8ugA:10 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 C3ECE1081; Thu, 20 Apr 2017 18:43:10 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v3L1h99s037727; Thu, 20 Apr 2017 18:43:09 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201704210143.v3L1h99s037727@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: Michael Tuexen cc: 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 Michael Tuexen of "Thu, 20 Apr 2017 19:19:34 -0000." <201704201919.v3KJJYko052651@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 20 Apr 2017 18:43:09 -0700 X-CMAE-Envelope: MS4wfK0SGfBkCSKZwTbNI4oj8uL6BQ78Ywaae7YMY168DrJjRyQpEUUItuiIofQRbySS24qPtLFoAbUD9XoNUO1xbU/0h3vvC0sMtQronvHzLrTthaYrjZ5w FVByustbOPxvpDkauYAonL5lRnRA4QBGw5oU/1mkT8XHckE6GDbta9TP41LtlLZSAh+dtWrd7AXIstCHZQTsWnAJ+YWGII6qA9qsmgsbwjR8/TY6OcWLL/sZ 4698hCxj1w0jyxuKV9sak20DAS3BqG0clavr1RpKDADFAjeWRUBVns5IzchxbhzE X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 21 Apr 2017 01:43:21 -0000 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. > [...] -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.