]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: mark deliver_skb() as unlikely and not inlined
authorEric Dumazet <edumazet@google.com>
Mon, 3 Nov 2025 16:52:56 +0000 (16:52 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 5 Nov 2025 00:08:25 +0000 (16:08 -0800)
commit46173144e03d87beddf02ee785cbdf818087687a
tree4cf8f4996ae51e5259298748cac40a90fe656955
parent105bae321862b3bac300c73748192ff61a5129cd
net: mark deliver_skb() as unlikely and not inlined

deliver_skb() should not be inlined as is it not called
in the fast path.

Add unlikely() clauses giving hints to the compiler about this fact.

Before this patch:

size net/core/dev.o
   text    data     bss     dec     hex filename
 121794   13330     176  135300   21084 net/core/dev.o

__netif_receive_skb_core() size on x86_64 : 4080 bytes.

After:

size net/core/dev.o
  text    data     bss     dec     hex filenamee
 120330   13338     176  133844   20ad4 net/core/dev.o

__netif_receive_skb_core() size on x86_64 : 2781 bytes.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20251103165256.1712169-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c