From owner-svn-src-head@freebsd.org Thu Aug 23 17:42:22 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 4AC1C109375F for ; Thu, 23 Aug 2018 17:42:22 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B78897C84A; Thu, 23 Aug 2018 17:42:21 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by mail-pf1-f180.google.com with SMTP id k19-v6so3161046pfi.1; Thu, 23 Aug 2018 10:42:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TZqzEuY/uWWM1it0CjWbl8g8GXSdc7LgnUHEJ/4gO8k=; b=hA348GzUwI9Re8cjRgBz9LTcXtkhtCHVQpK1NBxLnlgqbZIYSbxdhxUsOF0mgmDPtq i0VWPj+gDi9lVm6+fedTfDl938YqSsep8sBL1d+G4mFW8xOyTKJDT/9rP2YAC2l6gBrr NtrJT38WY7BJrh+h+olY1wHr5Y2ClqyLZ/5YXIqmL1bY3st5xLAq3x09NDldRHTsoa7t qLLVDHoz/drB9GWHnmdczJ/QFxetB1dWzHODST9eMc8J319Arwt/71OJk1HoNEPTgrPP 42yAJsDWr2Obi2tF9KOnqSI8H+DnySobCq5okVTMmkhEesQgB9uWH5NHf3c8VdAq6CRG FCRw== X-Gm-Message-State: AOUpUlENe40YHtpSiGiGdMcNG/d6dnHOCiBu+ugBkkXlNfq3fghXHqPW fLNX+k/E4p8dd0NM0Yjuvk0EocJttXKx4j9ZF7Md4g== X-Google-Smtp-Source: AA+uWPwpGbipevmqsB7nmVvqvPmwrvoD5AcDcVkxBE/YQWU5RBcjUxUbqSE90RI/cyzJZ1Q3+BXdI2jMK2KZF9hWL7g= X-Received: by 2002:a17:902:8d8c:: with SMTP id v12-v6mr22685122plo.94.1535046134792; Thu, 23 Aug 2018 10:42:14 -0700 (PDT) MIME-Version: 1.0 References: <201808231610.w7NGASxr000790@repo.freebsd.org> <24fcddc1-5570-943b-c3d4-b712e3ca64e3@freebsd.org> In-Reply-To: From: Patrick Kelsey Date: Thu, 23 Aug 2018 13:42:00 -0400 Message-ID: Subject: Re: svn commit: r338253 - head/sbin/pfctl To: se@freebsd.org Cc: svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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:42:22 -0000 Fixed in r338260. On Thu, Aug 23, 2018 at 1:30 PM Patrick Kelsey wrote: > > > On Thu, Aug 23, 2018 at 1:05 PM Stefan Esser wrote: > >> 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 >> > > Will fix shortly...not sure why I did not encounter this error in my setup. > > -Patrick >