From owner-freebsd-net@FreeBSD.ORG Sun Dec 14 16:36:29 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 5D188AAE for ; Sun, 14 Dec 2014 16:36:29 +0000 (UTC) Received: from mail.lariat.net (mail.lariat.net [66.62.230.51]) by mx1.freebsd.org (Postfix) with ESMTP id 04ED4111 for ; Sun, 14 Dec 2014 16:36:28 +0000 (UTC) Received: from Toshi.lariat.net (IDENT:ppp1000.lariat.net@localhost [127.0.0.1]) by mail.lariat.net (8.9.3/8.9.3) with ESMTP id JAA27068; Sun, 14 Dec 2014 09:35:11 -0700 (MST) Message-Id: <201412141635.JAA27068@mail.lariat.net> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Sun, 14 Dec 2014 09:25:00 -0700 To: eksffa@freebsdbrasil.com.br, "Luigi Rizzo" From: Brett Glass Subject: Re: Can DUMMYNET handle weighting of traffic according to firewall rules? In-Reply-To: <028d142b3a17cd5ffd5f21c6f9b9d6daaa8e2780@webmail.freebsdbr asil.com.br> References: <028d142b3a17cd5ffd5f21c6f9b9d6daaa8e2780@webmail.freebsdbrasil.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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: Sun, 14 Dec 2014 16:36:29 -0000 At 11:02 AM 12/13/2014, eksffa@freebsdbrasil.com.br wrote: >As I understand the problem, there are many ways to do this >without actually using any special feature on dummynet. From >tagging a traffic twice and feeding both tagged flows to the same >pipe, to the easiest and possibily lighter approach of disabling >one pass and feeding the traffic twice to the same pipe. Unfortunately, feeding the traffic to the same pipe more than once would have some undesirable side effects. It would mean incurring X times the delay and computational overhead introduced by the pipe. This would affect not only latency but also jitter, because DUMMYNET pipes are driven by timer interrupts. Even if you set the kernel's HZ setting to a high number, you could have milliseconds of difference in the latency depending upon a packet's precise arrival time and the amount of traffic. If DUMMYNET was in "fast" mode, there would also be a very big jump in latency when the pipe neared capacity. X could only be a whole number unless you fed the pipe multiple times in EACH direction. And turning off the "one_pass" feature would add to the overhead of EVERY pipe used in the system. It would be much more desirable to be able to specify a cost factor for a packet entering the pipe, as Luigi mentioned, so that the pipe could simply adjust its "score" to reflect the higher overhead of upstream vs. downstream traffic. If it's really a one-line patch to the kernel, I'd like to try doing this and then submit a patch to add the feature if it works. --Brett Glass