From owner-svn-src-all@freebsd.org Thu Aug 23 16:10:29 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 3E9F3109174E; Thu, 23 Aug 2018 16:10:29 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9D6877FF6; Thu, 23 Aug 2018 16:10:28 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CAD772438E; Thu, 23 Aug 2018 16:10:28 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7NGAS7f000791; Thu, 23 Aug 2018 16:10:28 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7NGASxr000790; Thu, 23 Aug 2018 16:10:28 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201808231610.w7NGASxr000790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Thu, 23 Aug 2018 16:10:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338253 - head/sbin/pfctl X-SVN-Group: head X-SVN-Commit-Author: pkelsey X-SVN-Commit-Paths: head/sbin/pfctl X-SVN-Commit-Revision: 338253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 16:10:29 -0000 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; }