stefano-garzarella / ptnetmap

ptnetmap source code
13 stars 4 forks source link

performance issue with ptnetmap guest #2

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi Stefano

I have some issues while installing ptnetmap . I followed these steps for installation :- git clone ptnetmap and git submodule update --init —recursive.

In host machine :-

3.17 kernel version installed Intel network interface card 10G 2P X520 Adapter

NETMAP configuration on host : ./configure --kernel-dir=../kernel-host/ --enable-ptnetmap-host make -j insmod netmap.ko QEMU configuration : ./configure --target-list=x86_64-softmmu --enable-e1000-paravirt --enable-netmap --enable-ptnetmap --extra-cflags=-I$HOME/repos/ptnetmap/netmap/sys --python=python2 make -j

for creating VM on Host machine i used command:

root@prateek:~# qemu-system-x86_64 -enable-kvm -smp 4 -m 4G -drive file=/netmap/vm_image/test.qcow2 -device virtio-net-pci,netdev=mynet -netdev netmap,ifname=vale0:4,passthrough=on,id=mynet -vnc :4 & [1] 11349 root@prateek:~# ptnetmap_memdev: init 383.960670 net_init_netmap [726] ptnetmap required 384.024508 net_init_netmap [751] cfg: tx 1024_1 rx 1024_1 ptnetmap_memdev: creating ptnetmap_memdev: loading ptnentmap_memdev: map BAR size 4000000 (64 MiB) ptnetmap_memdev: loaded ptnetmap_memdev: created

NETMAP guest (netmap/LINUX):

In Guest i used ptnetmap linux version.

./configure --kernel-dir=/home/ptnetmap/linux/ --enable-ptnetmap-guest --drivers=virtio-net make -j

I loaded netmap by insmod ./netmap.ko then modprobe virtio_net

ISSUE:-

  1. When I run ./pkt-gen -i eth0 -f tx i got very less negligible sending rate find attachemnet of result snapshot. sender_result
  2. I want vale switch ports to bridge with netmap:eth interface its give segmentation fault . dmesg log :- [91321.594584] 172.469733 [1147] netmap_get_pt_host_na not a ptnetmap [91321.613409] 172.488572 [1993] netmap_do_regif lut ffffc90021dc9000 bufs 20482 size 2048 [91321.620769] 172.495940 [1147] netmap_get_pt_host_na not a ptnetmap [91321.639296] 172.514481 [1993] netmap_do_regif lut ffffc90021e1f000 bufs 20482 size 2048 [91325.643884] bridge[11253]: segfault at 18 ip 00000000004028e2 sp 00007fff6c82b878 error 4 in bridge[400000+4000]
  3. While attaching intel network interface card to vale switch whole system crash . I got the error by vale-ctl -a vale0:eth4 (find attachement of call trace snapshot) attach_error
stefano-garzarella commented 8 years ago

Hi Prateek, I found the bugs for the bridge issue and negligible sending rate.

I'll push the fix on netmap GitHub repository as soon as possible!

About ixgbe: do you attach it on vale switch in the host?

Thanks, Stefano Il giorno mar 15 set 2015 alle 20:06 PrateekGautam notifications@github.com ha scritto:

Hi Stefano

I have some issues while installing ptnetmap . I followed these steps for installation :- git clone ptnetmap and git submodule update --init —recursive.

In host machine :-

3.17 kernel version installed Intel network interface card 10G 2P X520 Adapter

NETMAP configuration on host : ./configure --kernel-dir=../kernel-host/ --enable-ptnetmap-host make -j insmod netmap.ko QEMU configuration : ./configure --target-list=x86_64-softmmu --enable-e1000-paravirt --enable-netmap --enable-ptnetmap --extra-cflags=-I$HOME/repos/ptnetmap/netmap/sys --python=python2 make -j

for creating VM on Host machine i used command:

root@prateek:~# qemu-system-x86_64 -enable-kvm -smp 4 -m 4G -drive file=/netmap/vm_image/test.qcow2 -device virtio-net-pci,netdev=mynet -netdev netmap,ifname=vale0:4,passthrough=on,id=mynet -vnc :4 & [1] 11349 root@prateek:~# ptnetmap_memdev: init 383.960670 net_init_netmap [726] ptnetmap required 384.024508 net_init_netmap [751] cfg: tx 1024_1 rx 1024_1 ptnetmap_memdev: creating ptnetmap_memdev: loading ptnentmap_memdev: map BAR size 4000000 (64 MiB) ptnetmap_memdev: loaded ptnetmap_memdev: created

NETMAP guest (netmap/LINUX):

In Guest i used ptnetmap linux version.

./configure --kernel-dir=/home/ptnetmap/linux/ --enable-ptnetmap-guest --drivers=virtio-net make -j

I loaded netmap by insmod ./netmap.ko then modprobe virtio_net

ISSUE:-

  1. When I run ./pkt-gen -i eth0 -f tx i got very less negligible sending rate find attachemnet of result snapshot. [image: sender_result] https://cloud.githubusercontent.com/assets/8360193/9885252/da70c6ae-5c01-11e5-93e6-15898c9ef92d.png

    1.

    I want vale switch ports to bridge with netmap:eth interface its give segmentation fault . dmesg log :- [91321.594584] 172.469733 [1147] netmap_get_pt_host_na not a ptnetmap [91321.613409] 172.488572 [1993] netmap_do_regif lut ffffc90021dc9000 bufs 20482 size 2048 [91321.620769] 172.495940 [1147] netmap_get_pt_host_na not a ptnetmap [91321.639296] 172.514481 [1993] netmap_do_regif lut ffffc90021e1f000 bufs 20482 size 2048 [91325.643884] bridge[11253]: segfault at 18 ip 00000000004028e2 sp 00007fff6c82b878 error 4 in bridge[400000+4000] 2.

    While attaching intel network interface card to vale switch whole system crash . I got the error by vale-ctl -a vale0:eth4 (find attachement of call trace snapshot) [image: attach_error] https://cloud.githubusercontent.com/assets/8360193/9885226/b4ef3762-5c01-11e5-8e9c-4fd613d70f02.jpg

— Reply to this email directly or view it on GitHub https://github.com/stefano-garzarella/ptnetmap/issues/2.

ghost commented 8 years ago

I really appreciate your help . Thanks for fast reply yes i am attaching it on host machine . Although I am using latest netmap version .(I tried it with different kernel version like 3.17 , 3.16 etc ). Thanks , Prateek

stefano-garzarella commented 8 years ago

Hi Prateek, we recently pushed in the netmap repository (https://github.com/luigirizzo/netmap) the fixes for bridge issue and negligible sending rate.

Can you try if it now works?

Thanks, Stefano

ghost commented 8 years ago

Hi Stefano,

1 . Thanks bridge issue resolved for me now its not giving any error but i am curious whats its output means . I think bridges (Linux bridge) they are virtual switch is used to connect VMs . By using netmap bridge i am not able to connect to network from VM .

  1. I used ./configure --kernel-dir=/netmap/source/linux/ --enable-ptnetmap-guest --drivers=virtio-net command on guest machine this give me warning message unknown driver virtio-net .

while doing make -j its give me error i am attaching u the error. (This error show up only when i compile netmap in guest machine with linux kernel sources provided in your repo.) screenshot from 2015-09-20 12 53 06

  1. IN another experiment on a host machine i used linux bridge to connect 2 VM and I used virtio pass through to create these VMs. And in both VMs I installed netmap (used virtio_net driver) . But when i run pkt-gen -i eth0 -f tx . it sends packets on 1.3 Mpps and bandwith is approximately 600Mbps . Which is very less

Thanks Prateek

stefano-garzarella commented 8 years ago

Hi Prateek, maybe you need to do "make distclean", then ./configure --kernel-dir=/netmap/source/linux/ --enable-ptnetmap-guest --drivers=virtio-net and make.

From your screenshot, I see that all drivers are required. (e1000 fails, but not virtio-net). Can you attach dmesg from the guest VM?

Thanks, Stefano

ghost commented 8 years ago

Hi Stefano,

Sorry for the last snapshot error message its due to in ./configure command i used it without --drivers option .Thats why it creating patches for every driver.

In ./configure --kernel-dir=/netmap/source/linux/ --enable-ptnetmap-guest --drivers=virtio-net ( giving warning message unknown driver virtio-net ). and then i did make -j .

Stil i am facing problem regarding negligible sending packet rate.

Find the attached file of dmesg

Thanks prateek

On Mon, Sep 21, 2015 at 3:12 PM, Stefano Garzarella < notifications@github.com> wrote:

Hi Prateek, maybe you need to do "make distclean", then ./configure --kernel-dir=/netmap/source/linux/ --enable-ptnetmap-guest --drivers=virtio-net and make.

From your screenshot, I see that all drivers are required. (e1000 fails, but not virtio-net). Can you attach dmesg from the guest VM?

Thanks, Stefano

— Reply to this email directly or view it on GitHub https://github.com/stefano-garzarella/ptnetmap/issues/2#issuecomment-141925826 .

stefano-garzarella commented 8 years ago

Hi Prateek, sorry, I made a mistake, you need to specify "virtio_net.c" driver name in this way: ./configure --kernel-dir=/netmap/source/linux/ --enable-ptnetmap-guest --drivers=virtio_net.c

Sorry but I don't see the attachment, maybe github filters the file!

Cheers, Stefano

stefano-garzarella commented 8 years ago

Any updates?

ghost commented 8 years ago

Sorry I have been busy lately working on other stuff . soon i will move to ptnetmap . i will keep you updated with results n issues :)

Thanks n Regards Prateek

On Mon, Oct 19, 2015 at 7:46 PM, Stefano Garzarella < notifications@github.com> wrote:

Any updates?

— Reply to this email directly or view it on GitHub https://github.com/stefano-garzarella/ptnetmap/issues/2#issuecomment-149225857 .

stefano-garzarella commented 8 years ago

Thanks and sorry :)

If you have any questions, feel free to ask me anything.

Cheers, Stefano