Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp271170pxj; Fri, 14 May 2021 03:06:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9XGQOoPUagDOdzcYeUxItxLa0q41N9fVcBa8PAJeUoRlUjtapLdZ65ih2G6QoUXESlrNK X-Received: by 2002:a05:6638:963:: with SMTP id o3mr33884796jaj.0.1620986768487; Fri, 14 May 2021 03:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620986768; cv=none; d=google.com; s=arc-20160816; b=dd8EaVfPCEbHzMuxF5X+cCeIaflVTNtDG/k7Wd3Hynrb2aPw9wDnglmiVz113E2BfD 6pdM8vV5YRzoA/jpktImMR6kIDNU3xwc73htKJqAp3h21fuUJOM7R86p9m4FdQbCkdw9 Y5A7QUxg68JE9+I0YZnhJ9fPwL3PBc2qOXglwwWz+skYxRkkAxtmd3DRChZTeWE5aZqs jDtNW6ulsPY8UolOiU3cDH5vkB26eaGjXVGXVNA8vDk5jgk7K0TrCYeMclW0ToH5PEny t+ki9bS0LUi/ptq645DUyp5lvrGRBrvEzNgn1eycslRIpzPpGm0XAsIXJf4Hvxy06om2 AVWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vLowYfteA+ucPyvyyoQpMI476zm+fyQH6C5ncpnpK5E=; b=Mhe7C0GzRarW9jn1SFFaqVYow1v7glETiFEvVbQCIaUYTSZ1/dsr+9BavvGLHZ581i uEX8B2+ZiDRlkTRYQAS0KVHrzUNdlcXxVHWmjK03A/b1jOYlfU3huqV6n8UU40d6/3uM dVz/y79Ueyag8ZRF0yRIYWlQGe6ZQ0Rsf0mLLhEd9Hbwyul+nLwP7TPBVRxSEUAdy+14 esjoZgsybqIxMIP06ACYIqKd8Rp9hqJhz704cYlTgOry9xlENkzMMEefriRsdfsd4J/t hNsV5b/1xkWvQyU9EUIJZ1gZxtipj1V88CKnYuF2S8aBekMd7XWeSdSgDAIw+NKShwd6 5nkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@daynix-com.20150623.gappssmtp.com header.s=20150623 header.b=AYk72NwD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si6293518iln.66.2021.05.14.03.05.56; Fri, 14 May 2021 03:06:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@daynix-com.20150623.gappssmtp.com header.s=20150623 header.b=AYk72NwD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233186AbhENHkF (ORCPT + 99 others); Fri, 14 May 2021 03:40:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233169AbhENHkD (ORCPT ); Fri, 14 May 2021 03:40:03 -0400 Received: from mail-oo1-xc31.google.com (mail-oo1-xc31.google.com [IPv6:2607:f8b0:4864:20::c31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC5B5C06174A for ; Fri, 14 May 2021 00:38:52 -0700 (PDT) Received: by mail-oo1-xc31.google.com with SMTP id o202-20020a4a2cd30000b02901fcaada0306so6177200ooo.7 for ; Fri, 14 May 2021 00:38:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vLowYfteA+ucPyvyyoQpMI476zm+fyQH6C5ncpnpK5E=; b=AYk72NwD5Q3AzJdlfMcjSDolwuKh6xqP/rjNsmWzcoa/+Qu5YhHpWqZo1aUKAzLIv0 ICAA1RY7CZXcksq2+uGo33ifQlK7+xMSrYLMazMUNMsBfX/lKtdas+bRz0jNb8NJSDjR NszP6uDYsaA4OsOtdXYMYItno9bQxuGnNdlaY4K9yoBDPoYnHUUzkrQUnANC4uwhD9xn Tb9CSvNHZ0Hs1fSInn+yUEx1YeWrQJ/OQ9zz7buXzDn/+t/nNzZO/qEIdRKrWO8gfsoJ lyWu0gHWooSM67NF0PPyyM34fCoPed4R6XIAotCAvTfb060LzBT7cnKRqqzFw9QwiVFb qe3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vLowYfteA+ucPyvyyoQpMI476zm+fyQH6C5ncpnpK5E=; b=r+a2ArHuG7xfPNnmkNiR8YR0KQGWUSQJwhXrSS66l1/l9F3lEPWWF8KShrEEZJ3HVC 0GRdhjGndjW1Np/9CFDPsiO3veDRqPdcYn9RoGZFIleJsSO5txerUAmypVY1/UUxPK2r J7yGwF6SBCq6H9Glwfj7z0e5GBKBgCDQ2i3fW0nXqIBFy7urIyzkYVEtLOPKy9QZGv4J ++TsYNAMg6RyzpBKkaUtIHtlRf5vkFiGLlUM4OMfAVVu/AJGR38DPz6toalFEGbaBL+e HgsCLm1Qpt2TrvMYtUsPrLO4xCrJXRLAEs7DMyc32fO1Pl1T3apPoMANcx8Ve3UdixJU iriw== X-Gm-Message-State: AOAM533y6/CThWRJdgpX9FRvVJijqUGFNVv/arXmpx46RU9HU4cxJJbV F9eer2uEVEsSWmnnEx4GEiM6xxDixWLFiFkXiuHucw== X-Received: by 2002:a05:6820:100a:: with SMTP id v10mr31723524oor.55.1620977932134; Fri, 14 May 2021 00:38:52 -0700 (PDT) MIME-Version: 1.0 References: <20210511044253.469034-1-yuri.benditovich@daynix.com> <20210511044253.469034-5-yuri.benditovich@daynix.com> <89759261-3a72-df6c-7a81-b7a48abfad44@redhat.com> In-Reply-To: From: Yuri Benditovich Date: Fri, 14 May 2021 10:38:39 +0300 Message-ID: Subject: Re: [PATCH 4/4] tun: indicate support for USO feature To: Jason Wang Cc: Willem de Bruijn , Yan Vugenfirer , davem , Jakub Kicinski , mst , netdev , linux-kernel , virtualization Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 14, 2021 at 10:16 AM Jason Wang wrote: > > On Fri, May 14, 2021 at 4:35 AM Willem de Bruijn > wrote: > > > > > > But surprisingly when TUN receives TUN_F_UFO it does not propagate it > > > > anywhere, there is no corresponding NETIF flag. > > > > > > (It looks like I drop the community and other ccs accidentally, adding > > > them back and sorry) > > > > > > Actually, there is one, NETIF_F_GSO_UDP. > > > > > > Kernel used to have NETIF_F_UFO, but it was removed due to bugs and > > > the lack of real hardware support. Then we found it breaks uABI, so > > > Willem tries to make it appear for userspace again, and then it was > > > renamed to NETIF_F_GSO_UDP. > > > > > > But I think it's a bug that we don't proporate TUN_F_UFO to NETIF > > > flag, this is a must for the driver that doesn't support > > > VIRTIO_NET_F_GUEST_UFO. I just try to disable all offloads and > > > mrg_rxbuf, then netperf UDP_STREAM from host to guest gives me bad > > > length packet in the guest. > > > > > > Willem, I think we probably need to fix this. > > > > We had to add back support for the kernel to accept UFO packets from > > userspace over tuntap. > > > > The kernel does not generate such packets, so a guest should never be > > concerned of receiving UFO packets. > > That's my feeling as well. > > But when I: > > 1) turn off all guest gso feature and mrg rx buffers, in this case > virtio-net will only allocate 1500 bytes for each packet > 2) doing netperf (UDP_STREAM) from local host to guest, I see packet > were truncated in the guest Is it possible that the virtio-net does not disable UFO offload? IMO it sets NETIF_F_LRO too bravely. > > > > > Perhaps i'm misunderstanding the problem here. > > > > I will re-check and get back to you. > (probably need a while since I will not be online for the next week). > > Thanks >