From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23EA8C433ED for ; Thu, 13 May 2021 20:35:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E7D316121E for ; Thu, 13 May 2021 20:35:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233090AbhEMUgv (ORCPT ); Thu, 13 May 2021 16:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233056AbhEMUgu (ORCPT ); Thu, 13 May 2021 16:36:50 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B83AC061574 for ; Thu, 13 May 2021 13:35:40 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id l4so41666859ejc.10 for ; Thu, 13 May 2021 13:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4OSP4b7wpVi2J0VIXLzXQpYaouwViNp+zix3X51TtRM=; b=jULfFAQdup+JfQHyGNJe5gViVXOpfKZCPJbE4aABtwAQlIyYMLruaAymHorBENW7LV 6pvAO2R4lC6uUDYEOkb2xu40DTKaKml5fQajfG2EmM0hS3O2NAa5kfec62L5iXXKfqk8 mqweY9rc4duXqwNVSuQ00GtNYGEYr+fgr50a0i+d39Y7eXE6EO6UN/Kj22auNPrFs0wM srFbcdTcD2IwBZ/hLxi0+ZbitC9kx2/VlUk8HznczXbBSgHNbdP+GYBk/XrDDqgDpbS6 F8hKcswHBIqwzalmTMSBhA24UZj/r8952Si6xy8qs1KARhQWn9VNADNoH33CF1+R40hc eWSw== 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=4OSP4b7wpVi2J0VIXLzXQpYaouwViNp+zix3X51TtRM=; b=UitiXl+WOyl7GA7xrJg2TQFYWS7AoJiucBxPUFY5XXAlpsP72MPLO/g2Gb7IjLGZEY WL1Vq72u+eR9uwH+EVq8KUdxHfRjz3IDg1fQHDXMCi0ycc+WCZ2rWHD3ixtLHLYWl2yy kprwnUOB1+J7Qix5ExbROTpX5QLFUxHYl0mzsjWjPCTNOaokCc4bBaCRRimC8kh52mw/ GBqjFuvCHz/WFaI/+01JEAEnLvVMiXpbjEtvYEYig24ofA8DsB/tin1USrov6GRlpZxf AqRNtEzK76cTwhFD4eaMSxE3/8cwGFJGJiEslO7kBMgeYPas6N+Rmw0pS0UH3eziVrzr zBqQ== X-Gm-Message-State: AOAM532KmWdOQjS+zOwnVsLSb3LtDkLUB5NpQxb0bizcwzFcyMnRoKWS Om5cEmwllMkRUbCxgtJ3jE1McV6kT6SYLQ== X-Google-Smtp-Source: ABdhPJz/hvawcXZuyUTopONAwxBFP1SLf6l54sy/fiYe3Jbm39W43leNUa2sGo+CQ0JoNQmTKPv5og== X-Received: by 2002:a17:906:14c1:: with SMTP id y1mr46567490ejc.481.1620938138493; Thu, 13 May 2021 13:35:38 -0700 (PDT) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com. [209.85.128.51]) by smtp.gmail.com with ESMTPSA id hz15sm2376001ejc.57.2021.05.13.13.35.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 May 2021 13:35:36 -0700 (PDT) Received: by mail-wm1-f51.google.com with SMTP id y124-20020a1c32820000b029010c93864955so401255wmy.5 for ; Thu, 13 May 2021 13:35:35 -0700 (PDT) X-Received: by 2002:a7b:c94b:: with SMTP id i11mr34607045wml.120.1620938135207; Thu, 13 May 2021 13:35:35 -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: Willem de Bruijn Date: Thu, 13 May 2021 16:34:57 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] tun: indicate support for USO feature To: Jason Wang Cc: Yuri Benditovich , Yan Vugenfirer , davem , Jakub Kicinski , mst , netdev , linux-kernel , virtualization , Willem de Bruijn Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > 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. Perhaps i'm misunderstanding the problem here. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD018C433B4 for ; Thu, 13 May 2021 20:35:47 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FC726121E for ; Thu, 13 May 2021 20:35:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FC726121E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id CAFEA4033A; Thu, 13 May 2021 20:35:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JwICOoqaDCTT; Thu, 13 May 2021 20:35:45 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTP id 2FA3D402EF; Thu, 13 May 2021 20:35:45 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 00BCEC000D; Thu, 13 May 2021 20:35:45 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 62381C0001 for ; Thu, 13 May 2021 20:35:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3BCD04033A for ; Thu, 13 May 2021 20:35:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G688UdLvVnnS for ; Thu, 13 May 2021 20:35:41 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by smtp4.osuosl.org (Postfix) with ESMTPS id E53964038A for ; Thu, 13 May 2021 20:35:40 +0000 (UTC) Received: by mail-ej1-x62b.google.com with SMTP id k10so10433916ejj.8 for ; Thu, 13 May 2021 13:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4OSP4b7wpVi2J0VIXLzXQpYaouwViNp+zix3X51TtRM=; b=jULfFAQdup+JfQHyGNJe5gViVXOpfKZCPJbE4aABtwAQlIyYMLruaAymHorBENW7LV 6pvAO2R4lC6uUDYEOkb2xu40DTKaKml5fQajfG2EmM0hS3O2NAa5kfec62L5iXXKfqk8 mqweY9rc4duXqwNVSuQ00GtNYGEYr+fgr50a0i+d39Y7eXE6EO6UN/Kj22auNPrFs0wM srFbcdTcD2IwBZ/hLxi0+ZbitC9kx2/VlUk8HznczXbBSgHNbdP+GYBk/XrDDqgDpbS6 F8hKcswHBIqwzalmTMSBhA24UZj/r8952Si6xy8qs1KARhQWn9VNADNoH33CF1+R40hc eWSw== 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=4OSP4b7wpVi2J0VIXLzXQpYaouwViNp+zix3X51TtRM=; b=IVEE6qKGGn8tCcIXll6KYUTSrXibBEIR5GPPQ19IVMx9U8CW4u/udMbWcF8X1x6ehs sBZckiYZ8JOGydut1kPeE+RLz2ApOnYAJkwfSvL6mlFfyuqjPv92x/trpz3e0A7OyFFp /3Qoi2X3C56HV0AHbRFMPE0NyAjC3eqnmz50eFTpFVEhKQQlY+SRDwe+T5jIsYY+FRiF YgmGmzwaDyPj9GlG9TCgHzfx9Ic+fFfNyp0drTZyBMHIMPbTCo7yVMPjIMBRPSnRBGSP 5PXXMi76yLvK59OxfbE34V4R1zMocRoHxj9T7tmfdfELaMcOMC3IECfc45avHgWrgWLU 0uLg== X-Gm-Message-State: AOAM532AcSROmeSxFyK6PaaSqhtnoaz5muJqGBnhnKKPW8Z9fcAIHtXN n/so3AmGs3t8jRTjLCASG4/QeykiWQ/xlQ== X-Google-Smtp-Source: ABdhPJy2F/8pEwXhPCV86pPS+fyOEa3QPGLB+4Nbu1YhuMllSlau+ha9LHN+pEn02TfoSLk76aWYKg== X-Received: by 2002:a17:907:3f1c:: with SMTP id hq28mr44739880ejc.349.1620938138769; Thu, 13 May 2021 13:35:38 -0700 (PDT) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com. [209.85.128.48]) by smtp.gmail.com with ESMTPSA id b9sm3169334edt.2.2021.05.13.13.35.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 May 2021 13:35:36 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id 82-20020a1c01550000b0290142562ff7c9so447810wmb.3 for ; Thu, 13 May 2021 13:35:35 -0700 (PDT) X-Received: by 2002:a7b:c94b:: with SMTP id i11mr34607045wml.120.1620938135207; Thu, 13 May 2021 13:35:35 -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: Willem de Bruijn Date: Thu, 13 May 2021 16:34:57 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] tun: indicate support for USO feature To: Jason Wang Cc: Willem de Bruijn , mst , netdev , linux-kernel , virtualization , Yuri Benditovich , Yan Vugenfirer , Jakub Kicinski , davem X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" > > 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. Perhaps i'm misunderstanding the problem here. _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization