From owner-freebsd-stable@FreeBSD.ORG Mon Mar 3 17:29:33 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5292B1065676 for ; Mon, 3 Mar 2008 17:29:33 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.185]) by mx1.freebsd.org (Postfix) with ESMTP id D6FF28FC1D for ; Mon, 3 Mar 2008 17:29:32 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by mu-out-0910.google.com with SMTP id w9so224420mue.6 for ; Mon, 03 Mar 2008 09:29:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=UjOLHCCscl85ubZ08vS/he3eRBF+nVCWZs9vO4OxenE=; b=Qmlma6Ag+bdEbfy6YweXq2hACnMlK/H83hsWFeMURY0WSTQdlgVDWDNM9g9DaKV6+XNwKBn3pDUORNZRQWitBVk/UhY7BfftnhI72XgJ588GQnR24aeqpKSo8Yb/aOPephe2StiP9yWXzcvUH/Pmw2aBJgW0Vwb+GTQmpiGBRe4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=JgEp5dJgQfDPNnptYxtnyZlad63dtZbvB4o9JKn3hQ79xqd5eSvls6DxzrQY3WQ5oilPNZemFA+OQ97zFbeSzawfzSZtWt4uANtJ4MZySlTb/x/xtpdokTo0mzPoZ3vjjhr29PBUzjAECRN/tZorS3IXfiWBdZFUJ4qHu5omxgA= Received: by 10.65.225.7 with SMTP id c7mr10908335qbr.1.1204565370260; Mon, 03 Mar 2008 09:29:30 -0800 (PST) Received: by 10.64.149.8 with HTTP; Mon, 3 Mar 2008 09:29:30 -0800 (PST) Message-ID: <5f67a8c40803030929o1f2f53dtde8c126ef1b80bf4@mail.gmail.com> Date: Mon, 3 Mar 2008 17:29:30 +0000 From: "Zaphod Beeblebrox" To: "Bruce M. Simpson" In-Reply-To: <47CBEC78.9020007@FreeBSD.org> MIME-Version: 1.0 References: <31625464.6081204538969779.JavaMail.root@ly.sdf.com> <47CBEC78.9020007@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Kurt Jaeger , freebsd-stable@freebsd.org, Tom Samplonius Subject: Re: PAUSE support for Ethernet interfaces ? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 17:29:33 -0000 On Mon, Mar 3, 2008 at 12:18 PM, Bruce M. Simpson wrote: > There are switch ASICs out there which implement upstream bandwidth > limiting on ports by sending the PAUSE frame. > > I believe thompsa@ recently committed a fix to if_bridge to allow it to > ignore PAUSE frames for the purposes of forwarding (they should never be > forwarded, they are link scope only). > > It would be interesting to see a patch which implemented rate limiting > in the same way as these ASICs do, but in if_bridge. Being able to react to pause frames could give us the ability to react to different speed ethernet-like devices like DSL modems and cable modems. Right now, we can blast away at whatever the link speed is and only the TCP semantics are keeping this under control. One can use rate limiting a-la pf and/or dummynet, but this has a very bad failure mode --- when the speed of the link changes you end up choking the packets twice (once with the rate limiting, once with the physical device) and for large numbers of tcp streams (100's of users, say... or 10 bittorrent users) you can easily get really bad failure modes when the available bandwidth changes. I have several links for which the bandwidth changes when the weather is very wet, for instance.