Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp166390pxb; Thu, 14 Jan 2021 02:48:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5vlT8xT4CYf0Zma8xcKCBr4nqhfL5BKlWVNP2dCfTOgdUipheIOBp81jiNjmhfq7wuBJY X-Received: by 2002:a17:906:2e16:: with SMTP id n22mr4931052eji.477.1610621285585; Thu, 14 Jan 2021 02:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610621285; cv=none; d=google.com; s=arc-20160816; b=eRzq37HPSO4dZF7VD0l5yS9IhAVW6hvAhwoTkkKnFUWSehHM5owbWhJeAk2/jzKxm3 Ac6uRzZgoVX7QJ248KHBfvu3l/xGs4EJKj1PTRuW7II7eOeLT5vC0kOufojRdInAzJgO fo7zA/j2+aNS2Oq5bu60y+CV+glbKs6/ylp4gd7yU1scb/oXiu7Su73sNiENSH2VvENx wqJ3kB6O9JRn7+AWddSfxBXX+blDebyBkxGjLa1zfyYAjUPncrbA+m24c0fc8tbomP4Q mLN60o9OxDYSzEjM/uRDyNlOHAucH+PGScMo7M2FWnA+HtyYd9iwyagLrcsSV42qTi/U ILfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=XpwNCeb1mFbjLCNKv9rUGAnouMUACeCtRMftN/AM0qc=; b=bXCLOjRldgvL7FQG3SCfWH0amrmONC2/UnP0pRAKkfZXMLiWM3FSh60tiGHsNPwzrR QxJmIPI158iHCeP/KNpVzJxZISjTaI/+TqTkIgqd3dFDzigzPKvnO0GFwKbO1yK3/+JH SHbl/n1vgx0qaTALkwCYfYhQZoaQQ9bOZAIC8UvygFjn/Oc2w2DVJ4MQzcrMZEPmGTF9 /p9kNObtLbLKUiz7PdY3c7nF4TCaezsCQ7xx0p0hVP0xdZLr23XQx4EJQZBsf9c5K0vd KQzG4kYRKhcPMeDgNfwotJgusEy0ywywJxIILFQX/kZZVUxJT3SHeXtIMg/dCzyr6fin a0Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=IudfYQhD; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yj16si791004ejb.561.2021.01.14.02.47.40; Thu, 14 Jan 2021 02:48:05 -0800 (PST) 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=@pm.me header.s=protonmail header.b=IudfYQhD; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728799AbhANKqr (ORCPT + 99 others); Thu, 14 Jan 2021 05:46:47 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:42594 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726376AbhANKqp (ORCPT ); Thu, 14 Jan 2021 05:46:45 -0500 Date: Thu, 14 Jan 2021 10:45:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610621155; bh=XpwNCeb1mFbjLCNKv9rUGAnouMUACeCtRMftN/AM0qc=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=IudfYQhDlfGgR4hKqavEK/j7eLpgdoYg6P1XkmAKsrsEzXUobC/UgNMvsnnEYV4UE s6nzyGXe3jvtnAiLXg/o37Z1wRzayK3JaXUyr+06VlIGhgo9RKNz+pDgD8FDQ+LFx/ LpZXWf5uitJLmfBFE5xiuTc/1L8xg3i+fV9VzKhIZVmsINwrF/61BjDPt2OEMf8OQc O9fd9WCPy+D08LE2084nyl/A9zfPUJL7BZ7DKctCkxjqp9tYTItJMbqiuiyu51ae5Y 3X+qr6jTufxa/EjHhsSZIJjtku5n8XpN/EzPm2g/Ec4ml7DfKIX8qMsa+xMjWpZIOG 8hqSTNECenywg== To: Paolo Abeni From: Alexander Lobakin Cc: Alexander Lobakin , "David S. Miller" , Jakub Kicinski , Alexander Duyck , Eric Dumazet , Edward Cree , Willem de Bruijn , Steffen Klassert , Dongseok Yi , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: Re: [PATCH v2 net-next] udp: allow forwarding of plain (non-fraglisted) UDP GRO packets Message-ID: <20210114104510.6240-1-alobakin@pm.me> In-Reply-To: <532f2d63cc7b842f6d75a22da277c2a841dcb40e.camel@redhat.com> References: <20210113103232.4761-1-alobakin@pm.me> <532f2d63cc7b842f6d75a22da277c2a841dcb40e.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paolo Abeni Date: Wed, 13 Jan 2021 19:37:18 +0100 > On Wed, 2021-01-13 at 10:32 +0000, Alexander Lobakin wrote: >> Commit 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.") actually >> not only added a support for fraglisted UDP GRO, but also tweaked >> some logics the way that non-fraglisted UDP GRO started to work for >> forwarding too. >> Commit 2e4ef10f5850 ("net: add GSO UDP L4 and GSO fraglists to the >> list of software-backed types") added GSO UDP L4 to the list of >> software GSO to allow virtual netdevs to forward them as is up to >> the real drivers. >> >> Tests showed that currently forwarding and NATing of plain UDP GRO >> packets are performed fully correctly, regardless if the target >> netdevice has a support for hardware/driver GSO UDP L4 or not. >> Add the last element and allow to form plain UDP GRO packets if >> there is no socket -> we are on forwarding path. > > If I read correctly, the above will make UDP GRO in the forwarding path > always enabled (admin can't disable that, if forwarding is enabled). > > UDP GRO can introduce measurable latency for UDP packets staging in the > napi GRO hash (no push flag for UDP ;). > > Currently the admin (for fraglist) or the application (for socket-based > "plain" GRO) have to explicitly enable the feature, but this change > will impact every user. > > I think we need at lest an explict switch for this. Fraglist UDP GRO is controlled by netdev feature / ethtool, plain UDO GRO is controlled by the sockopt. Regarding that we have no sock on forwarding, what kind of switch should we introduce here? One more netdev feature, smth like NETIF_F_GRO_UDP_L4? > Cheers, > > Paolo Thanks, Al