From owner-svn-src-head@freebsd.org Thu Aug 23 17:31:14 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 4BA7010932A4 for ; Thu, 23 Aug 2018 17:31:14 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) (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 C5C827BF6C; Thu, 23 Aug 2018 17:31:13 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by mail-pg1-f194.google.com with SMTP id k8-v6so2961404pgq.5; Thu, 23 Aug 2018 10:31:13 -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=nTzVpf2k/VVfCA8SAwoJsh8LXeIP1Vkqm+iIpulrGFw=; b=Ro9RDhYd6yoal70hgDbBvjJ/LPv7w3R8AxqlV5NpfTBpNDkm87Sv2GJQIL+Y7FF7Z0 oEKei6S+CWAB4VU0v4Q8oslQtjUxiSbNrNjNLwacW+QshWIjn/hX4/3en/zyYr/LoBm2 rP0ViG5Ie7HwMMYE118HxuVIq+189rg4/SyxbQMkjjVjppfkRzeMDKOAbGv4jxVIL1DB oXDUqnkBu1cVW34ffYKHZ0IA931wXTON2div+ItPjOhrslWUpv3xtmuM1VSnWHvB40qZ LLTZXbfu3UOMJLh9J/VdO4RXOidnE3do7MGJa79c5vPiFUamYxCGCWEWqkK/uMjS/S/j qQvA== X-Gm-Message-State: AOUpUlHKbMmfs1AyO/JD6BPa1RvaMICyh5RlYLuioYRgnekR1cQhO3hQ RkIZkQooqbXnxXFtgPyNc/BdqOz7gXKYuKq2kTz8cQ== X-Google-Smtp-Source: AA+uWPx6O3CFWtLT69j/ELbPB2XcT5ygWDy3RC8bYzfBg0RexLQLuGtlGv2HJZgq1G7qfFoRsvznRCH4oIxJCmzFzt8= X-Received: by 2002:a62:4704:: with SMTP id u4-v6mr64030457pfa.76.1535045466675; Thu, 23 Aug 2018 10:31:06 -0700 (PDT) MIME-Version: 1.0 References: <201808231610.w7NGASxr000790@repo.freebsd.org> <24fcddc1-5570-943b-c3d4-b712e3ca64e3@freebsd.org> In-Reply-To: <24fcddc1-5570-943b-c3d4-b712e3ca64e3@freebsd.org> From: Patrick Kelsey Date: Thu, 23 Aug 2018 13:30:51 -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:31:14 -0000 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