Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Nov 2016 10:31:51 +0000
From:      Steven Crangle <Steven@stream-technologies.com>
To:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Looking for some help with netmap/bhyve
Message-ID:  <DB5PR07MB1685DAA40193595950A464FB9BB40@DB5PR07MB1685.eurprd07.prod.outlook.com>

next in thread | raw e-mail | index | archive | help

Hi,


I've recently been trying to boot up several bhyves so that I can test netm=
ap communication between instances. The problem is, no matter what configur=
ation I try, the guest vm running in bhyve completely hangs and becomes unu=
sable as soon as a packet hits the netmap interface. When testing with pkt-=
gen, the TX side successfully starts sending packets, but the RX side will =
reliable freeze with the only option being killing the bhyve process.


The bhyve command used for the above test was:


    bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/vip=
er1vol    -s 3,virtio-net,tap0,mac=3D00:01:23:45:67:83 -s 4,virtio-net,tap4=
 -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 &
    bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/dev/zvol/zroot/vip=
er2vol    -s 3,virtio-net,tap1,mac=3D00:01:23:45:67:84 -s 4,virtio-net,tap5=
 -l com1,/dev/nmdm1A -A -H -P -m 6g viper2

For this test the host OS was FreeBSD-11.0-p3 and the guest OS was FreeBSD-=
11.0-p3.

After failing to get this solution working, I pulled down the source from t=
he following url and installed it on the host box:

https://svnweb.freebsd.org/socsvn/soc2016/vincenzo/head/

I then ran the following commands to try and bring up the machines using th=
e ptnetmap interface (the guest still running 11.0p3) :

    bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/v=
iper1vol    -s 2:0,virtio-net,tap0,mac=3D00:01:23:45:67:83 -s 2:1,ptnetmap-=
memdev -s 2:2,ptnet,vale0:0 -l com1,/dev/nmdm0A -A -H -P -m 6g viper1 &
    bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 1:1,virtio-blk,/dev/zvol/zroot/v=
iper2vol    -s 2:0,virtio-net,tap1,mac=3D00:01:23:45:67:84 -s 2:1,ptnetmap-=
memdev -s 2:2,ptnet,vale0:1 -l com1,/dev/nmdm1A -A -H -P -m 6g viper2

With the above commands the vm's fail to boot with the following message:

ptnet_init: failed to get ptnetmap

Output in /var/log/messages seems to just show the ptnetmap driver allocati=
ng one RX/TX ring for each vm, while bringing the device up, the device the=
n goes down and the above error is seen in the console.

Is there something I'm doing wrong with regards to running netmap or ptnetm=
ap within a bhyve? Any pointers in the right direction will be much appreci=
ated!

Kind Regards

Steven








________________________________



[Stream Logo]








Steven Crangle


Systems Developer | Stream Technologies | Glasgow, UK


[http://www.stream-technologies.com/img/phone.png]


+44 (0)844 800 8520


|


[http://www.stream-technologies.com/img/mouse.png]


www.stream-technologies.com<http://www.stream-technologies.com/>;









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