From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id A9D777D3A; Wed, 23 Aug 2017 18:14:53 +0200 (CEST) Received: from core.dev.6wind.com (unknown [10.0.0.1]) by proxy.6wind.com (Postfix) with ESMTPS id A477AC5980; Wed, 23 Aug 2017 18:11:54 +0200 (CEST) Received: from [10.16.0.195] (helo=6wind.com) by core.dev.6wind.com with smtp (Exim 4.84_2) (envelope-from ) id 1dkYIm-0001g8-Ta; Wed, 23 Aug 2017 18:14:45 +0200 Received: by 6wind.com (sSMTP sendmail emulation); Wed, 23 Aug 2017 18:14:44 +0200 Date: Wed, 23 Aug 2017 18:14:44 +0200 From: Olivier MATZ To: Stephen Hemminger Cc: Yuanhan Liu , maxime.coquelin@redhat.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20170823161443.xit25v2thrfv4hhm@glumotte.dev.6wind.com> References: <20170707195250.22259-1-stephen@networkplumber.org> <20170708031222.GA11626@yliu-home> <20170823093025.bhjwbygfyz4ifd6r@glumotte.dev.6wind.com> <20170823083135.67193f91@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170823083135.67193f91@xeon-e3> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 0/2] virtio fix false offload claims X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2017 16:14:53 -0000 On Wed, Aug 23, 2017 at 08:31:35AM -0700, Stephen Hemminger wrote: > On Wed, 23 Aug 2017 11:30:26 +0200 > Olivier MATZ wrote: > > > Hello, > > > > On Sat, Jul 08, 2017 at 11:12:22AM +0800, Yuanhan Liu wrote: > > > On Fri, Jul 07, 2017 at 12:52:48PM -0700, Stephen Hemminger wrote: > > > > While doing code for Hyper-V, noticed that the virtio driver was > > > > confused about receive versus transmit offloads. The virtio > > > > checksum offload is L4 (TCP/UDP) only, not IPv4. Also, TSO > > > > and LRO are not the same. > > > > > > > > This may break some program that was assuming it was getting offloads > > > > that it wasn't. > > > > > > Applied to dpdk-next-virtio. > > > > > > And I think they should be backported to stable releases, thus, > > > > > > Cc: stable@dpdk.org > > > > > > Thanks. > > > > > > --yliu > > > > > > > > Stephen Hemminger (2): > > > > virtio: don't falsely claim to do IP checksum > > > > virtio: don't claim to support LRO > > > > > > > > drivers/net/virtio/virtio_ethdev.c | 30 +++++------------------------- > > > > 1 file changed, 5 insertions(+), 25 deletions(-) > > > > > > > > -- > > > > 2.11.0 > > > > I think these 2 commits break the virtio offload, which can be tested as > > described in this test plan: > > http://dpdk.org/ml/archives/dev/2016-October/048092.html > > > > First, about checksum: the description of rxmode->hw_ip_checksum is: > > > > hw_ip_checksum : 1, /**< IP/UDP/TCP checksum offload enable. */ > > > > So, while I agree the name is not well chosen, it is valid to set it > > for virtio to enable L4 checksum. > > > > Then about LRO: setting rxmode->enable_lro is a way to tell the host that the > > guest is ok to receive tso packets. From the guest point of view, it is like > > enabling lro on a physical driver. Again, it is valid and useful to do this. > > > > Before removing these features, it would have been nice to have a quick look at > > the commits that introduced them. > > I am ok with keeping LRO as long as the documentation changed. And virtio > driver did some enforcement. > > For checksums, the hw_ip_checksum flag either needs to be more fine grain (IP, UDP, TCP) > which would be best, or virtio would have to check IP checksum in software. > For checksum, yes, the rxconf should be more fine-grained and renamed. But apart from the name which is confusing, it was not wrong. Setting hw_ip_checksum=1 means: "allow the driver to return packets with checksums flags != unknown". These flags are good,bad,unknown,none for both l3 and l4. So virtio driver always return unknown for l3, and none|unknown|good|bad for l4, depending on what the host passed.