]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ipvlan: remove ipvlan_ht_addr_lookup()
authorEric Dumazet <edumazet@google.com>
Thu, 22 Jan 2026 16:50:49 +0000 (16:50 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sun, 25 Jan 2026 22:35:19 +0000 (14:35 -0800)
commit0541302227817d1abb16b3aa7d968ce574272724
treedc3c7cb1163abe693e0a535d20589c5b7ebe313d
parent37b0ea8fef56ccc29bd5a07f235ac218f7f98379
ipvlan: remove ipvlan_ht_addr_lookup()

ipvlan_ht_addr_lookup() is called four times and not inlined.

Split it to ipvlan_ht_addr_lookup6() and ipvlan_ht_addr_lookup4()
and rework ipvlan_addr_lookup() to call these helpers once,
so that they are (auto)inlined.

After this change, ipvlan_addr_lookup() is faster, and we save
350 bytes of text on x86_64.

$ scripts/bloat-o-meter -t vmlinux.old vmlinux.new
add/remove: 0/2 grow/shrink: 1/0 up/down: 123/-473 (-350)
Function                                     old     new   delta
ipvlan_addr_lookup                           467     590    +123
__pfx_ipvlan_ht_addr_lookup                   16       -     -16
ipvlan_ht_addr_lookup                        457       -    -457
Total: Before=22571833, After=22571483, chg -0.00%

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Mahesh Bandewar <maheshb@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260122165049.2366985-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipvlan/ipvlan_core.c