Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3294365pxk; Mon, 7 Sep 2020 08:45:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzqTbyYPt6ra83b4bGyfSnz9Fx9Ngk1vUM5cLmXCiD2/p0R1obA286oIHpTltOeF4OrMdt X-Received: by 2002:a17:906:37c1:: with SMTP id o1mr21460787ejc.279.1599493519777; Mon, 07 Sep 2020 08:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599493519; cv=none; d=google.com; s=arc-20160816; b=IxFufKhK+qTePLQQ11Wrv1FRJsiVj73yCo4LY8h4l0lphP0IKlSxmqnoIavgq+CADL XTXxG0I5wW3gOJXUx/6qHzqmmoMKy7uBkUTTHlsZBOnNVYnyyIyG6IN6WjUzk/pCG4Y+ nPDKt+1lkjCjqSAxGVFxz6uEC08TW0V0FvKOkUHURyHTtBpdjUh7CWTw3FcLFmZAYgjL v1w4A4djisU6aIECsKueVT5kB+WjYcoWTA1iXjktntZm3vJeVB5A1msNWlaaElwWn+US nwYyKuYfIZD3+nE7xndZvj59fQIKCVNZr3mSzPn3bV9abSzB0dkHMk/Hb6578BvFCbgR Io1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=nJEsEWjWRZObVJF4DyxZILWVHWpY6Co2ImRdKDFB6Bk=; b=T3y3lhvN3TUlHB7InqnNLUd3I/XDJuxeP/JyXAEhPX1OyFEcy4HQXstfS5V3aX0qlG 3NvSnZ1Mwi4cSPnnttWz0CPyXDEoAr7tMgOhtoC18Y7tx423dLTWjr3E7wWfuHJNGF+v Z7dep3v/BBdVvyqr4fqA5frz4EoRF2Nz7HfuPrbIJfkdtlKrQORsW54qJrTLw5djA32J IgswVjFdrwkYObJ51N8tEhs8KPK4siF5g7E/iLk8+YQgtEK+kLlV3BYv1IagV9S5bjIG Bu+divbgDnLMjWXf2NP0wcgJwPNCJCuf3OA8qIIuUER4lXbkQEawrIPZXPAYPVTgMk+m MD8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Rmd0HzKE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si6510865ejg.341.2020.09.07.08.44.57; Mon, 07 Sep 2020 08:45:19 -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=@gmail.com header.s=20161025 header.b=Rmd0HzKE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730065AbgIGPj5 (ORCPT + 99 others); Mon, 7 Sep 2020 11:39:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729925AbgIGPgh (ORCPT ); Mon, 7 Sep 2020 11:36:37 -0400 Received: from mail-ua1-x941.google.com (mail-ua1-x941.google.com [IPv6:2607:f8b0:4864:20::941]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FEA8C061573 for ; Mon, 7 Sep 2020 08:36:29 -0700 (PDT) Received: by mail-ua1-x941.google.com with SMTP id l1so4256168uai.3 for ; Mon, 07 Sep 2020 08:36:29 -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=nJEsEWjWRZObVJF4DyxZILWVHWpY6Co2ImRdKDFB6Bk=; b=Rmd0HzKEhIYWj4J0+ibVku7J26nrdN7aK/pIQ5FwuU+LGlR797B1TVsy0Nn8QC3JoE sQCrtCQxeOYzHfyZPBDBdk/aH9ZL8wgJhgnKbNJMVpxK76oXl2mu4RbUixYjke0kQ6B4 7+ukuVyPkqyHD8iWKJlOojYj9GQLZwiqIhpprzIq2dh4YVrCiGyCfAkT1cSkReyJOc0+ 4Dn+QZbIgHOBVHxeDhl3FazNXEkLOScRWu+/YR9LZNTM3pU02c8jeT5l4dhpODuJbMAL D/SfkC2vIbbt6wBqh/p1/AKsQ4L1CIzC0aq2/1K3p6VHBHVlxvNUeYNM4/Q/IESfHskU XPtA== 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=nJEsEWjWRZObVJF4DyxZILWVHWpY6Co2ImRdKDFB6Bk=; b=G/sxjTOa1Ad5/WxbRZA8cSB7gDqVVtp47CKHS35TVAVM+EL6upwUx0zA/bVUsAJ6bJ 60oLNDIe5ySggC/nIwyFOC6Tdxm7ZUMBnJFTKPCkvclrkKAH2KL4vgivW8CzsfUZefd+ lpobINIA2WTNI4bfHtimIF96F/ziVrrV41A/3KddJlC0AMj7IXyINMW8kVY7ipvl86Fr rjplISHQgHks6qXiyU94MUtLiaEm8qE1GC5/hlRkbqGuA+1s4XgBdSInSLsTwvSjKdPT QOs4Ih3Gx7l/lD+Q+oCNN7TmSfMc5V6BC6/dG339RTdUoazI/n1kRTwawkyV81WXJKi4 U4kg== X-Gm-Message-State: AOAM531ZTcPLGG2MCEEncSpKkMuL3hqvkTCzVDtqzFE1PlIWDumPkiOn 43coVTkkGERmIhTSB99kkCDpDe9Letz4yA== X-Received: by 2002:ab0:4041:: with SMTP id h59mr8514866uad.19.1599492987542; Mon, 07 Sep 2020 08:36:27 -0700 (PDT) Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com. [209.85.222.53]) by smtp.gmail.com with ESMTPSA id 7sm2434664vks.48.2020.09.07.08.36.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Sep 2020 08:36:26 -0700 (PDT) Received: by mail-ua1-f53.google.com with SMTP id v5so4035925uau.10 for ; Mon, 07 Sep 2020 08:36:26 -0700 (PDT) X-Received: by 2002:ab0:60d7:: with SMTP id g23mr11098331uam.122.1599492985684; Mon, 07 Sep 2020 08:36:25 -0700 (PDT) MIME-Version: 1.0 References: <1599286273-26553-1-git-send-email-tanhuazhong@huawei.com> <20200906114153.7dccce5d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <126e5424-2453-eef4-d5b6-adeaedbb6eca@huawei.com> In-Reply-To: <126e5424-2453-eef4-d5b6-adeaedbb6eca@huawei.com> From: Willem de Bruijn Date: Mon, 7 Sep 2020 17:35:48 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next 0/2] net: two updates related to UDP GSO To: tanhuazhong Cc: Willem de Bruijn , Jakub Kicinski , David Miller , Network Development , linux-kernel , salil.mehta@huawei.com, yisen.zhuang@huawei.com, linuxarm@huawei.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 7, 2020 at 3:38 PM tanhuazhong wrote: > > > > On 2020/9/7 17:22, Willem de Bruijn wrote: > > On Sun, Sep 6, 2020 at 8:42 PM Jakub Kicinski wrote: > >> > >> On Sat, 5 Sep 2020 14:11:11 +0800 Huazhong Tan wrote: > >>> There are two updates relates to UDP GSO. > >>> #1 adds a new GSO type for UDPv6 > >>> #2 adds check for UDP GSO when csum is disable in netdev_fix_features(). > >>> > >>> Changes since RFC V2: > >>> - modifies the timing of setting UDP GSO type when doing UDP GRO in #1. > >>> > >>> Changes since RFC V1: > >>> - updates NETIF_F_GSO_LAST suggested by Willem de Bruijn. > >>> and add NETIF_F_GSO_UDPV6_L4 feature for each driver who support UDP GSO in #1. > >>> - add #2 who needs #1. > >> > >> Please CC people who gave you feedback (Willem). > >> > >> I don't feel good about this series. IPv6 is not optional any more. > >> AFAIU you have some issues with csum support in your device? Can you > >> use .ndo_features_check() to handle this? > >> > >> The change in semantics of NETIF_F_GSO_UDP_L4 from "v4 and v6" to > >> "just v4" can trip people over; this is not a new feature people > >> may be depending on the current semantics. > >> > >> Willem, what are your thoughts on this? > > > > If that is the only reason, +1 on fixing it up in the driver's > > ndo_features_check. > > > > Hi, Willem & Jakub. > > This series mainly fixes the feature dependency between hardware > checksum and UDP GSO. > When turn off hardware checksum offload, run 'ethtool -k [devname]' > we can see TSO is off as well, but udp gso still is on. I see. That does not entirely require separate IPv4 and IPv6 flags. It can be disabled if either checksum offload is disabled. I'm not aware of any hardware that only supports checksum offload for one of the two network protocols. Alternatively, the real value of splitting the type is in advertising the features separately through ethtool. That requires additional changes.