From owner-freebsd-net@FreeBSD.ORG Wed Nov 21 07:55:08 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C5498AD; Wed, 21 Nov 2012 07:55:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id 01F578FC16; Wed, 21 Nov 2012 07:55:07 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id hm6so1361987wib.13 for ; Tue, 20 Nov 2012 23:55:01 -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 :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Jx6HiNpcUXnha06xdduYuTZeI36zpAPNoYJ2tu4SCDM=; b=Q5b/hcfZEn1xGZDlHHqRKcdX6m9CJ7+jhC1QlRsqbn62jp3Kcw/FLLC6CIhxiBysH1 ZnHqK0uMmWxU7LgGis0ozvqiLUDWPuNotIaZqjSrbeO0rMAJypjEJ5KKuL4voaOHbcIP MnGNM7Z3mfCI3OAVVsX/CAK+3EDR5EGXCIojVGwrR2ydwohdVRB8+gG/0dob3hdtAp4G qNaRqLitCm0fT6moYrhmzgThDdAQl1s9T6wk+Rq2govaAT69/+IkMfzxux/nizKM8rA9 rA2GHzWtoRvHAHbUaOWzhxj8l1jwjOCCTCekiRiPaORv0L+aizf2QSISc2BzINqOT58s 5Q9g== MIME-Version: 1.0 Received: by 10.180.99.1 with SMTP id em1mr15497030wib.17.1353484501064; Tue, 20 Nov 2012 23:55:01 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.21.211 with HTTP; Tue, 20 Nov 2012 23:55:00 -0800 (PST) In-Reply-To: <50AC8393.3060001@freebsd.org> References: <1353448328.76219.YahooMailClassic@web121602.mail.ne1.yahoo.com> <50AC08EC.8070107@mu.org> <832757660.33924.1353460119408@238ae4dab3b4454b88aea4d9f7c372c1.nuevasync.com> <250266404.35502.1353464214924@238ae4dab3b4454b88aea4d9f7c372c1.nuevasync.com> <50AC8393.3060001@freebsd.org> Date: Tue, 20 Nov 2012 23:55:00 -0800 X-Google-Sender-Auth: EBsuC973devBRVcAu3widKNevJA Message-ID: Subject: Re: FreeBSD boxes as a 'router'... From: Adrian Chadd To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 Cc: Barney Cordoba , Jim Thompson , Alfred Perlstein , khatfield@socllc.net, "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2012 07:55:08 -0000 Something that has popped up a few times, even recently, is breaking out of an RX loop after you service a number of frames. During stupidly high levels of RX, you may find the NIC happily receiving frames faster than you can service the RX queue. If this occurs, you could end up just plain being stuck there. So what I've done in the past is to loop over a certain number of frames, then schedule a taskqueue to service whatever's left over. I've also had to do some proactive frame dropping at the driver layer when under ridiculous levels of RX load, but that's a different story. I wonder how many drivers break out of an RX loop after a fixed amount of time.. adrian