Skip to content

ipv4: Remove netns argument from fib_table_lookup()

Ido Schimmel netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2ipv4: Store netns in FIB tableinclude/net/ip_fib.h net/ipv4/fib_frontend.c net/ipv4/fib_trie.c+10 -61 replyApplied
2/2ipv4: Do not pass netns to fib_table_lookup()include/net/ip_fib.h net/core/filter.c net/ipv4/devinet.c +4 more+20 -231 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBjörn TöpelDavid Ahern
SeriesT-b R-b
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/2] ipv4: Remove netns argument from fib_table_lookup()

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/[email protected]/

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(-)
Signature · 1 line
2.56.0