Netdev List
 help / color / mirror / Atom feed
* [PATCH net] IB/IPoIB: ndo_set_rx_mode_async conversion
@ 2026-05-13 12:45 Dragos Tatulea
  2026-05-14 23:42 ` Jakub Kicinski
  2026-05-16  0:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Dragos Tatulea @ 2026-05-13 12:45 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky, Aleksandr Loktionov,
	Stanislav Fomichev, Paolo Abeni
  Cc: Dragos Tatulea, Tariq Toukan, Stanislav Fomichev, netdev,
	Cosmin Ratiu, linux-rdma, linux-kernel

The commit in the fixes tag added a warning for devices
that are netdev ops locked that they should be converted
to .ndo_set_rx_mode_async. IPoIB for mlx5 is such a
driver which was missed during the conversion because the
flow is more complex:
- mlx5 part of IPoIB device was converted to ops-lock in commit [1].
- ipoib_intf_init() then overrides netdev_ops with
  ipoib_netdev_ops_{pf,vf}, which still wired ndo_set_rx_mode to the
  legacy sync path -- tripping the new warning on every probe.

So now we have the following splat:
  netdevice: ib0 (uninitialized): ops-locked drivers should use ndo_set_rx_mode_async
  WARNING: net/core/dev.c:11366 at register_netdevice+0x83c/0x21d0
  ...
  register_netdev+0x1f/0x40
  ipoib_add_one+0x35c/0x880 [ib_ipoib]

This patch implements .ndo_set_rx_mode_async but it simply schedules the
multicast restart task like before. This is done to maintain the
assumption that this task and others [2] must run on the same order
workqueue to avoid racing with themselves. The race between
ipoib_mcast_join_task() and ipoib_mcast_restart_task() would be the most
obvious example.

[1] 8f7b00307bf1, "net/mlx5e: Convert mlx5 netdevs to instance locking")
[2] ipoib_mcast_join_task, ipoib_mcast_restart_task,
    ipoib_mcast_carrier_on_task, ipoib_reap_ah, ipoib_reap_neigh

Fixes: 3cbd22938877 ("net: warn ops-locked drivers still using ndo_set_rx_mode")
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 402671567736..3e1e1e861739 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1297,7 +1297,9 @@ static int ipoib_hard_header(struct sk_buff *skb,
 	return IPOIB_HARD_LEN;
 }
 
-static void ipoib_set_mcast_list(struct net_device *dev)
+static void ipoib_set_rx_mode_async(struct net_device *dev,
+				    struct netdev_hw_addr_list *uc,
+				    struct netdev_hw_addr_list *mc)
 {
 	struct ipoib_dev_priv *priv = ipoib_priv(dev);
 
@@ -2160,7 +2162,7 @@ static const struct net_device_ops ipoib_netdev_ops_pf = {
 	.ndo_fix_features	 = ipoib_fix_features,
 	.ndo_start_xmit		 = ipoib_start_xmit,
 	.ndo_tx_timeout		 = ipoib_timeout,
-	.ndo_set_rx_mode	 = ipoib_set_mcast_list,
+	.ndo_set_rx_mode_async	 = ipoib_set_rx_mode_async,
 	.ndo_get_iflink		 = ipoib_get_iflink,
 	.ndo_set_vf_link_state	 = ipoib_set_vf_link_state,
 	.ndo_get_vf_config	 = ipoib_get_vf_config,
@@ -2183,7 +2185,7 @@ static const struct net_device_ops ipoib_netdev_ops_vf = {
 	.ndo_fix_features	 = ipoib_fix_features,
 	.ndo_start_xmit	 	 = ipoib_start_xmit,
 	.ndo_tx_timeout		 = ipoib_timeout,
-	.ndo_set_rx_mode	 = ipoib_set_mcast_list,
+	.ndo_set_rx_mode_async	 = ipoib_set_rx_mode_async,
 	.ndo_get_iflink		 = ipoib_get_iflink,
 	.ndo_get_stats64	 = ipoib_get_stats,
 	.ndo_eth_ioctl		 = ipoib_ioctl,
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net] IB/IPoIB: ndo_set_rx_mode_async conversion
  2026-05-13 12:45 [PATCH net] IB/IPoIB: ndo_set_rx_mode_async conversion Dragos Tatulea
@ 2026-05-14 23:42 ` Jakub Kicinski
  2026-05-15 11:51   ` Jason Gunthorpe
  2026-05-16  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2026-05-14 23:42 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky
  Cc: Dragos Tatulea, Aleksandr Loktionov, Stanislav Fomichev,
	Paolo Abeni, Tariq Toukan, Stanislav Fomichev, netdev,
	Cosmin Ratiu, linux-rdma, linux-kernel

On Wed, 13 May 2026 15:45:18 +0300 Dragos Tatulea wrote:
>  drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 +++++---

Since it was tagged for "net" - can we get a stamp from RDMA?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] IB/IPoIB: ndo_set_rx_mode_async conversion
  2026-05-14 23:42 ` Jakub Kicinski
@ 2026-05-15 11:51   ` Jason Gunthorpe
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2026-05-15 11:51 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Leon Romanovsky, Dragos Tatulea, Aleksandr Loktionov,
	Stanislav Fomichev, Paolo Abeni, Tariq Toukan, Stanislav Fomichev,
	netdev, Cosmin Ratiu, linux-rdma, linux-kernel

On Thu, May 14, 2026 at 04:42:19PM -0700, Jakub Kicinski wrote:
> On Wed, 13 May 2026 15:45:18 +0300 Dragos Tatulea wrote:
> >  drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 +++++---
> 
> Since it was tagged for "net" - can we get a stamp from RDMA?

Acked-by: Jason Gunthorpe <jgg@nvidia.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] IB/IPoIB: ndo_set_rx_mode_async conversion
  2026-05-13 12:45 [PATCH net] IB/IPoIB: ndo_set_rx_mode_async conversion Dragos Tatulea
  2026-05-14 23:42 ` Jakub Kicinski
@ 2026-05-16  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-05-16  0:30 UTC (permalink / raw)
  To: Dragos Tatulea
  Cc: jgg, leon, aleksandr.loktionov, sdf.kernel, pabeni, tariqt, sdf,
	netdev, cratiu, linux-rdma, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 13 May 2026 15:45:18 +0300 you wrote:
> The commit in the fixes tag added a warning for devices
> that are netdev ops locked that they should be converted
> to .ndo_set_rx_mode_async. IPoIB for mlx5 is such a
> driver which was missed during the conversion because the
> flow is more complex:
> - mlx5 part of IPoIB device was converted to ops-lock in commit [1].
> - ipoib_intf_init() then overrides netdev_ops with
>   ipoib_netdev_ops_{pf,vf}, which still wired ndo_set_rx_mode to the
>   legacy sync path -- tripping the new warning on every probe.
> 
> [...]

Here is the summary with links:
  - [net] IB/IPoIB: ndo_set_rx_mode_async conversion
    https://git.kernel.org/netdev/net/c/cfd08f09723c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-16  0:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 12:45 [PATCH net] IB/IPoIB: ndo_set_rx_mode_async conversion Dragos Tatulea
2026-05-14 23:42 ` Jakub Kicinski
2026-05-15 11:51   ` Jason Gunthorpe
2026-05-16  0:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox