Article View: linux.kernel.netdev
Article #3271Re: [PATCH net-next 2/2] ipv4: Do not pass netns to fib_table_lookup()
From: David Ahern
Date: Wed, 14 Oct 2026 13:36
Date: Wed, 14 Oct 2026 13:36
33 lines
6722 bytes
6722 bytes
On 10/14/26 2:26 AM, Ido Schimmel wrote:
> Commit c436a624f89e ("ipv4: Pass netns to fib_table_lookup()") added the
> network namespace as an argument of fib_table_lookup() so that it could
> be passed to the fib_table_lookup tracepoint. However, the function is
> called in the data path and the namespace is only needed when the
> tracepoint is enabled, so the additional argument is unnecessary
> overhead.
>
> Instead, pass the namespace that is now stored in the FIB table to the
> tracepoint. This way, the namespace is only read when the tracepoint is
> enabled. Revert the signature of fib_table_lookup() and its callers to
> what they were before the above commit. The tracepoint itself is
> unchanged.
>
> No functional changes intended.
>
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Link: https://lore.kernel.org/netdev/43857d08-c4f4-44ce-a0b3-0e7fcc56bf90@redhat.com/
> Assisted-by: LLM
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
> include/net/ip_fib.h | 12 +++++-------
> net/core/filter.c | 2 +-
> net/ipv4/devinet.c | 3 +--
> net/ipv4/fib_frontend.c | 6 ++----
> net/ipv4/fib_rules.c | 2 +-
> net/ipv4/fib_semantics.c | 2 +-
> net/ipv4/fib_trie.c | 16 +++++++++-------
> 7 files changed, 20 insertions(+), 23 deletions(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
Technical Details
Message-ID:
<8be92dde-b8c4-4573-aa1e-4ae240b9760a@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346289-linux-kernel-netdev=dewy.ruReferences:
<20261014082612.1280756-1-idosch@nvidia.com> <20261014082612.1280756-3-idosch@nvidia.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346289-linux-kernel-netdev=dewy.ru From: dsahern@kernel.org (David Ahern) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 2/2] ipv4: Do not pass netns to fib_table_lookup() Date: Wed, 14 Oct 2026 07:36:44 -0600 Organization: Usenet Network Message-ID: <8be92dde-b8c4-4573-aa1e-4ae240b9760a@kernel.org> References: <20261014082612.1280756-1-idosch@nvidia.com> <20261014082612.1280756-3-idosch@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2318525"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:HNW3IrpxDCaxJqueuhSmhaQI9AA= sha256:/H+OqRhvokztzatYNEIDLMA3tP2NKt8QM0J0k6K/MHI= sha1:xL8/8gh0iTnckjsmsit4DxrRScI= sha256:wDQDE3M7AH1vztYk/A4w1R8cc6WqRCVwGFkDhcdDlhI= Content-Language: en-US List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 718DC110135; Wed, 14 Oct 2026 18:04:07 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.34 X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ci3utzSLD2_1; Wed, 14 Oct 2026 18:04:01 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-346289-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 6FB42110123; Wed, 14 Oct 2026 18:03:50 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 201E2E0BFD; Wed, 14 Oct 2026 13:41:18 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00CB953C3DA; Wed, 14 Oct 2026 13:36:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iKn4knAX" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 C21BE53C3A5 for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 13:36:45 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791985010; cv=none; b=YpW0JixB/FpMyjKAEUtNAuyQYLMDWdj+aeqrBWBgX7PgqT2X28cyfulwIOULucp9/G1MnpObnoqourWl4ko92k0AAzS4ukox1mIc2oSIUrZo5mUN21ptnYG8Wyo4VK6iTM/yRfv4tuPnn1IjDgwwI+BU6Tuf33f6y+7sQRqr3qA= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791985010; c=relaxed/simple; bh=N+oq3Ijs9SOOq5CootAwMaDw0HUY/xdJQ6LdDDk52Eg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=j6ZS0Ok9tWkiyZ2K2QTlYpaQRuYeQsxPWSAiKMhp29HleK9BE8dkRvkvfuEX+FHVAglix3jbzmcbU3F4nGTmIgrWm94XRz415EoVY+P66GT0kWBiJqI5CCNMSkG+z3+bS5lNOuHRZWA5yHKwFRjjqbnDeRso7rbg/RGwf/CvetM= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iKn4knAX; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEEB41F000FF; Wed, 14 Oct 2026 13:36:44 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791985005; bh=flTJf7udDn3iok7xarpzKa5cXgx48RzdBTP+3YCrmWY=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=iKn4knAXFQZp3vQZlmWYi3X+6RmVAM3L5H3CDSszy1ju8cc79g8V+5yta0s5JgZeN xPfRcI1HVSJHcLT8UKAZSoGEMFghF/hE6P4c+9nOTIMqIYNVHteY9/vLjM7UVETZH4 QBoirAQjvIHhiU3daMCeMDQeFwtvjNPPPQLEhljIGgGhyGAHOIJKJPfK8EeGm4f7wf 5iClq7X/BdaNPHgG3dMc97SrisHUyJ7kNUuF4IdvdEGsj3Avs9Ix46PCPaKlsD6rCn ENXkBC8DMGL+dmAy/rWGXgcyvuBqmfUN0aAXkGc9se+aIIYNgMhIw3zUJ6W0phN4eZ viwallRUmJIOg== X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-User-Agent: Mozilla Thunderbird X-Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, horms@kernel.org X-In-Reply-To: <20261014082612.1280756-3-idosch@nvidia.com>