From owner-freebsd-net@FreeBSD.ORG Wed Jan 9 13:22:03 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C60B1168 for ; Wed, 9 Jan 2013 13:22:03 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx1.freebsd.org (Postfix) with ESMTP id 86BF1EAF for ; Wed, 9 Jan 2013 13:22:03 +0000 (UTC) Received: by mail-vb0-f47.google.com with SMTP id e21so1491012vbm.6 for ; Wed, 09 Jan 2013 05:22:02 -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:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=9/7TQEQZyYjTAlRfhfcsgKFe0jc8s66oinc2v68lrJU=; b=foRxuaZ1QMajFqGUFqZ+Aw/54LkPB8u4sEowenro2nwEweOxnLjm73qLFzaT/3ARTp KY5K35n3aUcC3p9GN0Or8wBVrK/t1RdXe6zuAytLOXiUC9U0GSqH5d+aRiKzoSlKX6n8 sDWz9TG7QJVRP9mJENaVrkqWI7ghSaJhfSkudPiFHjZMWiZ6CahJ0Te8Zl9u7yiscQSG xo7pG8oe6NW17+fi+FtAA9vVDitaB6UpWUUP6bHZFfNsoUqYsBoHqRaqEwKRqzN97wTO 0CLeCMFHyUgiINVmTByqd4xfztzHaEIVkVNd+weDszAUv1NRnThQ+z7Oe5LSgqorJpwD JMww== Received: by 10.52.29.231 with SMTP id n7mr77320163vdh.103.1357737722456; Wed, 09 Jan 2013 05:22:02 -0800 (PST) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.58.164.100 with HTTP; Wed, 9 Jan 2013 05:21:42 -0800 (PST) In-Reply-To: <20130108230200.GA36903@onelab2.iet.unipi.it> References: <20130108230200.GA36903@onelab2.iet.unipi.it> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Wed, 9 Jan 2013 14:21:42 +0100 X-Google-Sender-Auth: OWGe_041WKPTZTQmyvIlJ60sq_A Message-ID: Subject: Re: How to use netmap pkt-gen on 9.1? To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 09 Jan 2013 13:22:03 -0000 On Wed, Jan 9, 2013 at 12:02 AM, Luigi Rizzo wrote: > not your mistake, on stable/9 i have not merged yet the > device driver changes. > Your best option is to copy sys/dev/netmap from HEAD, > and add the device-specific chunks also from HEAD > into the various drivers (dev/e1000, dev/ixgbe, dev/re) > Ok but before starting to merge the changes, I've tested with a -current and meet the same problem (under virtualbox): [root@router]~# uname -a FreeBSD router.bsdrp.net 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r245223: Wed Jan 9 11:28:12 CET 2013 root@orange.bsdrp.net:/usr/obj/BSDRP.amd64/usr/local/BSDRPexp/FreeBSD/src/sys/amd64 amd64 [root@router]~# kldload netmap netmap: loaded module [root@router]~# pkt-gen -i em0 -t 50 -d 1.1.1.2 -s 1.1.1.1 -D aa:aa:00:00:02:12 main [832] ether887.679157 netmap_memory_config [688] reconfiguring _aton(aa:aa:00:0887.682154 netmap_config_obj_allocator [563] objsize 1024 clustsize 4096 objects 4 0:02:12) gives 0887.684256 netmap_config_obj_allocator [563] objsize 36864 clustsize 36864 objects 1 x800fc0a70 887.686584 netmap_config_obj_allocator [563] objsize 2048 clustsize 4096 objects 2 887.688061 netmap_memory_config [708] Have 100 KB for interfaces, 7200 KB for rings and 320 MB for buffers 887.690015 netmap_finalize_obj_allocator [654] Pre-allocated 25 clusters (4/100KB) for 'netmap_if' 887.694443 netmap_finalize_obj_allocator [654] Pre-allocated 200 clusters (36/7200KB) for 'netmap_ring' 887.938950 netmap_finalize_obj_allocator [654] Pre-allocated 81920 clusters (4/327680KB) for 'netmap_buf' main [900] map size is 334980 Kb main [906] Unable to get if info for em0 main [913] bad nthreads 1, have 0 queues main [922] mmapping 0 Kbytes main [927] Unable to mmap 0 KB main [941] Unable to register interface em0 Sending on em0: 0 queues, 1 threads and 1 cpus. 1.1.1.1 -> 1.1.1.2 (aa:aa:00:01:01:01 -> aa:aa:00:00:02:12) main [975] Wait 2 secs for phy reset main [977] Ready889.942650 netmap_memory_finalize [724] busy (refcount 2) ... main [1028] Unable to register em0 main [1085] 0 pp890.952608 netmap_ioctl [1073] deprecated, data is 0xffffff8000323b90 s Sent 0 packets, 60 bytes each, in 0.00 second890.955473 netmap_memory_deref [950] refcount = 1 s. Speed: nanpp890.956985 netmap_close [575] dev 0xfffffe00210f8400 fflag 0x3 devtype 8192 td 0xfffffe000a0d8000 s. Bandwidth: nanbps (nanbps with overhead). 890.960688 netmap_memory_deref [950] refcount = 0