svn commit: r317208 - head/sys/netinet
Cy Schubert
Cy.Schubert at komquats.com
Fri Apr 21 03:12:41 UTC 2017
In message <201704210143.v3L1h99s037727 at slippy.cwsent.com>, Cy Schubert
writes:
> In message <201704201919.v3KJJYko052651 at 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 <Cy.Schubert at cschubert.com>
FreeBSD UNIX: <cy at FreeBSD.org> Web: http://www.FreeBSD.org
The need of the many outweighs the greed of the few.
More information about the svn-src-all
mailing list