Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1524950lqt; Sat, 8 Jun 2024 01:41:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6yf/xaas64TMtDmvsX1KVpuSNp9iSqNTjRtb3+fLTUCS4383tsHR2ScVv+6oBUoPvtiVgi6yB5dmptaNNkRzfOhpHJhjCRmD3lbVVrw== X-Google-Smtp-Source: AGHT+IETgb1yNYl9YRH0kyDb108dguujRQOaS7bIUSQHkKy6yBZIy1FC+OAhYF7ndjz5UanoG8WQ X-Received: by 2002:a05:6214:319a:b0:6b0:6bcb:d9d5 with SMTP id 6a1803df08f44-6b06bcbdef6mr10443226d6.14.1717836103456; Sat, 08 Jun 2024 01:41:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717836103; cv=pass; d=google.com; s=arc-20160816; b=EUr/elqxSaUNuidXJYZAhWPvIA/di/OASTQQoI7IhING/SB/4pwIV2N+mOCwIeF7// DbJyi8usCc5wtlAJruYNWVwWoMnSYtbAKAeM1xn/2DW/aSX/JJwShkdTnNTf0w4CHKh3 qfzJwac07ZbGG5v5S1TV/lTdnvMZ1QT5q6DTCmVlUUXZ0OdUmoCv52AEDwOlEq9QhmA3 RWIij5GuBEcAiy4jSGXYvxeMtJeKl7waX3DAN9UVxqQv+/IetzPhG1xHVLigLfI5S2s+ RLVTLqiBWboSJeB4YamvgJs0Yxtz0yftA/mdFOPXZqLO4TMgMpbf/Y6ZZS8oJjJyZoSY B8UQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lqDgHLai6HrJpj1EqCjVksegt5X8EJbsgWeEYS2OqYU=; fh=P4vp4ieLtMbthMoM/o7rrGl3+rHWjVARdq6GNgZEqIw=; b=i6eoQ9jegChOGnpIVGoUXmeZS7U03crXWc9AoBFar/F/RjqM2tYWmIXpIoakabbg87 k6QuWjee4EHP3w4kjnUEkbmnnNAWJMzDbsgFToG3+kx/tORby1fW7q83fjk59Gf49OII NMgGOtdPhAgiFOgZ2kWLZPvdp+FW1PPRPQlR1EuRXDsdYl55vjfcc+Oz4CxyJZSYk735 G7uPtTFkvPx39RmaqzwGJGSDivWDEr1YBp+ujg7aiPqjY1BHU3FiO4uiA468pjuzQZYr agmb9NCo2BvCbxpiDIXAlxIVLPeC01PvmcWuGNu1kTovhpXqR3HRxentQIAlMXNPAtV1 8Kmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QdMFvMPI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-206951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206951-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 6a1803df08f44-6b04f967d8asi57720716d6.223.2024.06.08.01.41.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jun 2024 01:41:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206951-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=QdMFvMPI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-206951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206951-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 2D6441C211EE for ; Sat, 8 Jun 2024 08:41:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9478176FB3; Sat, 8 Jun 2024 08:41:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QdMFvMPI" 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 0C3F7167DB2; Sat, 8 Jun 2024 08:41:32 +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=1717836093; cv=none; b=BHmo5ZomKTgkUHPYpdLS2Jcc/2TAJC1Nxl5v04oqbOV/CxjoABGOxL7tPJxfVHLv9og9AwFBoGHw5haJk64+0BUHAytNavacIa9DWJ+OrltAvq7gRQr9IbzcH4Wz5vTTgQRlDrIWWrTR3jrBEPHK04D+JvTfxe78SKzP7XzsM80= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717836093; c=relaxed/simple; bh=N11CMXGnF9ARu0XlXSqTeYCla3Hy4gfRhSY5hCeaGbc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uK643ugySvsSC8AO5rre4oV4v2gelW0CrJdn7/gQiEzyjRJXV4WLEnajQEpwhGIA94swHU5YtzXsrak/Qf39DlHM8OnPUuRhG9kjooDV5edf1PW2B373ivqDofcPiWvalomInUmRvAj7dsrJx47hwLchhVW9+BN2oUtyKGgL0ds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QdMFvMPI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B259CC2BD11; Sat, 8 Jun 2024 08:41:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717836092; bh=N11CMXGnF9ARu0XlXSqTeYCla3Hy4gfRhSY5hCeaGbc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QdMFvMPI6CK5AyfIJYC+od03cUXnjZTb8JE7+CZImm04kVDGo8K/DKn4bos4Q56Xt quDCXQbD29svdiBXk5+/sX4Z6umuu06/9GaTgPkGbXgpxLPyiTPCDBqSF2kYnkcmZC GPdYd9WRR/5IEQiE3Ah5og81QobtQMlmHWwQo7T9ktpMsMOP3bPUPCWzKvsBv5qAwB AXj9VXVrBc4yEIVb+wLigWrS5JafVszrvJXCywRcGL22UZ9TcSjs5gfDSDs74/NURQ 3YXkBOqr2Bf8ybpWLucz42OD81EclEjbhO+4XiSQSc1PViJaIgsxDMK/AYql56GE71 MllNIZOO/m3Tg== Date: Sat, 8 Jun 2024 09:41:28 +0100 From: Simon Horman To: Breno Leitao Cc: "David S. Miller" , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, sbhatta@marvell.com, open list Subject: Re: [PATCH net-next] ip_tunnel: Move stats allocation to core Message-ID: <20240608084128.GJ27689@kernel.org> References: <20240607084420.3932875-1-leitao@debian.org> 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-Disposition: inline In-Reply-To: <20240607084420.3932875-1-leitao@debian.org> On Fri, Jun 07, 2024 at 01:44:19AM -0700, Breno Leitao wrote: > With commit 34d21de99cea9 ("net: Move {l,t,d}stats allocation to core and > convert veth & vrf"), stats allocation could be done on net core instead > of this driver. > > With this new approach, the driver doesn't have to bother with error > handling (allocation failure checking, making sure free happens in the > right spot, etc). This is core responsibility now. > > Move ip_tunnel driver to leverage the core allocation. > > All the ip_tunnel_init() users call ip_tunnel_init() as part of their > .ndo_init callback. The .ndo_init callback is called before the stats > allocation in netdev_register(), thus, the allocation will happen before > the netdev is visible. > > Signed-off-by: Breno Leitao Reviewed-by: Simon Horman