From owner-svn-src-all@FreeBSD.ORG Mon Dec 5 18:38:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 560ED106564A; Mon, 5 Dec 2011 18:38:56 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id E0B298FC12; Mon, 5 Dec 2011 18:38:55 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id pB5IcsOx097863; Mon, 5 Dec 2011 19:38:54 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id pB5Icskr097862; Mon, 5 Dec 2011 19:38:54 +0100 (CET) (envelope-from marius) Date: Mon, 5 Dec 2011 19:38:54 +0100 From: Marius Strobl To: Luigi Rizzo Message-ID: <20111205183854.GC54475@alchemy.franken.de> References: <201112051533.pB5FXEuh043063@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201112051533.pB5FXEuh043063@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228281 - in head/sys/dev: e1000 re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Dec 2011 18:38:56 -0000 On Mon, Dec 05, 2011 at 03:33:14PM +0000, Luigi Rizzo wrote: > Author: luigi > Date: Mon Dec 5 15:33:13 2011 > New Revision: 228281 > URL: http://svn.freebsd.org/changeset/base/228281 > > Log: > add netmap support for "em", "lem", "igb" and "re". > > On my hardware, "em" in netmap mode does about 1.388 Mpps > on one card (on an Asus motherboard), and 1.1 Mpps on another > card (PCIe bus). Both seem to be NIC-limited, because > i have the same rate even with the CPU running at 150 MHz. > > On the "re" driver the tx throughput is around 420-450 Kpps > on various (8111C and the like) chipsets. On the Rx side > performance seems much better, and i can receive the full > load generated by the "em" cards. > > "igb" is untested as i don't have the hardware. > <...> > +#ifdef DEV_NETMAP > + if (slot) { > + int si = i + na->tx_rings[txr->me].nkr_hwofs; > + void *addr; > + > + if (si >= na->num_tx_desc) > + si -= na->num_tx_desc; > + addr = NMB(slot + si); > + txr->tx_base[i].buffer_addr = > + htole64(vtophys(addr)); > + /* reload the map for netmap mode */ > + netmap_load_map(txr->txtag, > + txbuf->map, addr, na->buff_size); > + } > +#endif /* DEV_NETMAP */ Can these vtophys(9) usages be fixed to use bus_dma(9) instead so netmap works with bounce buffers, IOMMUs etc? Marius