From: Ido Schimmel <idosch@nvidia.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@kernel.org, dsahern@kernel.org, horms@kernel.org,
Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next 0/2] ipv4: Remove netns argument from fib_table_lookup()
Date: Wed, 14 Oct 2026 11:26:10 +0300 [thread overview]
Message-ID: <20261014082612.1280756-1-idosch@nvidia.com> (raw)
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. As noted by Paolo [1], the
function is called in the data path where the additional argument is
unnecessary overhead, as the namespace is only needed when the
tracepoint is enabled.
This patchset stores the namespace in the FIB table instead and passes
it from there to the tracepoint, so that the namespace is only read when
the tracepoint is enabled. The tracepoint itself is unchanged.
Patch #1 stores the namespace in the FIB table.
Patch #2 passes the namespace from the FIB table to the tracepoint and
reverts the signature of fib_table_lookup() and its callers to what they
were before the above commit.
No functional changes intended.
[1] https://lore.kernel.org/netdev/43857d08-c4f4-44ce-a0b3-0e7fcc56bf90@redhat.com/
Ido Schimmel (2):
ipv4: Store netns in FIB table
ipv4: Do not pass netns to fib_table_lookup()
include/net/ip_fib.h | 16 ++++++++--------
net/core/filter.c | 2 +-
net/ipv4/devinet.c | 3 +--
net/ipv4/fib_frontend.c | 12 +++++-------
net/ipv4/fib_rules.c | 2 +-
net/ipv4/fib_semantics.c | 2 +-
net/ipv4/fib_trie.c | 22 +++++++++++++---------
7 files changed, 30 insertions(+), 29 deletions(-)
--
2.56.0
next reply other threads:[~2026-10-14 8:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 8:26 Ido Schimmel [this message]
2026-10-14 8:26 ` [PATCH net-next 1/2] ipv4: Store netns in FIB table Ido Schimmel
2026-10-14 13:36 ` David Ahern
2026-10-14 8:26 ` [PATCH net-next 2/2] ipv4: Do not pass netns to fib_table_lookup() Ido Schimmel
2026-10-14 13:36 ` David Ahern
2026-10-14 9:58 ` [PATCH net-next 0/2] ipv4: Remove netns argument from fib_table_lookup() Björn Töpel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261014082612.1280756-1-idosch@nvidia.com \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox