From owner-svn-src-head@freebsd.org Thu Aug 23 17:05:46 2018 Return-Path: Delivered-To: svn-src-head@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 5869D1092BFF for ; Thu, 23 Aug 2018 17:05:46 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout11.t-online.de (mailout11.t-online.de [194.25.134.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDF037AFA3; Thu, 23 Aug 2018 17:05:45 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd03.aul.t-online.de (fwd03.aul.t-online.de [172.20.27.148]) by mailout11.t-online.de (Postfix) with SMTP id 506CA4277051; Thu, 23 Aug 2018 19:05:38 +0200 (CEST) Received: from Stefans-MBP-LAN.fritz.box (bKahTQZJ8h+6AFdIT9fjlEeVJloX6Yjb3wjU3J5nTE1y9d-ku6k7R-9kWd1e6TzwIT@[80.128.104.76]) by fwd03.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1fst37-1J1eUK0; Thu, 23 Aug 2018 19:05:33 +0200 Subject: Re: svn commit: r338253 - head/sbin/pfctl References: <201808231610.w7NGASxr000790@repo.freebsd.org> From: Stefan Esser Openpgp: preference=signencrypt Autocrypt: addr=se@freebsd.org; prefer-encrypt=mutual; keydata= xsBNBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkV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/9gzcRlpx71sDMosoZULWn7wysBJ/8AIEfIByRaHQe3 pn/KwE57pB+zFbbQqB7YzeZb7/UUgR4zU2ZbOcEfwDZcHUbj0B3fGRsS3t0uiLlAd8w0sBZb SxrqzjdpDjIbOZkxssqUmvrsN67UG1AFWH9aD24keBS7YjPBS8hLxPeYV+Xz6vUL8fRZje/Z JgiBMIwyj6g2lH/zkdnxBdC0iG1xxJOLTaghMMeQyCdH6ef8+VMyAlAJsMckbOTvx63tY8z7 DFcrnTJfbe1EziRilVsEaK8tTzJzhcTfos+f3eBYWEilxe5HzIhYKJeC7lmsSUcGwa6+9VRg a0ctmi9Z8OgX To: Patrick Kelsey Cc: "svn-src-head@freebsd.org" Message-ID: <24fcddc1-5570-943b-c3d4-b712e3ca64e3@freebsd.org> Date: Thu, 23 Aug 2018 19:05:32 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <201808231610.w7NGASxr000790@repo.freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Language: de-CH Content-Transfer-Encoding: 7bit X-ID: bKahTQZJ8h+6AFdIT9fjlEeVJloX6Yjb3wjU3J5nTE1y9d-ku6k7R-9kWd1e6TzwIT X-TOI-MSGID: f559d5dc-8e40-4ae8-a514-51f9d569f5d0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 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: Thu, 23 Aug 2018 17:05:46 -0000 Am 23.08.18 um 18:10 schrieb Patrick Kelsey: > 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; > } > This breaks the build on my amd64 box: /usr/svn/base/head/sbin/pfctl/pfctl_altq.c:302:32: error: overflow in expression; result is -1794967296 with type 'int' [-Werror,-Winteger-overflow] else if (rate <= 2500 * 1000 * 1000) ^ While "rate" is unsigned long, the expression being calculated is not ... Regards, STefan