From owner-freebsd-questions@freebsd.org Fri Mar 20 09:16:45 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1C882600D3 for ; Fri, 20 Mar 2020 09:16:45 +0000 (UTC) (envelope-from ole@free.de) Received: from smtp.free.de (smtp.free.de [91.204.6.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48kJ7J4RMGz3GD3 for ; Fri, 20 Mar 2020 09:16:44 +0000 (UTC) (envelope-from ole@free.de) Received: from bard (x2f4242c.dyn.telefonica.de [2.244.36.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.free.de (Postfix) with ESMTPSA id E1C0C9CD26; Fri, 20 Mar 2020 10:16:41 +0100 (CET) Date: Fri, 20 Mar 2020 10:16:37 +0100 From: Ole To: freebsd-questions@freebsd.org Subject: [solved] Re: Bhyve: virtio-net very slow with FreeBSD 12.0 Host Message-ID: <20200320101637.29ca7ef0.ole@free.de> In-Reply-To: <20190205150522.635b9e34.ole@free.de> References: <20190205150522.635b9e34.ole@free.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/oOiWO0fwRl7PKGCOa3fN4BB"; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 48kJ7J4RMGz3GD3 X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ole@free.de designates 91.204.6.103 as permitted sender) smtp.mailfrom=ole@free.de X-Spamd-Result: default: False [-7.03 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.935,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[free.de]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.98)[-0.981,0]; IP_SCORE(-3.71)[ip: (-9.76), ipnet: 91.204.4.0/22(-4.88), asn: 31371(-3.90), country: DE(-0.02)]; RCVD_IN_DNSWL_NONE(0.00)[103.6.204.91.list.dnswl.org : 127.0.10.0]; MID_CONTAINS_FROM(1.00)[]; SIGNED_PGP(-2.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[44.36.244.2.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:31371, ipnet:91.204.4.0/22, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2020 09:16:45 -0000 --Sig_/oOiWO0fwRl7PKGCOa3fN4BB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello, just for the record: There is also a Bug Report documenting this https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242894 It seems, there is a Bug in the hardware vlan tag processing.=20 I can solve the problem if I configure the interface with -vlanhwtag on the host before starting the rest. (via rc.conf) Thanks to Mike who gave me this hint Ole=20 Tue, 5 Feb 2019 15:05:22 +0100 - Ole : > Hello, >=20 > I discovered that virtio-net very slow with FreeBSD 12.0 Host. And > with very slow I mean 16 kBit/s. >=20 > I can't exclude that there is a problem in my setup. But I created two > very similar setups. One with FreeBSD 11.2 and one with 12.0. The > server with 11.2 has no problem. >=20 > Either I do something really wrong or there is a Bug in the > virtio-net. >=20 >=20 > Both Servers are connected to a switch, the IPs of the VMs are in the > vlan 4030. The Bhyve VMs are mangaed by vm-bhyve (master from > github).=20 >=20 > Bridges are created by rc.conf: >=20 > # Vlans > vlans_em0=3D"030" > ifconfig_em0_4030=3D"mtu 1400 up" >=20 > # Bridges > cloned_interfaces=3D"bridge0" > ifconfig_bridge0=3D"addm em0.4030 mtu 1400 up" >=20 > switch definition: >=20 > switch_list=3D"vm-net" > type_vm-net=3D"manual" > bridge_vm-net=3D"bridge0" >=20 > VM config: >=20 > loader=3D"bhyveload" > cpu=3D7 > memory=3D40G > network0_type=3D"virtio-net" > network0_switch=3D"vm-net" > disk0_type=3D"virtio-blk" > disk0_name=3D"disk0" > disk0_dev=3D"sparse-zvol" >=20 >=20 > vm creation: >=20 > vm create -t test-host -i FreeBSD-12.0-RELEASE-amd64.raw > test-example-com vm start test-example-com >=20 > Network setup (on the VM): >=20 > root@freebsd:~ # ifconfig vtnet0 xx.xx.xx.xx/28 mtu 1400 > root@freebsd:~ # route add default yy.yy.yy.yy >=20 > could someone help me to figure out if this is a Bug, and if yes > where it is? >=20 > Thanks > Ole --Sig_/oOiWO0fwRl7PKGCOa3fN4BB Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE60BGd7KVfL83NXCUJZaRRqjklFAFAl50ifUACgkQJZaRRqjk lFA/CxAAqJj8oNkCyMDcpEU4m8033hOBc1Nxdq3cQng5yJi7vo9ua6+enmp7zG+U y5HCiK/9yAjgUKUEpREea5aPP6siLkkyXPHuZ6eJmqOReczKXyONb2NI39wEye2N bmpK6LLOATy9+jlXewHP14cv059dvzl6XL9sBMy/seZQbwU/mIuOYmVf04699TRK XdjybFqEC16hWjUP9CfpI550m68Gk+qE0OyqRBULIVqu3/GEW8SZTr0ivxnML9K5 7bSadRbOMVT0urxJJWXoEMuWR48d92sUVvuVrFKOEvNOalxJhA4gJ0Mw0xdl5Vsi bHED2iQNaqIIrDZ9cHoVMhuiENCxmzsnbTwbh8qg3hav1TpJXOyp/lKB58YeyreV IjFsv9WEGX/Z04eyFxhA2cjtiJSy7HkAJKL2/U+A0zGhbcVRYdFr2IdH4xMqzttu WR1d9ugZJ4CWA0LtQcMIeGdHctuc2bcexAFtMgPHlwy0Eq1dwX6vu3ka4oKG6zPK NoRvxS0SKWlt/N8sKNEyeRG+T8O43jS01nvzfjYoru9usCMy2ok8e2Qms0SpU53a OoU6eVcHs8VDtQTcw3PCpMLjxFt8RTG3Z8GVbMpJcT/yD1xtsE6EvPdKkYv2y0KV sqkj2Uyt8Z0AYqQDdyBeIoOxsefUcucdCgDWsRFHpZttfc3wFlQ= =vDmn -----END PGP SIGNATURE----- --Sig_/oOiWO0fwRl7PKGCOa3fN4BB--