From owner-freebsd-net@freebsd.org Thu May 28 19:38:12 2020 Return-Path: Delivered-To: freebsd-net@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 E73782FBAB1 for ; Thu, 28 May 2020 19:38:12 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49XyfX5sGXz42tg for ; Thu, 28 May 2020 19:38:12 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: vmaffione) by smtp.freebsd.org (Postfix) with ESMTPSA id BE8DF27986 for ; Thu, 28 May 2020 19:38:12 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: by mail-qt1-f178.google.com with SMTP id g18so1030069qtu.13 for ; Thu, 28 May 2020 12:38:12 -0700 (PDT) X-Gm-Message-State: AOAM530th4cKAq7X5OE2LJshDpZKqFxvVZfFWa0qaLkjilJS5ssi0czx foFMnzkn8OXv7Jnx69NklBF6/H3duPfSehfu/zc= X-Google-Smtp-Source: ABdhPJwk90ggj4O7clKVc9u0D99Wi3A6LPi2urA3OUtrho4b9I2qUXjZ4ZDcazOFLUWew+1GB8nIYJVWzjJ94e1hdEg= X-Received: by 2002:aed:3fd4:: with SMTP id w20mr4766334qth.350.1590694692074; Thu, 28 May 2020 12:38:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Vincenzo Maffione Date: Thu, 28 May 2020 21:38:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Netmap - Vale switch - tcp problem To: Anthony Arnaud Cc: Luigi Rizzo , "freebsd-net@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 19:38:13 -0000 Hi, I was trying to reproduce your problem (same FreeBSD release as yours). It looks like there is some sort of bad interaction with LRO. Starting from a fresh boot, if you keep lro enabled, e.g. # ifconfig vtnet0 -txcsum -rxcsum -tso4 -tso6 # vale-ctl .... then I experience no problem (TCP works between vtnet0 and the host, tcpdump on vtnet0 works as expected). As soon as you disable LRO: # ifconfig vtnet0 -lro both TCP and tcpdump stop working. If I enable LRO again, TCP restarts working, but tcpdump doesn't. I need to reboot the machine to fix it. Btw, creating vi0 (persistent VALE port) is not relevant for this test. You may as well use ephemeral VALE ports (e.g. run pkt-gen -i vale0:1 -f rx). I will have a look at the LRO issue asap. In the meantime you could avoid disabling LRO and see if that works for you. Cheers, Vincenzo Il giorno gio 28 mag 2020 alle ore 17:16 Anthony Arnaud < antho.arnaudisce@gmail.com> ha scritto: > I already disabled the checksum, the vtnet config is: > > ifconfig vtnet1 -txcsum -rxcsum -tso4 -tso6 -lro -txcsum6 -rxcsum6 -vlanmtu > -vlanhwtag -vlanhwfilter -vlanhwtso -vlanhwcsum up promisc > > vtnet1: > flags=28943 metric > 0 mtu 1500 > options=1800a8 > ether 0e:bd:ec:7a:08:06 > media: Ethernet 10Gbase-T > status: active > nd6 options=29 > > Sorry for not having posted vtnet config before. > PS: VLAN_HWCSUM is not switchable off for some reason! > the problem is not that. > > Cheers > Anthony > > > > > Il giorno gio 28 mag 2020 alle ore 16:05 Luigi Rizzo > ha scritto: > > > > > > > On Thursday, May 28, 2020, Anthony Arnaud > > wrote: > > > >> Hi everyone! > >> I would like to create a vale switch with an interface attached with the > >> host stack and some virtual. > >> My env is a VM with FBSD-12.1 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 > >> GENERIC amd64 > >> and VirtIO support. > >> > >> I performed: > >> > >> vale-ctl -h vale0:vtnet1 > >> vale-ctl -n vi0 > >> vale-ctl -a vale0:vi0 > >> > >> 615.925514 bdg_ctl [149] bridge:0 port:0 vale0:vtnet1 > >> 615.925559 bdg_ctl [149] bridge:0 port:1 vale0:vtnet1^ > >> 615.925572 bdg_ctl [149] bridge:0 port:2 vale0:vi0 > >> > >> vtnet1 is configured as mirror port. > >> But if: > >> > >> tcpdump -i vtnet1 > >> or > >> tcpdump -i vale0:vi0 > >> > >> why can't I see any TCP packets? > >> UDP and ICMP packet are ok. > >> > >> Without vale switch tcpdump show all TCP packets correctly. > > > > > > You have to disable checksum offloading on vtnet1. > > > > Cheers > > Luigi > > > > It is a bug? > >> Thanks to all! > >> > >> _______________________________________________ > >> freebsd-net@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-net > >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >> > > > > > > -- > > -----------------------------------------+------------------------------- > > Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione > > http://www.iet.unipi.it/~luigi/ . Universita` di Pisa > > TEL +39-050-2217533 . via Diotisalvi 2 > > Mobile +39-338-6809875 . 56122 PISA (Italy) > > -----------------------------------------+------------------------------- > > > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >