Re: [net-next 0/6] move CAN skb headroom content to skb extensions
From: Florian Westphal <fw@strlen.de>
Date: 2026-01-28 16:25:49
Also in:
linux-can
From: Florian Westphal <fw@strlen.de>
Date: 2026-01-28 16:25:49
Also in:
linux-can
Oliver Hartkopp [off-list ref] wrote:
Ok. But then I don't see any real pressure to do the extension right now. There doesn't seem so much changes adding new skb extensions users. And we still have a free slot even if all users would have been enabled (which is not the case due to the mutually exclusive options).
Yes.
The good thing is that skb extensions are very efficient. Which leads to the bad thing that we only can detect the problems at build time with BUILD_BUG_ON(SKB_EXT_NUM > 8); BUILD_BUG_ON(skb_ext_total_length() > 255); For (SKB_EXT_NUM > 8) the upgrade of active_extensions to u16 should simply make it. Probably with some #ifdef magic only. But thinking about BUILD_BUG_ON(skb_ext_total_length() > 255): Shouldn't this be SKB_EXT_CHUNKSIZEOF(struct skb_ext) + sum of the skb ext user data which can be up to 255 * SKB_EXT_ALIGN_VALUE (= 2040) ???
Why? Its not about the size in bytes, its there to make sure ext->offset[] (u8) won't overflow for any of the extensions. Maybe a comment would help.