netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, saeedm@nvidia.com, leon@kernel.org,
	tariqt@nvidia.com, andrew+netdev@lunn.ch, dakr@kernel.org,
	rafael@kernel.org, gregkh@linuxfoundation.org,
	przemyslaw.kitszel@intel.com, anthony.l.nguyen@intel.com,
	cratiu@nvidia.com, jacob.e.keller@intel.com,
	konrad.knitter@intel.com, cjubran@nvidia.com
Subject: [PATCH net-next RFC 0/3] net/mlx5: Introduce shared devlink instance for PFs on same chip
Date: Tue, 18 Mar 2025 13:47:03 +0100	[thread overview]
Message-ID: <20250318124706.94156-1-jiri@resnulli.us> (raw)

From: Jiri Pirko <jiri@nvidia.com>

This patchsets aims to introduce an entity, that allows to pin
devlink configuration objects (params, resources, etc) on for things
shared among multiple PFs.

As the shared entity that kind of float above the actual PFs does not
have explicit a PCI function, use faux device to back the devlink
instance. Expose the relationship between PF devlink instances and
this new shared instance by nested devlink attributes.

Example:

$ devlink dev
pci/0000:08:00.0:                   <--- PF0
  nested_devlink:
    auxiliary/mlx5_core.eth.0
faux/mlx5_core_83013c12b77faa1a30000c82a1045c91:  <--- shared devlink for chip that PF0 and PF1 are part of
  nested_devlink:
    pci/0000:08:00.0
    pci/0000:08:00.1
auxiliary/mlx5_core.eth.0           <--- ethernet auxiliary device of PF0
pci/0000:08:00.1:                   <--- PF1
  nested_devlink:
    auxiliary/mlx5_core.eth.1
auxiliary/mlx5_core.eth.1           <--- ethernet auxiliary device of PF1

The first patch is a little adjustment to recently introduced faux driver.
The second patch introduces the shared devlink instance.
The last patch introduces example devlink param for the shared instance.

Jiri Pirko (3):
  faux: extend the creation function for module namespace
  net/mlx5: Introduce shared devlink instance for PFs on same chip
  net/mlx5: Introduce enable_sriov param for shared devlink

 drivers/base/faux.c                           |  20 +-
 .../net/ethernet/mellanox/mlx5/core/Makefile  |   5 +-
 .../mellanox/mlx5/core/lib/nv_param.c         | 236 ++++++++++++++++++
 .../mellanox/mlx5/core/lib/nv_param.h         |  14 ++
 .../net/ethernet/mellanox/mlx5/core/main.c    |  18 ++
 .../ethernet/mellanox/mlx5/core/sh_devlink.c  | 164 ++++++++++++
 .../ethernet/mellanox/mlx5/core/sh_devlink.h  |  11 +
 include/linux/device/faux.h                   |   6 +-
 include/linux/mlx5/driver.h                   |   6 +
 include/linux/module.h                        |   2 +-
 10 files changed, 469 insertions(+), 13 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.h
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/sh_devlink.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/sh_devlink.h

-- 
2.48.1


             reply	other threads:[~2025-03-18 12:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 12:47 Jiri Pirko [this message]
2025-03-18 12:47 ` [PATCH net-next RFC 1/3] faux: extend the creation function for module namespace Jiri Pirko
2025-03-18 13:46   ` Greg KH
2025-03-18 14:19     ` Jiri Pirko
2025-03-18 14:36   ` Greg KH
2025-03-18 15:26     ` Jiri Pirko
2025-03-18 16:04       ` Greg KH
2025-03-18 16:51         ` Jiri Pirko
2025-03-18 17:27           ` Greg KH
2025-03-19 11:42             ` Jiri Pirko
2025-03-18 12:47 ` [PATCH net-next RFC 2/3] net/mlx5: Introduce shared devlink instance for PFs on same chip Jiri Pirko
2025-03-18 22:05   ` Keller, Jacob E
2025-03-19  8:21     ` Przemek Kitszel
2025-03-19 11:56       ` Jiri Pirko
2025-03-19 13:20         ` Przemek Kitszel
2025-03-19 18:42         ` Keller, Jacob E
2025-03-19 11:44     ` Jiri Pirko
2025-03-18 12:47 ` [PATCH net-next RFC 3/3] net/mlx5: Introduce enable_sriov param for shared devlink Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250318124706.94156-1-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=cjubran@nvidia.com \
    --cc=cratiu@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jacob.e.keller@intel.com \
    --cc=konrad.knitter@intel.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=rafael@kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).