Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: skb: allow up to 8 skb extension ids

The skb extension ids range from 0 .. 7 to fit their bits as flags into
a single byte. The ids are automatically enumnerated in enum skb_ext_id
in skbuff.h, where SKB_EXT_NUM is defined as the last value.

When having 8 skb extension ids (0 .. 7), SKB_EXT_NUM becomes 8 which is
a valid value for SKB_EXT_NUM.

Fixes: 96ea3a1e2d31 ("can: add CAN skb extension infrastructure")
Link: https://lore.kernel.org/netdev/aXoMqaA7b2CqJZNA@strlen.de/
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://patch.msgid.link/20260205-skb_ext-v1-1-9ba992ccee8b@hartkopp.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Oliver Hartkopp and committed by
Jakub Kicinski
abf981bb dddb0198

+1 -1
+1 -1
net/core/skbuff.c
··· 5158 5158 5159 5159 static void skb_extensions_init(void) 5160 5160 { 5161 - BUILD_BUG_ON(SKB_EXT_NUM >= 8); 5161 + BUILD_BUG_ON(SKB_EXT_NUM > 8); 5162 5162 #if !IS_ENABLED(CONFIG_KCOV_INSTRUMENT_ALL) 5163 5163 BUILD_BUG_ON(skb_ext_total_length() > 255); 5164 5164 #endif