From owner-freebsd-bugs@freebsd.org Wed Mar 17 18:07:23 2021 Return-Path: Delivered-To: freebsd-bugs@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 EF6D85736F0 for ; Wed, 17 Mar 2021 18:07:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4F0ymW6GdQz4qdc for ; Wed, 17 Mar 2021 18:07:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id D737F573B8D; Wed, 17 Mar 2021 18:07:23 +0000 (UTC) Delivered-To: bugs@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 D7003573BDB for ; Wed, 17 Mar 2021 18:07:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F0ymW5gklz4qYm for ; Wed, 17 Mar 2021 18:07:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5E9C13851 for ; Wed, 17 Mar 2021 18:07:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 12HI7NnP010324 for ; Wed, 17 Mar 2021 18:07:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 12HI7NQN010323 for bugs@FreeBSD.org; Wed, 17 Mar 2021 18:07:23 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 254366] Severe IPv6 TCP transfer issues on 13.0-RC2 with virtio network adapter Date: Wed, 17 Mar 2021 18:07:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: michael@esosoft.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2021 18:07:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254366 Bug ID: 254366 Summary: Severe IPv6 TCP transfer issues on 13.0-RC2 with virtio network adapter Product: Base System Version: 13.0-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: michael@esosoft.com Created attachment 223365 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D223365&action= =3Dedit default virtio iperf3 speed ipv6 FreeBSD 13.0-RC2 I installed FreeBSD 13.0-RC2 on some of my database virtual machines using = the VirtIO network adapter. The VMs only use IPv6. After the upgrade MySQL thre= ads kept filling up with data waiting to be sent. The same setup worked flawles= sly with 12.2. Upon investigation I noticed that the IPv6 transfer speed from t= he VM to any other device is in the range of 46Kbps. Usually it is 15-20Gbps f= rom VM to VM on the same bare metal machine. If IPv4 is used no issues at all on FreeBSD 13.0-RC2. This issue was also recently discussed on the freebsd-net list under the "severe ipv6 tcp transfer issues" subject. The problem can be easily reproduced by setting up two virtual machines run= ning the default FreeBSD 13.0-RC2 release candidate. (Note the problem already exists in BETA4). Configure the network device using virtio and setup IPv6.= Run a simple iperf3 session from VM to VM on IPv6 and the slowness shows up eve= ry time in both directions. I tested it with virt-manager as well as using Pro= xmox and both show that issue. A quick fix was to issue ifconfig vtnet0 -tso6. That brings transfer speeds back to acceptable levels in the Gbps range. However it is still much slower for vm-vm-same-host than IPv4. About 4Gbps on IPv6 vs 15-20Gbps IPv4. FreeB= SD 12.2 has the same 15-20Gbps speed IPv4/IPv6. My thoughts were that the recent virtio changes committed by Bryan Venteich= er were the culprit. I started bisecting the changes submitted 2021-01-19. After building a few kernels it is the following commit causing the issue: 475a60aec7e if_vtnet: Misc Tx path cleanup review D27926 Building a kernel without that commit brings back IPv4/IPv6 on the same lev= el as before. Not much of kernel geek so I'm not sure what part of the code is causing the problem to show up in IPv6 only. Attached are a couple iperf3 & ifconfig commands to show the slowness. If anything else is needed, please let me know, but all you need is stock Free= BSD 13.0-RC2 VM using virtio and ipv6. --=20 You are receiving this mail because: You are the assignee for the bug.=