From owner-freebsd-current@FreeBSD.ORG Mon Jan 26 14:21:59 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CB721065670 for ; Mon, 26 Jan 2009 14:21:59 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.185]) by mx1.freebsd.org (Postfix) with ESMTP id 44BD48FC13 for ; Mon, 26 Jan 2009 14:21:59 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by rn-out-0910.google.com with SMTP id k32so2217667rnd.12 for ; Mon, 26 Jan 2009 06:21:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0um5dk94S8X+3luA+DgGO8VRH+PlASoXbKUTdWbFcTg=; b=jCiUY4ev/q1dS1LSPf6zbl5Pc7+xIRrhNwUnCorzvaxW2u60eIvP8Z1XPxDhVXONVz PbLa7h2+wqEQ4xQnWsbsIrLLvtHHIafMg4yZbf/om2zuTIpi5U2wZQOBe69aL1E6n9my Q/LJ19bW05/MxgBP75bRI+uAnWmPO967znFsE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=A2RkFte26A1llJeCYP3mCT50TQxrdLk/WhTV/9LuR1XNSyUKcLy1uAIrzlUeiQaFJN 9yiRgRfgxh4qr10s6U0vAWrd0n9A6xHheaw5leiOGksGaYgo9Uzvg5BYkfJnNyswrFMC Za6jFLCLNapAGf1GYtr8kQa559nODWP0L7mqU= MIME-Version: 1.0 Received: by 10.151.147.16 with SMTP id z16mr865327ybn.52.1232978262276; Mon, 26 Jan 2009 05:57:42 -0800 (PST) In-Reply-To: <497758.90319.qm@web63903.mail.re1.yahoo.com> References: <497758.90319.qm@web63903.mail.re1.yahoo.com> Date: Mon, 26 Jan 2009 21:57:42 +0800 Message-ID: From: Sepherosa Ziehau To: barney_cordoba@yahoo.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: DMA bounce buffers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 14:21:59 -0000 On Mon, Jan 26, 2009 at 9:05 PM, Barney Cordoba wrote: > I have a problem with the ixgbe driver, where bus_dmamap_load_mbuf_sg() is > failing. The underlying failure is reserve_bounce_pages(). It seems that > there aren't any bounce pages allocated. What could be the cause of this? Is there some tunable? I don't think the hardware supported ixgbe(4) will need bounce pages on RX/TX buffers (according to data sheet, the hardware supports full 64bits address space accessing and no alignment constraints on RX/TX buffer start address). However, the driver's buffer busdma is kinda misconfigured: in ixgbe_allocate_{transmit,receive}_buffers(), the buffers' alignment is set to PAGE_SIZE (?!), this means that almost all TX/RX operation will require bouncing. The best case is poor performance due to additional and unnecessary memory copy in bus_dmamap_sync(); the worst case is completely unfunction NIC due to RX ring could not be filled during ifnet.if_init(). Best Regards, sephe -- Live Free or Die