Files
linux/net/core
Eric Dumazet 0391ab577c net: add skbuff_clear() helper
clang is unable to inline the memset() calls in net/core/skbuff.c
when initializing allocated sk_buff.

memset(skb, 0, offsetof(struct sk_buff, tail));

This is unfortunate, because:

1) calling external memset_orig() helper adds a call/ret and
   typical setup cost.

2) offsetof(struct sk_buff, tail) == 0xb8 = 0x80 + 0x38

   On x86_64, memset_orig() performs two 64 bytes clear,
   then has to loop 7 times to clear the final 56 bytes.

skbuff_clear() makes sure the minimal and optimal code
is generated.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260109203836.1667441-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-12 19:30:57 -08:00
..
2025-08-29 19:36:31 -07:00
2024-03-07 21:12:41 -08:00
2024-04-01 10:49:28 +01:00
2025-02-17 16:43:04 -08:00
2025-04-11 18:58:10 -07:00
2026-01-12 19:30:57 -08:00