Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2017 18:43:09 -0700
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Michael Tuexen <tuexen@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r317208 - head/sys/netinet
Message-ID:  <201704210143.v3L1h99s037727@slippy.cwsent.com>
In-Reply-To: Message from Michael Tuexen <tuexen@FreeBSD.org> of "Thu, 20 Apr 2017 19:19:34 -0000." <201704201919.v3KJJYko052651@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704210143.v3L1h99s037727>