From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f54.google.com (mail-pg0-f54.google.com [74.125.83.54]) by dpdk.org (Postfix) with ESMTP id 8FCAB7D56 for ; Wed, 23 Aug 2017 18:41:28 +0200 (CEST) Received: by mail-pg0-f54.google.com with SMTP id s14so2294254pgs.1 for ; Wed, 23 Aug 2017 09:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pHt446j7KsqJhqdVos5FeEi6HiiDLk+4+G/bFOyDRY4=; b=sWxl6pwiT49zQ5xqAl5ayHrzv+iGUSfOa8enN3bAulgi6GqQfsWLvU4XIvoqalny4v iT3kiSuIeirFAv8JVwGQWqshGz/AhhsFWICdlRlKLj5BtzM1OsiwahfqehA6aiAVTwno o3nxM5iG6Yf/8d4P/Hy9n6Zh8gQ8tRlDB4h1vXcGlk0i2TB5etgv31RNvNNv0Ct001UW XY3YxO+U/QJXn28kWEA8Qe6xhBu9B/vvgfGCnWskSqrMM20pF9fRa7IR5YpsWC3rNrlN OgYzNenfutekyorur+TrHBRMAb9mUQJAYLgj164vxnjk1QcpA+/15plTFVXSbbMEFP8y rV4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pHt446j7KsqJhqdVos5FeEi6HiiDLk+4+G/bFOyDRY4=; b=tEslznFgqGxAXek9ZbkrCzioY3Q2t1ERqw2fpboqTxrSZ0QFcTAE4o93uVHidmPFe4 AMXqCthpo7yAal5DtrIf0/bQzqKignpnfiMV4d45LoWGHabQ05HSn/UzQRHxytnAppv7 /YWJ6yUUY0VXcYOGDOpT4N9oDcC1VcUMRuq4kPCWZNnddk5V75uUXWUtd04NFRWA9Vwr 2klWbr0iBX4lHhLK46M8ZOwLHc9Bh4Z0PaE1jHY2MJMoUEPhji0gKErPdx69VPoNPVto 3/CigNvodcprkYK7i2Ec2/woptOg+JdNbn2EsYdC4kggndi1MKQIaBVRzgGOo35sMxcs kODA== X-Gm-Message-State: AHYfb5hDGSwpyLV81yshToKT9CZ9q86V0rgq63/ubPWhNz/ZOOwEcGvC fwgtNDFoFooiuMCu X-Received: by 10.98.236.212 with SMTP id e81mr3467558pfm.162.1503506487687; Wed, 23 Aug 2017 09:41:27 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id q7sm3741060pgr.54.2017.08.23.09.41.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Aug 2017 09:41:27 -0700 (PDT) Date: Wed, 23 Aug 2017 09:41:19 -0700 From: Stephen Hemminger To: Olivier MATZ Cc: Yuanhan Liu , maxime.coquelin@redhat.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20170823094119.7aaa6468@xeon-e3> In-Reply-To: <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> <20170823161443.xit25v2thrfv4hhm@glumotte.dev.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 0/2] virtio fix false offload claims X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2017 16:41:29 -0000 On Wed, 23 Aug 2017 18:14:44 +0200 Olivier MATZ wrote: > 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. You are right, I forgot that there now is way to indicate unknown for checksums. Before that it was limited good/bad. Let's revert both these patches, and update the documentation?