From owner-svn-src-all@freebsd.org Thu Aug 23 17:34:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3FA110934E3; Thu, 23 Aug 2018 17:34:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86F047C227; Thu, 23 Aug 2018 17:34:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 320711F326; Thu, 23 Aug 2018 17:34:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.0.2.164] (ptr-8rgnodv1z2lgdrqlgrr.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:240b:b802:6d03:c0af:419d:be27]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 2CB773D77A; Thu, 23 Aug 2018 19:34:46 +0200 (CEST) From: "Kristof Provost" To: "Patrick Kelsey" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338253 - head/sbin/pfctl Date: Thu, 23 Aug 2018 19:34:45 +0200 X-Mailer: MailMate (2.0BETAr6116) Message-ID: In-Reply-To: <201808231610.w7NGASxr000790@repo.freebsd.org> References: <201808231610.w7NGASxr000790@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 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: Thu, 23 Aug 2018 17:34:49 -0000 This seems to have broken a couple of platforms (aarch64, riscv64, sparc64, powerpc at least): /usr/src/sbin/pfctl/pfctl_altq.c:302:32: error: overflow in expression; result is -1794967296 with type 'int' [-Werror,-Winteger-overflow] --- all_subdir_lib --- --- puts.po --- --- all_subdir_sbin --- else if (rate <= 2500 * 1000 * 1000) ^ Regards, Kristof On 23 Aug 2018, at 18:10, Patrick Kelsey wrote: > Author: pkelsey > Date: Thu Aug 23 16:10:28 2018 > New Revision: 338253 > URL: https://svnweb.freebsd.org/changeset/base/338253 > > Log: > Extend tbrsize heuristic in pfctl(8) to provide a sensible value for > higher bandwidth interfaces. The new value is used above 2.5 Gbps, > which is the highest standard rate that could be used prior to > r338209, so the default behavior for all existing systems should > remain the same. > > The value of 128 chosen is a balance between being big enough to > reduce potential precision/quantization effects stemming from > frequent > bucket refills over small time intervals and being small enough to > prevent a greedy driver from burst dequeuing more packets than it > has > available hardware ring slots for whenever altq transitions from > idle > to backlogged. > > Reviewed by: jmallett, kp > MFC after: 2 weeks > Sponsored by: RG Nets > Differential Revision: https://reviews.freebsd.org/D16852 > > Modified: > head/sbin/pfctl/pfctl_altq.c > > Modified: head/sbin/pfctl/pfctl_altq.c > ============================================================================== > --- head/sbin/pfctl/pfctl_altq.c Thu Aug 23 15:01:27 2018 (r338252) > +++ head/sbin/pfctl/pfctl_altq.c Thu Aug 23 16:10:28 2018 (r338253) > @@ -299,8 +299,10 @@ eval_pfaltq(struct pfctl *pf, struct pf_altq *pa, > stru > size = 4; > else if (rate <= 200 * 1000 * 1000) > size = 8; > - else > + else if (rate <= 2500 * 1000 * 1000) > size = 24; > + else > + size = 128; > size = size * getifmtu(pa->ifname); > pa->tbrsize = size; > }