netdevsim: fix build if SKB_EXTENSIONS=n
Subsystems (2)
PATCH 1/1 netdevsim: fix build if SKB_EXTENSIONS=n
__skb_ext_put() is not declared if SKB_EXTENSIONS is not enabled, which causes a build error:
drivers/net/netdevsim/netdev.c: In function 'nsim_forward_skb':drivers/net/netdevsim/netdev.c:114:25: error: implicit declaration of function '__skb_ext_put'; did you mean 'skb_ext_put'? [-Werror=implicit-function-declaration]
114 | __skb_ext_put(psp_ext);
| ^~~~~~~~~~~~~
| skb_ext_putcc1: some warnings being treated as errors
Add a stub to fix the build.
--- include/linux/skbuff.h | 1 + 1 file changed, 1 insertion(+)
include/linux/skbuff.h +1 -0
@@ -5106,6 +5106,7 @@ static inline bool skb_has_extensions(struct sk_buff *skb) return unlikely(skb->active_extensions); }#else +static inline void __skb_ext_put (struct skb_ext *ext) {}static inline void skb_ext_put (struct sk_buff *skb) {}static inline void skb_ext_reset (struct sk_buff *skb) {}static inline void skb_ext_del (struct sk_buff *skb,int unused) {}
Signature · 1 line
2.43.0
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Tue, 24 Mar 2026 22:08:56 +0800 you wrote:
__skb_ext_put()is not declared ifSKB_EXTENSIONSis not enabled, which causes a build error:
drivers/net/netdevsim/netdev.c: In function 'nsim_forward_skb':drivers/net/netdevsim/netdev.c:114:25: error: implicit declaration of function '__skb_ext_put'; did you mean 'skb_ext_put'? [-Werror=implicit-function-declaration]114 | __skb_ext_put(psp_ext); | ^~~~~~~~~~~~~ | skb_ext_putcc1: some warnings being treated as errors
[...]
Here is the summary with links:
- [net] netdevsim: fix build if SKB_EXTENSIONS=n
https://git.kernel.org/netdev/net/c/57a04a13aac1
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html