]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: inline net_is_devmem_iov()
authorEric Dumazet <edumazet@google.com>
Thu, 22 Jan 2026 04:57:18 +0000 (04:57 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sun, 25 Jan 2026 21:18:53 +0000 (13:18 -0800)
commit87918dd4eafc0749a99cb763addc1c37fe7ebb6f
tree81cafd2279ef409ed5a0fbf84fceec26954cdf90
parentcbe41362be2c27e0237a94a404ae413cec9c2ad9
net: inline net_is_devmem_iov()

1) Inline this small helper to reduce code size and decrease cpu costs.
2) Constify its argument.
3) Move it to include/net/netmem.h, as a prereq for the following patch.

$ scripts/bloat-o-meter -t vmlinux.2 vmlinux.3
add/remove: 0/2 grow/shrink: 0/4 up/down: 0/-158 (-158)
Function                                     old     new   delta
validate_xmit_skb                            866     857      -9
__pfx_net_is_devmem_iov                       16       -     -16
net_is_devmem_iov                             22       -     -22
get_netmem                                   152     130     -22
put_netmem                                   140     114     -26
tcp_recvmsg_locked                          3860    3797     -63
Total: Before=22566015, After=22565857, chg -0.00%

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260122045720.1221017-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/netmem.h
net/core/devmem.c
net/core/devmem.h