mbox series

[net-next,v3,00/11] Convert mlx4 to use auxiliary bus

Message ID 20230821131225.11290-1-petr.pavlu@suse.com (mailing list archive)
Headers show
Series Convert mlx4 to use auxiliary bus | expand

Message

Petr Pavlu Aug. 21, 2023, 1:12 p.m. UTC
This series converts the mlx4 drivers to use auxiliary bus, similarly to
how mlx5 was converted [1]. The first 6 patches are preparatory changes,
the remaining 4 are the final conversion.

Initial motivation for this change was to address a problem related to
loading mlx4_en/mlx4_ib by mlx4_core using request_module_nowait(). When
doing such a load in initrd, the operation is asynchronous to any init
control and can get unexpectedly affected/interrupted by an eventual
root switch. Using an auxiliary bus leaves these module loads to udevd
which better integrates with systemd processing. [2]

General benefit is to get rid of custom interface logic and instead use
a common facility available for this task. An obvious risk is that some
new bug is introduced by the conversion.

Leon Romanovsky was kind enough to check for me that the series passes
their verification tests.

Changes since v2 [3]:
* Use 'void *' as the event param of mlx4_dispatch_event().

Changes since v1 [4]:
* Fix a missing definition of the err variable in mlx4_en_add().
* Remove not needed comments about the event type in mlx4_en_event()
  and mlx4_ib_event().

[1] https://lore.kernel.org/netdev/20201101201542.2027568-1-leon@kernel.org/
[2] https://lore.kernel.org/netdev/0a361ac2-c6bd-2b18-4841-b1b991f0635e@suse.com/
[3] https://lore.kernel.org/netdev/20230813145127.10653-1-petr.pavlu@suse.com/
[4] https://lore.kernel.org/netdev/20230804150527.6117-1-petr.pavlu@suse.com/

Petr Pavlu (11):
  mlx4: Get rid of the mlx4_interface.get_dev callback
  mlx4: Rename member mlx4_en_dev.nb to netdev_nb
  mlx4: Use 'void *' as the event param of mlx4_dispatch_event()
  mlx4: Replace the mlx4_interface.event callback with a notifier
  mlx4: Get rid of the mlx4_interface.activate callback
  mlx4: Move the bond work to the core driver
  mlx4: Avoid resetting MLX4_INTFF_BONDING per driver
  mlx4: Register mlx4 devices to an auxiliary virtual bus
  mlx4: Connect the ethernet part to the auxiliary bus
  mlx4: Connect the infiniband part to the auxiliary bus
  mlx4: Delete custom device management logic

 drivers/infiniband/hw/mlx4/main.c             | 218 ++++++-----
 drivers/infiniband/hw/mlx4/mlx4_ib.h          |   2 +
 drivers/net/ethernet/mellanox/mlx4/Kconfig    |   1 +
 drivers/net/ethernet/mellanox/mlx4/catas.c    |   2 +-
 drivers/net/ethernet/mellanox/mlx4/cmd.c      |   4 +-
 drivers/net/ethernet/mellanox/mlx4/en_main.c  | 155 +++++---
 .../net/ethernet/mellanox/mlx4/en_netdev.c    |  64 +--
 drivers/net/ethernet/mellanox/mlx4/eq.c       |  15 +-
 drivers/net/ethernet/mellanox/mlx4/intf.c     | 363 ++++++++++++------
 drivers/net/ethernet/mellanox/mlx4/main.c     | 110 ++++--
 drivers/net/ethernet/mellanox/mlx4/mlx4.h     |  18 +-
 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h  |   4 +-
 include/linux/mlx4/device.h                   |  20 +
 include/linux/mlx4/driver.h                   |  42 +-
 14 files changed, 606 insertions(+), 412 deletions(-)


base-commit: cb39c35783f26892bb1a72b1115c94fa2e77f4c5

Comments

patchwork-bot+netdevbpf@kernel.org Aug. 23, 2023, 7:30 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Mon, 21 Aug 2023 15:12:14 +0200 you wrote:
> This series converts the mlx4 drivers to use auxiliary bus, similarly to
> how mlx5 was converted [1]. The first 6 patches are preparatory changes,
> the remaining 4 are the final conversion.
> 
> Initial motivation for this change was to address a problem related to
> loading mlx4_en/mlx4_ib by mlx4_core using request_module_nowait(). When
> doing such a load in initrd, the operation is asynchronous to any init
> control and can get unexpectedly affected/interrupted by an eventual
> root switch. Using an auxiliary bus leaves these module loads to udevd
> which better integrates with systemd processing. [2]
> 
> [...]

Here is the summary with links:
  - [net-next,v3,01/11] mlx4: Get rid of the mlx4_interface.get_dev callback
    https://git.kernel.org/netdev/net-next/c/71ab55a9af80
  - [net-next,v3,02/11] mlx4: Rename member mlx4_en_dev.nb to netdev_nb
    https://git.kernel.org/netdev/net-next/c/ef5617e34376
  - [net-next,v3,03/11] mlx4: Use 'void *' as the event param of mlx4_dispatch_event()
    https://git.kernel.org/netdev/net-next/c/7ba189ac52ac
  - [net-next,v3,04/11] mlx4: Replace the mlx4_interface.event callback with a notifier
    https://git.kernel.org/netdev/net-next/c/73d68002a02e
  - [net-next,v3,05/11] mlx4: Get rid of the mlx4_interface.activate callback
    https://git.kernel.org/netdev/net-next/c/13f857111cb2
  - [net-next,v3,06/11] mlx4: Move the bond work to the core driver
    https://git.kernel.org/netdev/net-next/c/e2fb47d4eb5c
  - [net-next,v3,07/11] mlx4: Avoid resetting MLX4_INTFF_BONDING per driver
    https://git.kernel.org/netdev/net-next/c/c9452b8fd2ec
  - [net-next,v3,08/11] mlx4: Register mlx4 devices to an auxiliary virtual bus
    https://git.kernel.org/netdev/net-next/c/8c2d2b87719b
  - [net-next,v3,09/11] mlx4: Connect the ethernet part to the auxiliary bus
    https://git.kernel.org/netdev/net-next/c/eb93ae495a73
  - [net-next,v3,10/11] mlx4: Connect the infiniband part to the auxiliary bus
    https://git.kernel.org/netdev/net-next/c/7d22b1cb9d84
  - [net-next,v3,11/11] mlx4: Delete custom device management logic
    https://git.kernel.org/netdev/net-next/c/c138cdb89a14

You are awesome, thank you!