Skip to contentSkip to conversation

netdevsim: fix build if SKB_EXTENSIONS=n

PATCH Applied Qingfang Deng 2 participants 2 messages Mar 24 – Mar 27

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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_put

cc1: some warnings being treated as errors

Add a stub to fix the build.

Fixes 7d9351435ebb ("netdevsim: drop PSP ext ref on forward failure")
---
 include/linux/skbuff.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/skbuff.h +1 -0
index 9cc98f850f1d..fbfa9852e82a 100644
@@ -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
#1 lore raw
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 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_put

cc1: 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