From owner-freebsd-net@FreeBSD.ORG Fri Jan 17 03:47:18 2014 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCBA2547 for ; Fri, 17 Jan 2014 03:47:18 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [119.145.14.66]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5CCB01866 for ; Fri, 17 Jan 2014 03:47:16 +0000 (UTC) Received: from 172.24.2.119 (EHLO szxeml213-edg.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AJJ80940; Fri, 17 Jan 2014 11:40:18 +0800 (CST) Received: from SZXEML415-HUB.china.huawei.com (10.82.67.154) by szxeml213-edg.china.huawei.com (172.24.2.30) with Microsoft SMTP Server (TLS) id 14.3.158.1; Fri, 17 Jan 2014 11:40:13 +0800 Received: from [127.0.0.1] (10.177.18.75) by szxeml415-hub.china.huawei.com (10.82.67.154) with Microsoft SMTP Server id 14.3.158.1; Fri, 17 Jan 2014 11:40:09 +0800 Message-ID: <52D8A5E1.9020408@huawei.com> Date: Fri, 17 Jan 2014 11:39:13 +0800 From: Wang Weidong User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: =?windows-1252?Q?facolt=E0?= Subject: Re: netmap: I got some troubles with netmap References: <52D74E15.1040909@huawei.com> <92C7725B-B30A-4A19-925A-A93A2489A525@iet.unipi.it> In-Reply-To: <92C7725B-B30A-4A19-925A-A93A2489A525@iet.unipi.it> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.18.75] X-CFilter-Loop: Reflected Cc: Luigi Rizzo , 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jan 2014 03:47:18 -0000 On 2014/1/16 18:24, facoltà wrote: > Hi Wang, > > I work with Luigi, please check the replies below. > > > Il giorno 16/gen/2014, alle ore 04:53, Luigi Rizzo > ha scritto: > >> >> [...] >> Problem 3: >> "qemu-system-x86_64 -m 1024 -boot c -net nic -net netmap,ifname=vale0:1 -hda /home/disk/nm_d0 >> -enable-kvm -vnc :0", Use that command to start a vm. >> >> I test on the vm. >> #pkt-gen -i eth0 -f tx -l 60 -n 20000000, >> the speed is up to 1.02 Mpps. > >> >> I do "vale-ctl -h vale0:eth2", then I test on the vm, the speed is up to 558.57 Kpps. >> While "vale-ctl -a vale0:eth2", the speed is up to 800 kpps. >> > > The number you obtain in the first test is quite low. vale-ctl -h vale0:eth2 connects the host stack, which is very slow, so ~500 Kpps is not unexpected. I don’t know about the third test at the moment, I have to check. > > What version of our modified qemu are you using? Please note that there might be a qemu patch in the netmap sources, but that is only a leftover from our first attempts, so you should not use that. > Here, I use the qemu is from 'git clone git://git.qemu-project.org/qemu.git' origin/master and the commit is f976b09ea249 ("PPC: Fix compilation with TCG debug"). The netmap is submit into the qemu in commit 58952137b0("net: Adding netmap network backend"). Is the version I used is not right? Because of the netmap-20131019 doesn't support qemu, so I find the newest qemu. Although, I try to use the netmap-20120813 which support qemu, and download the qemu-1.0.1 from http://wiki.qemu-project.org/download/, then I patch the patch-zz-netmap-1 and copy the qemu-netmap to the qemu. I test the "pkt-gen -i eth0 -f tx -l 60 -n 20000000" on the vm, (the pkt-gen is from netmap-20131019) And the speed is unsteadily, sometimes up to 2Mpps or 1.44, and avg is 1.74Mpps. But when I use "./bridge -i vale0:eth2" on the host, then test "pkt-gen -i eth0 -f tx -l 60 -n 20000000" on the vm, I got a NULL pointer dereference BUG that: -------------- [ 2313.454871] BUG: unable to handle kernel NULL pointer dereference at (null) [ 2313.547751] IP: [] get_rps_cpu+0x44/0x390 [ 2313.613802] PGD 1f7cbe5067 PUD 1f7d792067 PMD 0 [ 2313.668509] Oops: 0000 [#1] SMP [ 2313.706703] CPU 0 [ 2313.728373] Modules linked in: ixgbe(N) netmap_lin(N) edd(N) bridge(N) stp(N) llc(N) mperf(N) microcode(N) fuse(N) loop(N) dm_mod(N) vhost_net(N) macvtap(N) macvlan(N) tun(N) kvm_intel(N) sg(N) i2c_i801(N) ipv6(N) kvm(N) ipv6_lib(N) i2c_core(N) i7core_edac(N) mptctl(N) iTCO_wdt(N) igb(N) pcspkr(N) edac_core(N) rtc_cmos(N) serio_raw(N) iTCO_vendor_support(N) mdio(N) dca(N) button(N) ext3(N) jbd(N) mbcache(N) usbhid(N) hid(N) uhci_hcd(N) ehci_hcd(N) usbcore(N) usb_common(N) sd_mod(N) crc_t10dif(N) processor(N) thermal_sys(N) hwmon(N) scsi_dh_alua(N) scsi_dh_hp_sw(N) scsi_dh_rdac(N) scsi_dh_emc(N) scsi_dh(N) ata_generic(N) ata_piix(N) libata(N) mptsas(N) mptscsih(N) mptbase(N) scsi_transport_sas(N) scsi_mod(N) [last unloaded: ixgbe] [ 2314.498465] Supported: Yes [ 2314.530455] [ 2314.548001] Pid: 10708, comm: bridge Tainted: G N 3.0.58-0.6.6-default #2 Huawei Technologies Co., Ltd. Tecal XH620 /BC21THSA [ 2314.718261] RIP: 0010:[] [] get_rps_cpu+0x44/0x390 [ 2314.813196] RSP: 0018:ffff881f5af75928 EFLAGS: 00010246 [ 2314.876137] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 2314.960745] RDX: ffff881f5af75990 RSI: ffff881f5b1da480 RDI: ffff881f59098000 [ 2315.045354] RBP: ffff881f5b1da480 R08: 0000000000000000 R09: 0000000000000004 [ 2315.129963] R10: 0000000080042000 R11: 0000000000000001 R12: ffff881f59098000 [ 2315.214570] R13: ffff881f7a480000 R14: ffff881f5b1da480 R15: 00000000000003ff [ 2315.299179] FS: 00007f948e25c700(0000) GS:ffff88203f200000(0000) knlGS:0000000000000000 [ 2315.395135] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2315.463237] CR2: 0000000000000000 CR3: 0000001f7bb55000 CR4: 00000000000026e0 [ 2315.547845] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2315.632454] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 2315.717064] Process bridge (pid: 10708, threadinfo ffff881f5af74000, task ffff881f5903a3c0) [ 2315.816120] Stack: [ 2315.839856] ffff881f5af7598f 0000000000000258 ffff881f81aa1280 ffffffff8137ed57 [ 2315.927586] ffff881f5af75990 0000000000000000 ffff881f5b1da480 0000000000000296 [ 2316.015317] ffff881f7a480000 ffff881f5b1da480 00000000000003ff ffffffff8138e998 [ 2316.103044] Call Trace: [ 2316.131948] [] netif_rx+0xf8/0x190 [ 2316.191799] [] netmap_sync_to_host+0x1de/0x2b0 [netmap_lin] [ 2316.277452] [] netmap_poll+0x495/0x610 [netmap_lin] [ 2316.354846] [] do_poll+0x115/0x2a0 [ 2316.414696] [] do_sys_poll+0x18e/0x200 [ 2316.478676] [] sys_poll+0x66/0x100 [ 2316.538526] [] system_call_fastpath+0x16/0x1b [ 2316.609726] [<00007f948d7724bf>] 0x7f948d7724be [ 2316.664418] Code: 24 40 49 89 fc 4c 89 74 24 48 4c 89 7c 24 50 48 89 54 24 20 0f b7 86 ac 00 00 00 66 85 c0 0f 85 d3 00 00 00 48 8b 9f d8 02 00 00 <4c> 8b 2b 4d 85 ed 0f 84 83 01 00 00 41 83 7d 00 01 0f 84 05 01 [ 2316.888727] RIP [] get_rps_cpu+0x44/0x390 [ 2316.955804] RSP ------------------------- As you point out that I shouldn't use these old version. So the BUG not occured in the netmap-20131019 and qemu-newest which integrated the netmap-backend. Btw, how can I use the bridge command for testing? Thanks, Wang > Cheers, > Giuseppe > >> I did something wrong? >> ------ >> >> thanks, >> >> Wang >> >> >> >> >> >> >> -- >> -----------------------------------------+------------------------------- >> 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) >> -----------------------------------------+------------------------------- >