All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] net/mlx5: Introduce devlink param to disable SF aux dev probe
@ 2022-02-08 17:14 Moshe Shemesh
  2022-02-08 17:14 ` [PATCH net-next 1/4] net/mlx5: Split function_setup() to enable and open functions Moshe Shemesh
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Moshe Shemesh @ 2022-02-08 17:14 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski
  Cc: Jiri Pirko, Saeed Mahameed, netdev, linux-kernel, Moshe Shemesh

Currently SF device has all the aux devices enabled by default. Once
loaded, user who desire to disable some of them need to perform devlink
reload. This operation helps to reclaim memory that was not supposed
to be used, but the lost time in disabling and enabling again cannot be
recovered by this approach[1].
Therefore, introduce a new devlink generic parameter for PCI PF which
controls the creation of SFs. This parameter sets a flag in order to
disable all auxiliary devices of the SF. i.e.: All children auxiliary
devices of SF for RDMA, eth and vdpa-net are disabled by default and
hence no device initialization is done at probe stage.

$ devlink dev param set pci/0000:08:00.0 name enable_sfs_aux_devs \
              value false cmode runtime

Create SF:
$ devlink port add pci/0000:08:00.0 flavour pcisf pfnum 0 sfnum 11
$ devlink port function set pci/0000:08:00.0/32768 \
               hw_addr 00:00:00:00:00:11 state active

Now depending on the use case, the user can enable specific auxiliary
device(s). For example:

$ devlink dev param set auxiliary/mlx5_core.sf.1 \
              name enable_vnet value true cmde driverinit

Afterwards, user needs to reload the SF in order for the SF to come up
with the specific configuration:

$ devlink dev reload auxiliary/mlx5_core.sf.1

[1]
mlx5 devlink reload is taking about 2 seconds, which means that with
256 SFs we are speaking about ~8.5 minutes.

Shay Drory (4):
  net/mlx5: Split function_setup() to enable and open functions
  net/mlx5: Delete redundant default assignment of runtime devlink
    params
  devlink: Add new "enable_sfs_aux_devs" generic device param
  net/mlx5: Support enable_sfs_aux_devs devlink param

 .../networking/devlink/devlink-params.rst     |   5 +
 drivers/net/ethernet/mellanox/mlx5/core/dev.c |  16 ++
 .../net/ethernet/mellanox/mlx5/core/devlink.c |  51 ++---
 .../net/ethernet/mellanox/mlx5/core/eswitch.c |   3 +
 .../net/ethernet/mellanox/mlx5/core/health.c  |   5 +-
 .../net/ethernet/mellanox/mlx5/core/main.c    | 183 +++++++++++++++---
 .../ethernet/mellanox/mlx5/core/mlx5_core.h   |   6 +
 .../mellanox/mlx5/core/sf/dev/driver.c        |  13 +-
 .../ethernet/mellanox/mlx5/core/sf/devlink.c  |  40 ++++
 .../ethernet/mellanox/mlx5/core/sf/hw_table.c |   7 +
 .../net/ethernet/mellanox/mlx5/core/sf/priv.h |   2 +
 include/linux/mlx5/driver.h                   |   1 +
 include/net/devlink.h                         |   4 +
 net/core/devlink.c                            |   5 +
 14 files changed, 284 insertions(+), 57 deletions(-)

-- 
2.26.3


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

end of thread, other threads:[~2022-02-11  8:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 17:14 [PATCH net-next 0/4] net/mlx5: Introduce devlink param to disable SF aux dev probe Moshe Shemesh
2022-02-08 17:14 ` [PATCH net-next 1/4] net/mlx5: Split function_setup() to enable and open functions Moshe Shemesh
2022-02-08 17:14 ` [PATCH net-next 2/4] net/mlx5: Delete redundant default assignment of runtime devlink params Moshe Shemesh
2022-02-08 17:14 ` [PATCH net-next 3/4] devlink: Add new "enable_sfs_aux_devs" generic device param Moshe Shemesh
2022-02-08 17:14 ` [PATCH net-next 4/4] net/mlx5: Support enable_sfs_aux_devs devlink param Moshe Shemesh
2022-02-09  5:23 ` [PATCH net-next 0/4] net/mlx5: Introduce devlink param to disable SF aux dev probe Jakub Kicinski
2022-02-09  7:39   ` Moshe Shemesh
2022-02-09  9:57   ` Jiri Pirko
2022-02-10  1:25     ` Jakub Kicinski
2022-02-10  7:02       ` Jiri Pirko
2022-02-10 10:28         ` Moshe Shemesh
2022-02-10 19:09           ` Parav Pandit
2022-02-11  8:46             ` Moshe Shemesh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.