Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] ipv4: Remove netns argument from fib_table_lookup()
@ 2026-10-14  8:26 Ido Schimmel
  2026-10-14  8:26 ` [PATCH net-next 1/2] ipv4: Store netns in FIB table Ido Schimmel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ido Schimmel @ 2026-10-14  8:26 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, pabeni, edumazet, dsahern, horms, Ido Schimmel

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-14 13:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14  8:26 [PATCH net-next 0/2] ipv4: Remove netns argument from fib_table_lookup() Ido Schimmel
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox