Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jan 2014 11:39:13 +0800
From:      Wang Weidong <wangweidong1@huawei.com>
To:        =?windows-1252?Q?facolt=E0?= <giuseppe.lettieri73@gmail.com>
Cc:        Luigi Rizzo <rizzo@iet.unipi.it>, net@freebsd.org
Subject:   Re: netmap: I got some troubles with netmap
Message-ID:  <52D8A5E1.9020408@huawei.com>
In-Reply-To: <92C7725B-B30A-4A19-925A-A93A2489A525@iet.unipi.it>
References:  <52D74E15.1040909@huawei.com> <CA%2BhQ2%2BjBhSyHwFsFo%2BzH-EuJEkKEcyc6YBH%2BfnEHi=Y27FyWyQ@mail.gmail.com> <92C7725B-B30A-4A19-925A-A93A2489A525@iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <rizzo@iet.unipi.it <mailto:rizzo@iet.unipi.it>> 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: [<ffffffff8138d9d4>] 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:[<ffffffff8138d9d4>]  [<ffffffff8138d9d4>] 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]  [<ffffffff8138e998>] netif_rx+0xf8/0x190
[ 2316.191799]  [<ffffffffa0467bee>] netmap_sync_to_host+0x1de/0x2b0 [netmap_lin]
[ 2316.277452]  [<ffffffffa046ac65>] netmap_poll+0x495/0x610 [netmap_lin]
[ 2316.354846]  [<ffffffff81163ed5>] do_poll+0x115/0x2a0
[ 2316.414696]  [<ffffffff8116485e>] do_sys_poll+0x18e/0x200
[ 2316.478676]  [<ffffffff81164ab6>] sys_poll+0x66/0x100
[ 2316.538526]  [<ffffffff8144eb12>] 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  [<ffffffff8138d9d4>] get_rps_cpu+0x44/0x390
[ 2316.955804]  RSP <ffff881f5af75928>
-------------------------

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 <mailto: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)
>> -----------------------------------------+-------------------------------
> 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52D8A5E1.9020408>