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-11-18 16:20:25 -08:00
2025-10-23 15:46:04 +02:00
2024-04-15 10:26:35 +01:00
2025-07-18 17:27:47 -07:00
2025-07-24 18:34:55 -07:00
2025-11-26 16:56:33 -08:00
2026-01-06 17:14:35 -08:00
2025-12-03 18:58:57 -08:00
2026-01-12 18:00:12 -08:00
2026-01-12 18:00:12 -08:00
2025-06-08 09:07:37 +02:00
2025-07-02 14:32:29 -07:00
2025-08-29 19:36:31 -07:00
2022-12-12 15:18:25 -08:00
2024-10-11 15:35:05 -07:00
2025-04-17 12:26:50 -07:00
2025-12-03 17:24:33 -08:00
2025-02-24 14:27:53 -08:00
2023-08-02 10:09:32 +01:00
2025-08-29 19:04:20 -07:00
2022-10-28 20:13:54 -07:00
2025-11-05 17:41:29 -08:00
2025-10-16 15:42:49 -07:00
2024-03-07 21:12:41 -08:00
2025-11-07 19:02:40 -08:00
2025-07-01 12:55:49 +02:00
2025-09-22 17:40:30 -07:00
2025-04-17 18:55:14 -07:00
2025-08-26 17:34:31 -07:00
2025-05-20 19:18:24 -07:00
2025-08-28 16:05:31 -07:00
2024-09-11 20:44:31 -07:00
2025-10-24 17:57:20 -07:00
2025-12-03 17:24:33 -08:00
2024-04-01 10:49:28 +01:00
2025-09-14 11:35:17 -07:00
2025-10-02 15:17:01 -07:00
2025-07-07 18:42:12 -07:00
2024-10-02 17:23:23 -04:00
2025-06-11 21:30:29 +02:00
2025-08-28 16:05:31 -07:00
2025-09-04 10:19:17 +02:00
2025-11-25 19:20:42 -08:00
2025-11-25 19:20:42 -08:00
2025-08-28 16:05:32 -07:00
2025-10-14 13:37:26 +02:00
2025-11-28 20:16:57 -08:00
2021-09-13 16:35:58 -07:00
2023-07-27 20:33:16 -07:00
2025-01-27 14:37:41 -08:00
2025-02-17 16:43:04 -08:00
2025-12-02 11:08:39 -08:00
2025-08-21 10:12:11 +02:00
2022-03-07 11:31:34 +00:00
2025-09-23 18:21:36 -07:00
2025-11-04 16:07:37 -08:00
2025-11-18 15:27:34 +01:00
2025-04-11 18:58:10 -07:00
2025-11-06 13:38:11 +01:00
2024-11-12 12:05:33 +01:00
2026-01-12 19:30:57 -08:00
2025-09-22 17:40:30 -07:00
2021-10-22 12:35:51 -07:00
2025-09-22 17:40:30 -07:00
2025-07-11 10:51:55 -07:00
2024-08-02 17:16:59 -07:00
2026-01-04 09:54:32 -08:00
2025-07-18 16:57:21 -07:00
2025-10-16 12:04:47 -07:00
2024-12-16 12:51:40 +00:00
2024-10-02 17:23:23 -04:00
2025-05-30 19:53:51 -07:00
2025-09-11 12:00:20 +02:00