From owner-freebsd-net@FreeBSD.ORG Sat Dec 13 08:15:55 2014 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 566237F6 for ; Sat, 13 Dec 2014 08:15:55 +0000 (UTC) Received: from mail-lb0-x22d.google.com (mail-lb0-x22d.google.com [IPv6:2a00:1450:4010:c04::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E25729B9 for ; Sat, 13 Dec 2014 08:15:54 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id z12so6956032lbi.32 for ; Sat, 13 Dec 2014 00:15:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=H44jN9X8hFs0WzitjfDGqkP01wVzihP0OvXzxQIpniA=; b=ngt/pJfjHDB+2kUR0+O9GYrakJr4jNEGWMtlXrzlU9Bf7tVMHvQtT84LopJgpepzkF 0G7wfe6KKx9NAliRFucT8p8PIVUGLB6TJe3dtcWnnzll1z7CWFXQ6K76h2W+ecY4v6ZD bu8hO5+qh0Wya/xA05ZmpU1AAm1Z4EKQNDDIUING4Cq4DFLXlT6YQDKybkiFptNCj9sB FfrxbPfQhWimNAW7Kfm8dDv+mxVSeFxV7sOiy+fc8fcbfMJSSZmiYJ6o+1BujnXpFtA3 TOhOS79CeUheCAYhKiwxjNfxn94UhcpV0/MiCbjMO02CqG+uXUdXkbp59TxiWvd8gqFB 4m8w== MIME-Version: 1.0 X-Received: by 10.112.173.202 with SMTP id bm10mr19025239lbc.74.1418458552949; Sat, 13 Dec 2014 00:15:52 -0800 (PST) Sender: rizzo.unipi@gmail.com Received: by 10.114.174.169 with HTTP; Sat, 13 Dec 2014 00:15:52 -0800 (PST) In-Reply-To: <201412130208.TAA10313@mail.lariat.net> References: <201412120711.AAA00622@mail.lariat.net> <201412121523.IAA03923@mail.lariat.net> <201412130208.TAA10313@mail.lariat.net> Date: Sat, 13 Dec 2014 19:15:52 +1100 X-Google-Sender-Auth: BDABveN4imCaFXgPIRifmY_jX9A Message-ID: Subject: Can DUMMYNET handle weighting of traffic according to firewall rules? From: Luigi Rizzo To: Brett Glass Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: John Nielsen , "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2014 08:15:55 -0000 On Saturday, December 13, 2014, Brett Glass > wrote: > At 10:35 AM 12/12/2014, John Nielsen wrote: > > Is there a reason you can't use a separate pipe for each direction? >> > > We want to limit the total amount of bandwidth consumed, based on the > formula 2U + D <= L. If we used two pipes, there would be no way to keep > track of the sum. > > What I need (and am not sure if DUMMYNET can currently supply) is a pipe > that allows you to feed it a packet and say, "Count this X times toward the > bandwidth limit." > No, as it is now dummynet cannot do what you ask. It would be a one-line change in the kernel, plus the part to handle passing the extra parameter (we could call it "cost") to the queue's configuration. As usual, the UI is 10+ times bigger than the code doing the actual work (though one could rightly blame the existing UI for not being designed for extensibility). Cheers Luigi -- -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2211611 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+-------------------------------