Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp661191lql; Mon, 11 Mar 2024 13:30:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6RYK5fhousZqil1f2vVBL9Fqr/Dvan+cm6PSzN6knwrXUAfUtqcXsl9SAqUBszDgWYhLFbVMAt6jXvJKlWMwNtHT7RKOr9BJEXGIuNg== X-Google-Smtp-Source: AGHT+IEJoP/j15D3KONS2V1djZ64ChC2c8WJjEQ8A7P7YZAX0nDz3gvIb8kmjdawJc9WJSoGUbDZ X-Received: by 2002:a05:620a:370e:b0:787:e43e:801a with SMTP id de14-20020a05620a370e00b00787e43e801amr11428320qkb.50.1710189020504; Mon, 11 Mar 2024 13:30:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710189020; cv=pass; d=google.com; s=arc-20160816; b=bxGHgF2vAL81G/B6b/c4RZotEkmH6u5BMMR/YTDn00ruSJoOrnKVjwvJaXhB8FDtUU w6modItpduzF/mfXd9vQaPKGsHVvB+2ox0aXlEuwBqrTqoLMS5xteNaB8sxFG6Eb0WK/ OudXJIRqcKSi5OoKMikEarKCg/2k6BcJMB7VI+hY3vs3q/D1zt1klmTReq45Z3nY9cmM YS3tdQrYnoA7C/rMG/qs4rJXiPmPe0SsiXfXkZaxrpCXlTTtLZGW8eEYaDDSql+Dgnxn fpMGKOZoXTIMo1ndSzWEayzj9fSR+ZB4HFcNX4y5OsAsgyjom97R98Lvw2/MYfdm5YaU O6kQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=FBlOfrstjdh5vM11yrDq1HWc6yEQlbq9u3jwMhRNur8=; fh=XGjcH96xaYgo1uxkZe2+NehycjRZsqwvqGJiSHrAYcg=; b=vkJOkobrl1W2au/wr+m3hzvScHWxJq/Ew40mBvhPp1nWzuguMpltx9cFE3QW20Dk11 hcvSbqGLr4/d4QyBDvQ1pEw6GL2Wjpb9uXwOBsgU7a/BWXQnYGDrCKRmbDcKHego39OO GnHDM+cV7SA7/1p/VeqrLev738vZMw0mJcP8yZJMM9NeE1wSUEU1VCFJP9Qsg3/4J4Ej czroAiBN0REvhXvfYQ6tGcJiqmmy+f8oaSNHrQKPU9DrkLkYujFYQl3aTDJMuTjcgr38 Ovf6TRhWKV+j5VGXnrBGldkND7TLMBziG3AO1gb/zmgRLTuzPfiEAu1ERP7yb6E4eiPS wr1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=napyVu9g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id wj17-20020a05620a575100b007881f42860asi5983088qkn.54.2024.03.11.13.30.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 13:30:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=napyVu9g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3DBB01C212C2 for ; Mon, 11 Mar 2024 20:30:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7572356B73; Mon, 11 Mar 2024 20:30:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="napyVu9g" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99AFC5675F; Mon, 11 Mar 2024 20:30:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710189012; cv=none; b=SrgceWFa26ySqAQeU8yxVF1cR2FazdElYIav7qTN542qGb5EAH1WHjx22URC7GvzZ5ZXjobZF5BAbSLyqkBkDkmW6ugrulhuJGWbmBu70nWd7AnOy0X+0E8CTSv42fcj5XbhforNWFjaMz06PmevPQQ2ah66d2LHF6iO5tSmzqQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710189012; c=relaxed/simple; bh=0tS+vxfg8HDQU1ELwiYHWm6/ey7BA5p+nRLEIii4sbA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=udWTKXfpNnms+672ASMyjefexOVYH1fThVVcPluqwzUU6wNH8uPN57BNxpnklewmeUFk0Xo3t4ZNUlnp5jM7e1fRtFVSroEHHPfRTFTwn9fX7+naBQ7kbHwjIDRmVTznajGeGGAqXSBViuKn2EPKu10pBUdG5g0++Lc2P4PVdYQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=napyVu9g; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 339ACC433F1; Mon, 11 Mar 2024 20:30:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710189012; bh=0tS+vxfg8HDQU1ELwiYHWm6/ey7BA5p+nRLEIii4sbA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=napyVu9gbFaWdcdGETPbBSu48gI6089fqm14WR3nQWP8Jzk+3rSjWJebxJlN9MD+V n97OpRePO3CRoPyBnfJyZngPwA3gC7GuVXlsOYgVWIGCfz9OBLhxlEXuuntWdVomlQ 8ocqNYCcJ9UrdO7Fn6eZfWm+AL+duqbl5OKwm1iu8gB9BU+BOFb9RHw2Z4p0UzYl2U GK8dVAs7SNpoF5+E2IlDR+f068V+3MjDfOjcBreEXg5ro8SxwBaHfzHz2ucba/AQzy SzYnw+rLl9GIJSx+efUX9GcY3BiPmO+dFatWhZ7Vnt+TSo8qdlBCA0H4vsbUUNCLz1 2RUjDosx9ggMA== Date: Mon, 11 Mar 2024 13:30:11 -0700 From: Jakub Kicinski To: Ignat Korchagin Cc: "David S . Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@cloudflare.com Subject: Re: [PATCH] net: veth: do not manipulate GRO when using XDP Message-ID: <20240311133011.2f9236da@kernel.org> In-Reply-To: <20240311124015.38106-1-ignat@cloudflare.com> References: <20240311124015.38106-1-ignat@cloudflare.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 11 Mar 2024 12:40:15 +0000 Ignat Korchagin wrote: > Commit d3256efd8e8b ("veth: allow enabling NAPI even without XDP") tried to fix > the fact that GRO was not possible without XDP, because veth did not use NAPI > without XDP. However, it also introduced the behaviour that GRO is always > enabled, when XDP is enabled. > > While it might be desired for most cases, it is confusing for the user at best > as the GRO flag sudddenly changes, when an XDP program is attached. It also s/ddd/dd/ spellcheck the whole message, pls > introduces some complexities in state management as was partially addressed in > commit fe9f801355f0 ("net: veth: clear GRO when clearing XDP even when down"). > > But the biggest problem is that it is not possible to disable GRO at all, when > an XDP program is attached, which might be needed for some use cases. > > Fix this by not touching the GRO flag on XDP enable/disable as the code already > supports switching to NAPI if either GRO or XDP is requested. Sound legit, AFAIU. But please also adjust tools/testing/selftests/net/veth.sh because it's failing now.