From owner-freebsd-pf@FreeBSD.ORG Wed Jul 6 15:51:02 2011 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5550C106564A for ; Wed, 6 Jul 2011 15:51:02 +0000 (UTC) (envelope-from calomelopensourceresearch@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0F4518FC08 for ; Wed, 6 Jul 2011 15:51:01 +0000 (UTC) Received: by vws18 with SMTP id 18so77233vws.13 for ; Wed, 06 Jul 2011 08:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:reply-to:mime-version :content-type:content-disposition:errors-to:x-gpg-key-fingerprint; bh=MfF18F76L15yS9mfUXb8C6NBq6J17njIYhSt93U9xOI=; b=bGqX5XSEe0CsspVDKk+aQtTtu9sIOpHR/QNwqBeu/i4huvCxafFN0XGVp5V30LqTop rPuDvnbogXtXvXbRFMr9Le13/+gIURp9I2+eMaeuTyLecX4Js+HVkDp20b64enBLetOE cfGLOI+uCtFBY5Lqom0zFhDxV+8pCYtmIJphU= Received: by 10.52.176.101 with SMTP id ch5mr8437741vdc.129.1309965911362; Wed, 06 Jul 2011 08:25:11 -0700 (PDT) Received: from calomel.org (pool-71-166-62-51.bltmmd.fios.verizon.net [71.166.62.51]) by mx.google.com with ESMTPS id dp2sm4970769vbb.1.2011.07.06.08.25.09 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 06 Jul 2011 08:25:10 -0700 (PDT) Sender: Calomel Org Received: by calomel.org (resilience smtpd, from userid 1000) id 69A60196DB; Wed, 6 Jul 2011 11:25:06 -0400 (EDT) Date: Wed, 6 Jul 2011 11:25:06 -0400 From: Calomel Org To: freebsd-pf@freebsd.org, misc@openbsd.org Message-ID: <20110706152506.GA26334@calomel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Errors-To: infallibilismindefeasibility@calomel.org X-GPG-Key-FingerPrint: 328F 9F03 C73F 7F31 B06B FA5B C1FC A1C7 3D2E ED32 Cc: Subject: pf ALTQ bandwidth limited to a 32bit value (4294Mb) X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Calomel Org List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2011 15:51:02 -0000 ALTQ using hfsc is limited to a maximum parent bandwidth of 4294Mb. This value is 2^32 or 4,294,967,296 bits. If you set the bandwidth any higher, altq will flip back to zero. This "bug" was found when trying to test 10 gigabit and 40 gigabit bandwidth models. These tests were done on OpenBSD 32bit and 64bit as well as FreeBSD 32bit and 64bit. If anyone else can verify this independently and agree with the results I would be happy to register it as a bug. How to replicate: A quick test is setting the bandwidth to 4294Mb and doing a pfctl -sq to check altq. altq on $ExtIf bandwidth 4294Mb hfsc queue { ack, web} queue root_em0 on em0 bandwidth 4.29Gb priority 0 {ack, web} Now set the bandwidth to 4295Mb and notice altq has flip to zero and add the 32.70Kb difference. altq on $ExtIf bandwidth 4295Mb hfsc queue { ack, web } queue root_em0 on em0 bandwidth 32.70Kb priority 0 {ack, web} Again, we can set the bandwidth to a multiple of two(2) to 8589Mb. The bandwidth value flips to zero once and the result is 4.29Gb. altq on $ExtIf bandwidth 8589Mb hfsc queue { ack, web} queue root_em0 on em0 bandwidth 4.29Gb priority 0 {ack, web} If we add one more megabit to 8590Mb the value flips twice and we are left with 65.41Kb. altq on $ExtIf bandwidth 8590Mb hfsc queue { ack, web} queue root_em0 on em0 bandwidth 65.41Kb priority 0 {ack, web} Thanks. -- Calomel @ https://calomel.org Open Source Research and Reference