Skip to contentSkip to conversation

net: mana: Fix build errors when CONFIG_NET_SHAPER is disabled

PATCH Applied Erni Sri Satya Vennela 3 participants 3 messages Jun 25, 2025 – Jun 27, 2025

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

PATCH v2 1/1 net: mana: Fix build errors when CONFIG_NET_SHAPER is disabled

Fix build errors when CONFIG_NET_SHAPER is disabled, including:

drivers/net/ethernet/microsoft/mana/mana_en.c:804:10: error:
'const struct net_device_ops' has no member named 'net_shaper_ops'

804 | .net_shaper_ops = &mana_shaper_ops,

drivers/net/ethernet/microsoft/mana/mana_en.c:804:35: error:
initialization of 'int (*)(struct net_device *, struct neigh_parms *)' from incompatible pointer type 'const struct net_shaper_ops *' [-Werror=incompatible-pointer-types]

804 | .net_shaper_ops = &mana_shaper_ops,

Fixes 75cabb46935b ("net: mana: Add support for net_shaper_ops")

---
Changes in v2:
* Use "select NET_SHAPER" in Kconfig instead of adding multiple checks for CONFIG_NET_SHAPER.

---
 drivers/net/ethernet/microsoft/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/microsoft/Kconfig +1 -0
index 901fbffbf718..3f36ee6a8ece 100644
@@ -22,6 +22,7 @@ config MICROSOFT_MANA
 	depends on PCI_HYPERV
 	select AUXILIARY_BUS
 	select PAGE_POOL
+	select NET_SHAPER
 	help
 	  This driver supports Microsoft Azure Network Adapter (MANA).
 	  So far, the driver is only supported on X86_64.
Signature · 1 line
2.34.1
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 14 lines · Erni Sri Satya Vennela

Fix build errors when CONFIG_NET_SHAPER is disabled, including:

drivers/net/ethernet/microsoft/mana/mana_en.c:804:10: error:
'const struct net_device_ops' has no member named 'net_shaper_ops'

804 | .net_shaper_ops = &mana_shaper_ops,

drivers/net/ethernet/microsoft/mana/mana_en.c:804:35: error:
initialization of 'int (*)(struct net_device *, struct neigh_parms *)' from incompatible pointer type 'const struct net_shaper_ops *' [-Werror=incompatible-pointer-types]

804 | .net_shaper_ops = &mana_shaper_ops,

Quoted 8 lines
Fixes 75cabb46935b ("net: mana: Add support for net_shaper_ops")

---
Changes in v2:
* Use "select NET_SHAPER" in Kconfig instead of adding multiple checks for CONFIG_NET_SHAPER.

#2 lore raw
In reply to Erni Sri Satya Vennela
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 25 Jun 2025 04:35:55 -0700 you wrote:

Fix build errors when CONFIG_NET_SHAPER is disabled, including:

drivers/net/ethernet/microsoft/mana/mana_en.c:804:10: error:
'const struct net_device_ops' has no member named 'net_shaper_ops'

804 | .net_shaper_ops = &mana_shaper_ops,

[...]

Here is the summary with links:
- [net-next,v2] net: mana: Fix build errors when CONFIG_NET_SHAPER is disabled

    https://git.kernel.org/netdev/net-next/c/11cd02069872

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html