From nobody Tue Apr 12 00:07:43 2022 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3D6815D66DD for ; Tue, 12 Apr 2022 00:08:01 +0000 (UTC) (envelope-from matt.garber@gmail.com) Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KcmJc2h6Lz4pGK for ; Tue, 12 Apr 2022 00:08:00 +0000 (UTC) (envelope-from matt.garber@gmail.com) Received: by mail-yb1-xb2e.google.com with SMTP id z33so30353576ybh.5 for ; Mon, 11 Apr 2022 17:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d6e2FIix3eLIdB/A9PJ5YbPRpKkrNVhp+edOqiRMXt0=; b=EqzQOwD8aiC2RbrsMcCC/Ml6C5pwmZ8o8GUNKDTAkItljpH5sXFqrW/iPiZ9pDL49U TYTQNm05aH5BS+0yuFK98Hcn1PSFg1eHwVHr5qtkfaPHwQH5TugCuNE1Gn0EZ7JTe10B A56s38dwUYUkiyMBMy1DN8OhGCQOxHYANy71eMQU13CwQc1137JMMTeimB18Pyf3pwoh uMFMuk8vR4v2KeUJKUQEMkL/Tp4L21RMWPyY2+I1rR8UDnc752bCaIcCHXiDieqj/wGy Odf/X5NyYH3z46Y2pgPksJWNcb8lGSUMUJjAYJpyp/1DDNwIzzcJO43qR32uEy+PjRZh nGLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d6e2FIix3eLIdB/A9PJ5YbPRpKkrNVhp+edOqiRMXt0=; b=eWrM4+ORh86X1iWDQcLVQa5E+BCtcxUjTp+0UiR2a2PNWOlITY23PJJLeiZd4+Mb3z 0a0aMAjUZse3c6d9NfP7FNpz2E0xN6j2E2cTNQ0ZUMGhFsOMVG8ZN6yAwlbSWoCPrBUe mzpV3QY0SCmwgW458Cud9AtPm2rsy5L9SV0rJk5HaaCJaxEajE+YDuKUqQsjA8JEXC5O gJ4VKi0F1ukkH3Cs2frKDtDva6b/m8EgxvGosCHboDritUk4uZC1UiZtZx8FM1fT/sK6 O9l4axD5C5SAXwPDuBYZoYLyNX7zVxuEF81Ya1Fm6Pw4+Ke7N/gDpNxtytoLlJjW0pfF yYXA== X-Gm-Message-State: AOAM531p5Z7cWVUlWJvzcdiqk6pQUwJwQkW+Ol/IVHvKRLc0JeDrbtCX EcHedwekgZBqNJPw27+R+84crfK57gsmT/dsD7iAfUpz X-Google-Smtp-Source: ABdhPJxOjMW0GPzUt/++TtSnK4eUQrMUEc+7FVK7JktHNhaGb7wfIwj6WHydeJL8uOR/oTohGfAJhNVTjrRhGcn8vig= X-Received: by 2002:a25:8b81:0:b0:629:17d5:68c1 with SMTP id j1-20020a258b81000000b0062917d568c1mr23028841ybl.449.1649722074261; Mon, 11 Apr 2022 17:07:54 -0700 (PDT) List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Matt Garber Date: Mon, 11 Apr 2022 20:07:43 -0400 Message-ID: Subject: Re: vtnet rxcsum broken for forwarding RELENG_13 ? To: mike tancsa Cc: FreeBSD-STABLE Mailing List Content-Type: multipart/alternative; boundary="00000000000036f02005dc69daf8" X-Rspamd-Queue-Id: 4KcmJc2h6Lz4pGK X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=EqzQOwD8; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mattgarber@gmail.com designates 2607:f8b0:4864:20::b2e as permitted sender) smtp.mailfrom=mattgarber@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b2e:from]; MLMMJ_DEST(0.00)[freebsd-stable]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --00000000000036f02005dc69daf8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 11, 2022 at 7:15 PM mike tancsa wrote: > I was setting up a VM pf firewall and noticed I was not able to nat out > for some reason. Looking at the pcap, it seems when the vm is in > forwarding mode, I get tcp checksum errors. If I do a > > ifconfig vtnet1 -rxcsum > > ifconfig vtnet0 -rxcsum > > nat then seems to work fine > > The setup is a simple VM with the hypervisor libvirt/KVM ubuntu 20 LTS. > Guest is RELENG_13 from Apr 11/2022. If I change to em nics in the VM, > all is fine out of the box. > > > I opened up https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263229 Unless someone knows otherwise, I=E2=80=99ve been under the impression that= PF =E2=80=94 or potentially any of the other FreeBSD firewalls (?), but I use PF =E2=80=94 = has been =E2=80=9Cbroken=E2=80=9D in that regard on Linux KVM-based FreeBSD guests f= or years. As such I=E2=80=99ve always needed to use csum_disable flags on the vtnet inte= rfaces or suffer *extremely* poor network performance, even for servers not doing NAT forwarding. E.g., see: https://serverfault.com/questions/817664/slow-network-fixed-adding-hw-vtnet= -csum-disable-1-what-are-the-posible-side-effe https://forum.proxmox.com/threads/poor-virtio-network-performance-on-freebs= d-guests.26289/ =E2=80=94Matt --00000000000036f02005dc69daf8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Apr 11, 2022 at 7:15 PM mike tancsa <mike@sentex.net> wrote:
I was setting up a VM pf firewall a= nd noticed I was not able to nat out
for some reason. Looking at the pcap, it seems when the vm is in
forwarding mode, I get tcp checksum errors. If I do a

ifconfig vtnet1 -rxcsum

ifconfig vtnet0 -rxcsum

nat then seems to work fine

The setup is a simple VM with the hypervisor libvirt/KVM ubuntu 20 LTS.=C2= =A0
Guest is RELENG_13 from Apr 11/2022. If I change to em nics in the VM,
all is fine out of the box.


I opened up https://bugs.freebsd.org/bugzi= lla/show_bug.cgi?id=3D263229


Unless someone knows otherwise,= I=E2=80=99ve been under the impression that PF =E2=80=94 or potentially an= y of the other FreeBSD firewalls (?), but I use PF =E2=80=94 has been =E2= =80=9Cbroken=E2=80=9D in that regard on Linux KVM-based FreeBSD guests for = years. As such I=E2=80=99ve always needed to use csum_disable flags on the = vtnet interfaces or suffer *extremely* poor network performance, even for s= ervers not doing NAT forwarding.

--00000000000036f02005dc69daf8--