From owner-freebsd-net@freebsd.org Tue Nov 22 10:47:43 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2A4CC4F4C1 for ; Tue, 22 Nov 2016 10:47:43 +0000 (UTC) (envelope-from Steven@stream-technologies.com) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0062.outbound.protection.outlook.com [104.47.0.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5B0E1D3A for ; Tue, 22 Nov 2016 10:47:41 +0000 (UTC) (envelope-from Steven@stream-technologies.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=streamtechnologiesuk.onmicrosoft.com; s=selector1-streamtechnologies-com01e; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=srKBBIBhFgEc5QwOUP1PO2yTiX9k4dxXoHLRhhHhmI4=; b=kD6/TszDKs887aiFvvF19bRKgQdcXY2/Vhm8QZMui826WKCgZMHjjXFDQSrjqV5udnRT1JthOYd6KobP3ze7qNW87V+4KrGshNGe8qObTFbctmIHVvzyBQR2BUzG5y+3NTyib9mtp9DqmPk3NHLQHpdEo2d3+vwHZ7OhPqSy1Ak= Received: from DB5PR07MB1685.eurprd07.prod.outlook.com (10.166.13.14) by DB5PR07MB1687.eurprd07.prod.outlook.com (10.166.13.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.5; Tue, 22 Nov 2016 10:31:51 +0000 Received: from DB5PR07MB1685.eurprd07.prod.outlook.com ([10.166.13.14]) by DB5PR07MB1685.eurprd07.prod.outlook.com ([10.166.13.14]) with mapi id 15.01.0747.006; Tue, 22 Nov 2016 10:31:51 +0000 From: Steven Crangle To: FreeBSD Net Subject: Looking for some help with netmap/bhyve Thread-Topic: Looking for some help with netmap/bhyve Thread-Index: AQHSRKuiOapzmKvhI0y8Pcsl7N08/A== Date: Tue, 22 Nov 2016 10:31:51 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steven@stream-technologies.com; x-originating-ip: [212.20.240.118] x-ms-office365-filtering-correlation-id: 5688bba5-d8f6-42f1-124e-08d412c2c5a5 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR07MB1687; x-microsoft-exchange-diagnostics: 1; DB5PR07MB1687; 7:vWNOgQ85ctiJDviRjJZebLA7istIyM0E/LSDzRUOAFBbIQpY+as4mdiOrODd6y6YzyU7kloT6IW93lv8bZhqOk9XsV4ohGnudlmk0sR8DUe8PygBCy1g/6GpAT/9Ug4xQzR9SykF5o0xDY1IeVUAssIkGvYsbqTf+IFFGypEy4RkWcZhZWuYivGbzRTG2QbRnkESeKX3ETFAfnf6xPdTI2ZVwvJYPQTPQtxT6DzBmKoL/0fBcNHfTUg5OmVSRnfbMF4cmAOIXYHnP8xAPlIj11XHzcjM0eiBcjMEK6m/l3FCUGRAyZraRLQ5Y1fVFmzl2r+LlZqeYLcNCAGS1nEhpCbCsrUl09F6euy8hhv8I3+01gChiU6/Cydp4N/VnlV1xNCD/J9TtDoc0yCHZFkdGwG7ReSYEI4VPrppv0HXEeQumCQ8zHtuqJOcnXLAPictMkbdnSX5EZcwovk9dKXraA== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849)(203790808753936)(266611908612381); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040307)(6045199)(6060326)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(6061324)(2016111802025)(6043046); SRVR:DB5PR07MB1687; BCL:0; PCL:0; RULEID:; SRVR:DB5PR07MB1687; x-forefront-prvs: 0134AD334F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916002)(199003)(189002)(5660300001)(2900100001)(106356001)(92566002)(38730400001)(77096005)(105586002)(106116001)(7846002)(74316002)(110136003)(68736007)(33656002)(122556002)(8936002)(7906003)(9686002)(7736002)(861006)(19627405001)(6916009)(6606003)(7696004)(3280700002)(101416001)(76576001)(3660700001)(81156014)(81166006)(102836003)(66066001)(97736004)(3846002)(86362001)(107886002)(8676002)(80792005)(6116002)(575784001)(19273905006)(6506003)(450100001)(50986999)(606004)(189998001)(2906002)(54356999)(87936001)(7099028)(16866105001)(473944003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR07MB1687; H:DB5PR07MB1685.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: stream-technologies.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: stream-technologies.com X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2016 10:31:51.3066 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 720fa073-5781-43bf-bc14-7bef2603ed21 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR07MB1687 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 10:47:43 -0000 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