Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Nov 2016 15:25:40 +0000
From:      Steven Crangle <Steven@stream-technologies.com>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Looking for some help with netmap/ptnetmap within a bhyve
Message-ID:  <DB5PR07MB16854389D2EB1687A1789C099BB50@DB5PR07MB1685.eurprd07.prod.outlook.com>

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

[-- Attachment #1 --]
Hi,


I've recently been trying to boot up several bhyves so that I can test netmap communication between instances. The problem is, no matter what configuration I try, the guest vm running in bhyve completely hangs and becomes unusable 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/viper1vol    -s 3,virtio-net,tap0,mac=00: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/viper2vol    -s 3,virtio-net,tap1,mac=00: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 the following url and installed it on the host box:

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

<https://svnweb.freebsd.org/socsvn/soc2016/vincenzo/head/>I then ran the following commands to try and bring up the machines using the 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/viper1vol    -s 2:0,virtio-net,tap0,mac=00: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/viper2vol    -s 2:0,virtio-net,tap1,mac=00: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

I've also attached a txt with the output in /var/log/messages

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

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/>;







[-- Attachment #2 --]
Nov 21 15:14:21 sacrifice kernel: tap0: link state changed to UP
Nov 21 15:14:21 sacrifice kernel: bridge0: link state changed to UP
Nov 21 15:14:21 sacrifice kernel: 261.382282 [1169] netmap_get_pt_host_na     Requesting a ptnetmap host adapter
Nov 21 15:14:21 sacrifice kernel: 261.382379 [1188] netmap_get_pt_host_na     found parent: vale0:0
Nov 21 15:14:21 sacrifice kernel: 261.382409 [1244] netmap_get_pt_host_na     vale0:0-PTN ptnetmap request DONE
Nov 21 15:14:21 sacrifice kernel: 261.382443 [1035] nm_pt_host_config         rxr: 1 txr: 1 txd: 1024 rxd: 1024
Nov 21 15:14:21 sacrifice kernel: tap2: link state changed to UP
Nov 21 15:14:21 sacrifice kernel: tap1: link state changed to UP
Nov 21 15:14:21 sacrifice kernel: tap3: link state changed to UP
Nov 21 15:14:21 sacrifice kernel: 261.427044 [1050] nm_pt_host_krings_create  vale0:0-PTN
Nov 21 15:14:21 sacrifice kernel: 261.427305 [1106] nm_pt_host_register       vale0:0-PTN onoff 1
Nov 21 15:14:21 sacrifice kernel: 261.427362 [1169] netmap_get_pt_host_na     Requesting a ptnetmap host adapter
Nov 21 15:14:21 sacrifice kernel: 261.427424 [1188] netmap_get_pt_host_na     found parent: vale0:2
Nov 21 15:14:21 sacrifice kernel: 261.427459 [1244] netmap_get_pt_host_na     vale0:2-PTN ptnetmap request DONE
Nov 21 15:14:21 sacrifice kernel: 261.427499 [1035] nm_pt_host_config         rxr: 1 txr: 1 txd: 1024 rxd: 1024
Nov 21 15:14:21 sacrifice kernel: 261.467956 [1050] nm_pt_host_krings_create  vale0:2-PTN
Nov 21 15:14:21 sacrifice kernel: 261.468218 [1106] nm_pt_host_register       vale0:2-PTN onoff 1
Nov 21 15:14:21 sacrifice kernel: 261.468254 [1169] netmap_get_pt_host_na     Requesting a ptnetmap host adapter
Nov 21 15:14:21 sacrifice kernel: 261.468320 [1188] netmap_get_pt_host_na     found parent: vale0:3
Nov 21 15:14:21 sacrifice kernel: 261.468351 [1244] netmap_get_pt_host_na     vale0:3-PTN ptnetmap request DONE
Nov 21 15:14:21 sacrifice kernel: 261.468386 [1035] nm_pt_host_config         rxr: 1 txr: 1 txd: 1024 rxd: 1024
Nov 21 15:14:21 sacrifice kernel: 261.507782 [1050] nm_pt_host_krings_create  vale0:3-PTN
Nov 21 15:14:21 sacrifice kernel: 261.508056 [1106] nm_pt_host_register       vale0:3-PTN onoff 1
Nov 21 15:14:21 sacrifice kernel: 261.508122 [1218] netmap_bdg_ctl            Using vnet_hdr_len 12 for 0xfffff80186ed6800
Nov 21 15:14:21 sacrifice kernel: 261.508170 [1169] netmap_get_pt_host_na     Requesting a ptnetmap host adapter
Nov 21 15:14:21 sacrifice kernel: 261.508228 [1188] netmap_get_pt_host_na     found parent: vale0:1
Nov 21 15:14:21 sacrifice kernel: 261.508261 [1244] netmap_get_pt_host_na     vale0:1-PTN ptnetmap request DONE
Nov 21 15:14:21 sacrifice kernel: 261.508294 [1035] nm_pt_host_config         rxr: 1 txr: 1 txd: 1024 rxd: 1024
Nov 21 15:14:21 sacrifice kernel: 261.544399 [1050] nm_pt_host_krings_create  vale0:1-PTN
Nov 21 15:14:21 sacrifice kernel: 261.544668 [1106] nm_pt_host_register       vale0:1-PTN onoff 1
Nov 21 15:14:21 sacrifice kernel: 261.544700 [1218] netmap_bdg_ctl            Using vnet_hdr_len 0 for 0xfffff80186ed6800
Nov 21 15:14:21 sacrifice kernel: 261.544743 [1218] netmap_bdg_ctl            Using vnet_hdr_len 12 for 0xfffff80004664400
Nov 21 15:14:21 sacrifice kernel: 261.544788 [1218] netmap_bdg_ctl            Using vnet_hdr_len 12 for 0xfffff800048c0400
Nov 21 15:14:21 sacrifice kernel: 261.544838 [1218] netmap_bdg_ctl            Using vnet_hdr_len 0 for 0xfffff80004664400
Nov 21 15:14:21 sacrifice kernel: 261.544891 [1218] netmap_bdg_ctl            Using vnet_hdr_len 12 for 0xfffff801a2773400
Nov 21 15:14:21 sacrifice kernel: 261.544940 [1218] netmap_bdg_ctl            Using vnet_hdr_len 0 for 0xfffff800048c0400
Nov 21 15:14:21 sacrifice kernel: 261.544983 [1218] netmap_bdg_ctl            Using vnet_hdr_len 0 for 0xfffff801a2773400
Nov 21 15:14:21 sacrifice kernel: tap0: link state changed to DOWN
Nov 21 15:14:21 sacrifice kernel: tap1: link state changed to DOWN
Nov 21 15:14:21 sacrifice kernel: tap2: link state changed to DOWN
Nov 21 15:14:21 sacrifice kernel: tap3: link state changed to DOWN
Nov 21 15:14:21 sacrifice kernel: bridge0: link state changed to DOWN

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