From owner-freebsd-net@FreeBSD.ORG Mon Feb 17 10:11:24 2014 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29E94C84 for ; Mon, 17 Feb 2014 10:11:24 +0000 (UTC) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 91F0A1C30 for ; Mon, 17 Feb 2014 10:11:23 +0000 (UTC) Received: by mail-lb0-f179.google.com with SMTP id l4so11209428lbv.10 for ; Mon, 17 Feb 2014 02:11:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=vaGNdY4DcBo9GV0uI1Itd+2h2yE94GfCeJXI3LxH3rU=; b=YJwjJw03eDwtz6kseJGWTCNC24ch6lub4chql7kOTgosjVLqJwBea5y6+8SSzcodLt WkyswFh+zBLm1WQc7yWWuNOREoZ6zeShF090V+hrwYAc+pmtidrDiSo3dAqalJodNCMk ocJLQCMD18pKFzJR/4/vno7HULSEjGpBFT21e3t5uzyphE+zAX5Yt197dPztS8V11Y9/ EtaEg2KAB1/V9iD/TT6dgJ+P8TKcA+U4bPMRB4Opn0M0L9RETU5f0Kkvob1D3qn16sR2 uJWe7/mCMCgt3FcBLEoScmMUBfZudxhl2On1GcXL8ZR0d4qhvFtVucXwolJBoq2LiXm2 RUiw== MIME-Version: 1.0 X-Received: by 10.152.170.135 with SMTP id am7mr16985175lac.23.1392631881554; Mon, 17 Feb 2014 02:11:21 -0800 (PST) Sender: rizzo.unipi@gmail.com Received: by 10.115.4.162 with HTTP; Mon, 17 Feb 2014 02:11:21 -0800 (PST) Date: Mon, 17 Feb 2014 02:11:21 -0800 X-Google-Sender-Auth: 4YD9EwF2vYXPNMwvp1zscufCU9k Message-ID: Subject: netmap, VALE and netmap pipes From: Luigi Rizzo To: netdev@vger.kernel.org, "freebsd-net@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Feb 2014 10:11:24 -0000 Hi, we have recently made a few extensions to netmap/VALE and put various pieces of code on public repositories, so i thought i'd share the pointers. All the code below runs with equal features and performance on FreeBSD and Linux, and we are trying to upstream it in the relevant projects if possible (as an example, QEMU recently added a netmap backend), at which point some of these clone repositories will become unnecessary. See http://info.iet.unipi.it/~luigi/netmap for more details. https://code.google.com/p/netmap/ The latest netmap code for FreeBSD/Linux. It has native support for certain NICs; emulated netmap over unmodified drivers; enhanced parallelism in the VALE switch (20 Mpps/source, scaling up to ~50Mpps); and a new feature called "netmap pipe" that does zero-copy blocking I/O at over 100 Mpps. Other features are the ability to allocate tons of extra netmap buffers, and configurable sharing of memory among NICs, VALE ports and netmap pipes. This increases the opportunity for zero copy operation. The user API is also greatly simplified, with a naming scheme that permits easy access to all types of ports including individual NIC queues. https://code.google.com/p/netmap-libpcap a netmap-enabled version of libpcap. With this, basically any pcap client can read/write traffic at 10+ Mpps, with zerocopy reads and (soon) support for zerocopy writes. Whether applications can cope with these packet rates, of course, is another story. https://code.google.com/p/netmap-click a netmap-enabled version of the Click Modular Router. This code matches the current version of netmap, supporting all features (including netmap pipes). https://code.google.com/p/netmap-ipfw a netmap-enabled, userspace version of the ipfw firewall and dummynet network emulator. This version reaches 7-10 Mpps for filtering and over 2.5 Mpps for emulation. Hope you'll find it useful. cheers luigi