From owner-freebsd-net@FreeBSD.ORG Wed Oct 7 14:58:21 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06D031065676; Wed, 7 Oct 2009 14:58:21 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from mx40.mail.ru (mx40.mail.ru [94.100.176.54]) by mx1.freebsd.org (Postfix) with ESMTP id AD12B8FC1A; Wed, 7 Oct 2009 14:58:20 +0000 (UTC) Received: from [217.25.27.27] (port=57275 helo=[217.25.27.27]) by mx40.mail.ru with asmtp id 1MvXy7-0004gZ-00; Wed, 07 Oct 2009 18:58:19 +0400 Message-ID: <4ACCAC89.1040805@mail.ru> Date: Wed, 07 Oct 2009 19:58:17 +0500 From: rihad User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Robert Watson References: <4AC9E29B.6080908@mail.ru> <20091005123230.GA64167@onelab2.iet.unipi.it> <4AC9EFDF.4080302@mail.ru> <4ACA2CC6.70201@elischer.org> <4ACAFF2A.1000206@mail.ru> <4ACB0C22.4000008@mail.ru> <20091006100726.GA26426@svzserv.kemerovo.su> <4ACB42D2.2070909@mail.ru> <20091006142152.GA42350@svzserv.kemerovo.su> <4ACB6223.1000709@mail.ru> <20091006161240.GA49940@svzserv.kemerovo.su> <4ACC5563.602@mail.ru> <4ACC56A6.1030808@mail.ru> <4ACC5DEC.1010006@mail.ru> <4ACC65A0.7030900@mail.ru> <4ACC8CC8.8050403@mail.ru> In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam: Not detected X-Mras: Ok Cc: freebsd-net@freebsd.org Subject: Re: dummynet dropping too many packets X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 07 Oct 2009 14:58:21 -0000 Robert Watson wrote: > In the driver init code in if_bce, the following code appears: > > ifp->if_snd.ifq_drv_maxlen = USABLE_TX_BD; > IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); > IFQ_SET_READY(&ifp->if_snd); > > Which evaluates to a architecture-specific value due to varying > pagesize. You might just try forcing it to 1024. > In dev/bce/if_bcereg.h: #define TX_PAGES 2 #define TOTAL_TX_BD_PER_PAGE (BCM_PAGE_SIZE / sizeof(struct tx_bd)) #define USABLE_TX_BD_PER_PAGE (TOTAL_TX_BD_PER_PAGE - 1) #define TOTAL_TX_BD (TOTAL_TX_BD_PER_PAGE * TX_PAGES) #define USABLE_TX_BD (USABLE_TX_BD_PER_PAGE * TX_PAGES) #define MAX_TX_BD (TOTAL_TX_BD - 1) meaning that ifq_drv_maxlen is expected to end up smaller than MAX_TX_BD. What if MAX_TX_BD is itself way smaller than 1024?