From mboxrd@z Thu Jan 1 00:00:00 1970 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 0A8768289F for ; Wed, 7 Feb 2024 17:57:16 +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=1707328637; cv=none; b=bDH7/o31MBy4piBBWzk/aq+8E3YBcKleN7jsVN7yO+wv7pxFHzI2YG5cmlMU4p175Ierlz44uFiOFMP8HbeDu7WvgZB+qv9tjGNsQ4iiCcInwGXIJWGPtG8mAsmem1RbtaMpH7gxO7MddXeEA5uwNvBWbo4OGicBP34T4Aww+VM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707328637; c=relaxed/simple; bh=5RDwJU43burdlSh0mnZ0tNlMaFUQZEutczM4zMD5lS0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ds9i427lrtj+Sbd/R79YspVTxYVOizMGDx6j1NgzmhodvO6yuX6apqKrrxuQTlMiDID1ghIKIQO7sZBmENe+3g2owhsrPpbaonYWu47m9k6++u+8LjyWPVC/eQQsENex5U4R3PEq2BcFew3TLn5PUhvBYuh+h0sRBzXHUcjNbHw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SskFRwHc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SskFRwHc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30A17C433C7; Wed, 7 Feb 2024 17:57:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707328636; bh=5RDwJU43burdlSh0mnZ0tNlMaFUQZEutczM4zMD5lS0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SskFRwHc/QGa4J18Hvimhc2nlOOWZlaVVGiGnTcqft1RqDxTtqLmvNuSRyKsne9gT wr4VtUtFkgPyrinVqX4CnmZ5truCCY6Z1f5cvwIS2ajEVK6hcTKjAfFNZAEZ9A3s3b ZTLd0mvsKdI7i7wLCYMxjqfud+ko56m8ddn3f5DTE+WNJjSKLQXNRNtzMlJLvMGmMp +AXVVWFsRWVvGRSXFxJct0Vn/nE4ttHTEJ3thxn1gyn2KPHBt8tCGOa+238V1Bc9mC DIFAphq2DSwPy6d8SgbPVhnUbTJgbcfc0pUUXoI5UKx1gHkRKUTkmvZ5nVoOuoXBJQ CnYIQqk5ubpRQ== Message-ID: Date: Wed, 7 Feb 2024 10:57:15 -0700 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 net-next 02/15] nexthop: convert nexthop_net_exit_batch to exit_batch_rtnl method Content-Language: en-US To: Eric Dumazet , "David S . Miller" , Jakub Kicinski , Paolo Abeni Cc: Antoine Tenart , netdev@vger.kernel.org, eric.dumazet@gmail.com References: <20240206144313.2050392-1-edumazet@google.com> <20240206144313.2050392-4-edumazet@google.com> From: David Ahern In-Reply-To: <20240206144313.2050392-4-edumazet@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/6/24 7:42 AM, Eric Dumazet wrote: > exit_batch_rtnl() is called while RTNL is held. > > This saves one rtnl_lock()/rtnl_unlock() pair. > > We also need to create nexthop_net_exit() > to make sure net->nexthop.devhash is not freed too soon, > otherwise we will not be able to unregister netdev > from exit_batch_rtnl() methods. > > Signed-off-by: Eric Dumazet > --- > net/ipv4/nexthop.c | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > Reviewed-by: David Ahern