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=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 6A7BBC4338F for ; Thu, 12 Aug 2021 04:50:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4002360F57 for ; Thu, 12 Aug 2021 04:50:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234082AbhHLEuj (ORCPT ); Thu, 12 Aug 2021 00:50:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51784 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233944AbhHLEuh (ORCPT ); Thu, 12 Aug 2021 00:50:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628743812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3EdCh8jUcOhbmGjP/pel54QwoWirthHm42Spak8Fu+8=; b=ZTHtbCvVYWnkFBGemqlbGPe5/NlVvVyIVRrj1ZIpMRX0p7Nfpnu8gt8rgQx8fvDmB4rQNU YDaM94UFCwLSmIL1V/6u4HUx8fpxaniyr0cJOPXH0rlUOSClcfotjkTU73Mf2EN0wrsuvC XoTOwMERDi1uXdyq8E8gGxBxPHKJaX8= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-314-W_zeSyDOPxW-7jRJytkhyw-1; Thu, 12 Aug 2021 00:50:09 -0400 X-MC-Unique: W_zeSyDOPxW-7jRJytkhyw-1 Received: by mail-ed1-f70.google.com with SMTP id eg56-20020a05640228b8b02903be79801f9aso2373798edb.21 for ; Wed, 11 Aug 2021 21:50:09 -0700 (PDT) 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:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=3EdCh8jUcOhbmGjP/pel54QwoWirthHm42Spak8Fu+8=; b=JJ1nogojOKj97u10V1HANP6jeGBMky0DrqznGLympNY7/QuCKPQJbSGicxzDnV8OUp FwNqwuUai8Q/xbf58yJq+iNn6Q0wBitgzx9fjQWz635i9ONrIKorV+I0wfSc982sQgHu ygUayVR5mJTc8b+73yDGZTa4JnBXcnc09aUYle7OsPTJhTwQsdq22+JQjp4JaFFjpNWL b1DJean5KO8K0nxlw3W/awWqAkP/wECPekJownKVzgJiPSc7FiiYFMJ/16kHtDQGWNmD 8rLZXrxSMrCcsosdtIGkS0ylk2HVzoJAcbswAtGh93qkavop/ha2tCmjoiG5WC7FMUDN mLAw== X-Gm-Message-State: AOAM5320N9jHXmB3gsngFERF/jzAMr9OAlWwMue6FpaSF1khqob7718t n9s+n7RcvX1i+PqZefiAVOkVAPON8I4HRvHMGOYBtSoZ10eU11amT5LHseTYfoIvOqV7nfvtCom R/i+SaqH1jKYK5gOwcUfwDSiC X-Received: by 2002:a17:906:7209:: with SMTP id m9mr1547131ejk.387.1628743808135; Wed, 11 Aug 2021 21:50:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz91E0jQ/THuDZMxVBENUTarq0cDXA5MCRzrG+Zz2hon71s0/8E+SBP/0DQrOIwM4NFPdSj+w== X-Received: by 2002:a17:906:7209:: with SMTP id m9mr1547120ejk.387.1628743807976; Wed, 11 Aug 2021 21:50:07 -0700 (PDT) Received: from redhat.com ([2.55.129.96]) by smtp.gmail.com with ESMTPSA id t25sm544780edi.65.2021.08.11.21.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 21:50:07 -0700 (PDT) Date: Thu, 12 Aug 2021 00:50:03 -0400 From: "Michael S. Tsirkin" To: Jason Wang Cc: Jakub Kicinski , davem@davemloft.net, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ivan@prestigetransportation.com, xiangxia.m.yue@gmail.com, willemb@google.com, edumazet@google.com Subject: Re: [RFC PATCH] virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO Message-ID: <20210812004655-mutt-send-email-mst@kernel.org> References: <20210811081623.9832-1-jasowang@redhat.com> <20210811151754.030a22a7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 12, 2021 at 11:23:04AM +0800, Jason Wang wrote: > > 在 2021/8/12 上午6:17, Jakub Kicinski 写道: > > On Wed, 11 Aug 2021 16:16:23 +0800 Jason Wang wrote: > > > Try to fix this by using NETIF_F_GRO_HW instead so we're not > > > guaranteed to be re-segmented as original. > > This sentence may need rephrasing. > > > Right, actually, I meant: > > > Try to fix this by using NETIF_F_GRO_HW instead. But we're not sure the > packet could be re-segmented to the exact original packet stream. Since it's > really depends on the bakcend implementation. > > > > > > > Or we may want a new netdev > > > feature like RX_GSO since the guest offloads for virtio-net is > > > actually to receive GSO packet. > > > > > > Or we can try not advertise LRO is control guest offloads is not > > > enabled. This solves the warning but will still slow down the traffic. > > IMO gro-hw fits pretty well, patch looks good. > > > If the re-segmentation is not a issue. I will post a formal patch. > > Thanks It is but the point is even though spec did not require this we always allowed these configurations in the past so hopefully most of them are not broken and combine packets in the same way as GRO. Let's not break them all in an attempt to catch bad configs, and meanwhile amend the spec to recommend doing GW GRO. > > > 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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 AC904C4338F for ; Thu, 12 Aug 2021 04:50:20 +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 3395A60EE2 for ; Thu, 12 Aug 2021 04:50:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3395A60EE2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E60BB40544; Thu, 12 Aug 2021 04:50:19 +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 uHjKSVuPrEGt; Thu, 12 Aug 2021 04:50:16 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 77B034020E; Thu, 12 Aug 2021 04:50:15 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 50CC7C001A; Thu, 12 Aug 2021 04:50:15 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 82040C000E for ; Thu, 12 Aug 2021 04:50:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6C615606E6 for ; Thu, 12 Aug 2021 04:50:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PgVXiEqL5qYg for ; Thu, 12 Aug 2021 04:50:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id AFCEB60A69 for ; Thu, 12 Aug 2021 04:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628743812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3EdCh8jUcOhbmGjP/pel54QwoWirthHm42Spak8Fu+8=; b=ZTHtbCvVYWnkFBGemqlbGPe5/NlVvVyIVRrj1ZIpMRX0p7Nfpnu8gt8rgQx8fvDmB4rQNU YDaM94UFCwLSmIL1V/6u4HUx8fpxaniyr0cJOPXH0rlUOSClcfotjkTU73Mf2EN0wrsuvC XoTOwMERDi1uXdyq8E8gGxBxPHKJaX8= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-588-cXp2KREeM4iQXe4K8pIimA-1; Thu, 12 Aug 2021 00:50:09 -0400 X-MC-Unique: cXp2KREeM4iQXe4K8pIimA-1 Received: by mail-ed1-f71.google.com with SMTP id y39-20020a50bb2a0000b02903bc05daccbaso2415351ede.5 for ; Wed, 11 Aug 2021 21:50:09 -0700 (PDT) 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:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=3EdCh8jUcOhbmGjP/pel54QwoWirthHm42Spak8Fu+8=; b=Y/jznUTPPbRpkJRrkwMtpU/YNT6ekw3rCsWBll0KkAMHERLH6HaWt3xVSh5ifccjC3 FDFMSf/QrtmoKqhHNkZ1uyMSmrz7PzdQO12muhjLdzWHdxOROSYUdMf73OO6eqhMr/2B cOIt78PU798sivOwiSpIq4A69NOWaBbtazAAZpqkVbNoaTCsK8p9429pdpvnVEkY2dGI MqNGT7Tm/09IWExu9NEs/aeyVT54BkiGU4Hv4R21me6+vLn25V9AfzxNE19K1GEm31Ad DMk6fh0V+ZZHFziwgbqz+rsellSQqpJNr73GmCjAhnuASBQC9m/t47F2uesdGfL9nOEG SwZw== X-Gm-Message-State: AOAM530NCsMiRClJ+oPYJuG5CUnfCnkkmw6WM08Ci0/sz+KYDdhpht8G Ea44xdJ/UFPt0/UVNeKMs0sCRi06WbRwDto9/JU5R0GfPSDQhXfG7GdsWrDdv7vyvAEAgg/u5lh DGpdUDVU0jNgkCKzSaJXYe+U3mX/ZzbSEwgpjF6+4rQ== X-Received: by 2002:a17:906:7209:: with SMTP id m9mr1547129ejk.387.1628743808135; Wed, 11 Aug 2021 21:50:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz91E0jQ/THuDZMxVBENUTarq0cDXA5MCRzrG+Zz2hon71s0/8E+SBP/0DQrOIwM4NFPdSj+w== X-Received: by 2002:a17:906:7209:: with SMTP id m9mr1547120ejk.387.1628743807976; Wed, 11 Aug 2021 21:50:07 -0700 (PDT) Received: from redhat.com ([2.55.129.96]) by smtp.gmail.com with ESMTPSA id t25sm544780edi.65.2021.08.11.21.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 21:50:07 -0700 (PDT) Date: Thu, 12 Aug 2021 00:50:03 -0400 From: "Michael S. Tsirkin" To: Jason Wang Subject: Re: [RFC PATCH] virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO Message-ID: <20210812004655-mutt-send-email-mst@kernel.org> References: <20210811081623.9832-1-jasowang@redhat.com> <20210811151754.030a22a7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: willemb@google.com, netdev@vger.kernel.org, ivan@prestigetransportation.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, edumazet@google.com, Jakub Kicinski , davem@davemloft.net 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="utf-8" Content-Transfer-Encoding: base64 Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" T24gVGh1LCBBdWcgMTIsIDIwMjEgYXQgMTE6MjM6MDRBTSArMDgwMCwgSmFzb24gV2FuZyB3cm90 ZToKPiAKPiDlnKggMjAyMS84LzEyIOS4iuWNiDY6MTcsIEpha3ViIEtpY2luc2tpIOWGmemBkzoK PiA+IE9uIFdlZCwgMT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