From owner-freebsd-net@FreeBSD.ORG  Sat Feb 22 01:08:16 2014
Return-Path: <owner-freebsd-net@FreeBSD.ORG>
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 BC7DB983
 for <net@freebsd.org>; Sat, 22 Feb 2014 01:08:16 +0000 (UTC)
Received: from mail-la0-x231.google.com (mail-la0-x231.google.com
 [IPv6:2a00:1450:4010:c03::231])
 (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
 (No client certificate requested)
 by mx1.freebsd.org (Postfix) with ESMTPS id 2CE1011BD
 for <net@freebsd.org>; Sat, 22 Feb 2014 01:08:16 +0000 (UTC)
Received: by mail-la0-f49.google.com with SMTP id y1so2938516lam.22
 for <net@freebsd.org>; Fri, 21 Feb 2014 17:08:14 -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:message-id:subject
 :from:to:cc:content-type;
 bh=5C79vhZnfQ7YyDkuyTOjXw2Cr6CPOp/UlHRhb33CfOI=;
 b=jVsHw/WoTNL/mpVpe7USj+w+fGCF6F8L5bZg0HRKr3Kh394dxokg/XZ9a2oj9tQtLu
 QK7DaBD2HE8SZa4a2CkOyPsrQLWuigUTBPQPcN+bh8XqsihUolDGqJEQL5UYfsP1MWIn
 gq8VgHbt4QtKrsnC9QfkGz6+74Rr5E7z8kEm+w7H/gMEMm/xG/1qEL0KhVqZfhS8hIRa
 q08alFq52csmHgojBrEQeqy/aC7EJd9zVEfTvKPuPOQz+DmKMgbpp1zEX7V+8b6608vb
 +x/AI4CoHONU22d7WUqgnT6EmIVhzslLAO7Cn2EDlM8EDd9JKmHAMyklpHHOPAVkJhwF
 cYtg==
MIME-Version: 1.0
X-Received: by 10.152.19.66 with SMTP id c2mr5854063lae.54.1393031294192; Fri,
 21 Feb 2014 17:08:14 -0800 (PST)
Sender: rizzo.unipi@gmail.com
Received: by 10.115.4.162 with HTTP; Fri, 21 Feb 2014 17:08:14 -0800 (PST)
In-Reply-To: <5307F755.4090303@huawei.com>
References: <CA+hQ2+gbs9aBneUaDGAnKVoPHspzc=5o+h+f_K=T+Cy8sRxr+w@mail.gmail.com>
 <5307F755.4090303@huawei.com>
Date: Fri, 21 Feb 2014 17:08:14 -0800
X-Google-Sender-Auth: GFnFeq0SWSJMEIP2owjgoLWKRNs
Message-ID: <CA+hQ2+iX+wQuPP9=PaDF+t=2z3-345j71mxxAt5CWO_nHj-fJw@mail.gmail.com>
Subject: Re: netmap, VALE and netmap pipes
From: Luigi Rizzo <rizzo@iet.unipi.it>
To: jerry <jerry.lilijun@huawei.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Content-Filtered-By: Mailman/MimeDel 2.1.17
Cc: netdev@vger.kernel.org, "freebsd-net@freebsd.org" <net@freebsd.org>
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net/>
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 22 Feb 2014 01:08:16 -0000

On Fri, Feb 21, 2014 at 5:03 PM, jerry <jerry.lilijun@huawei.com> wrote:

> Hi Luigi,
>
> How to use netmap pipe by pkt-gen commands?
> I have tried the commands as follows:
>   ./pkt-gen -i netmap:pipename{1 -f tx
>   ./pkt-gen -i netmap:pipename}1 -f rx  (in another terminal)
> But it works failed.
> Should the pipename be replaced with a invalid NIC name such as "eth3" in
> netmap mode?
>

netmap: expects the name of an existing device.
Arbitrary names should have the 'vale' prefix e.g.

./pkt-gen -i valexx:p{0 -f tx
./pkt-gen -i valexx:p}0 -f rx



>
> The netmap pipe works from software ring to software ring independently
> with NICs, I understand. Is that right?
>
>
correct, but the basename is used to group ports
(NICs/VALE ports and netmap pipes) that use the same
shared memory so that you can do zero copy among them.

cheers
luigi
 

> B.R.
> Jerry
>
> On 2014/2/17 18:11, Luigi Rizzo wrote:
> > 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.
>
>
>
>
>


-- 
-----------------------------------------+-------------------------------
 Prof. Luigi RIZZO, rizzo@iet.unipi.it  . Dip. di Ing. dell'Informazione
 http://www.iet.unipi.it/~luigi/        . Universita` di Pisa
 TEL      +39-050-2211611               . via Diotisalvi 2
 Mobile   +39-338-6809875               . 56122 PISA (Italy)
-----------------------------------------+-------------------------------