public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [patch net-next 0/4] net/mlx5: expose peer SF devlink instance
@ 2023-08-15 14:51 Jiri Pirko
  2023-08-15 14:51 ` [patch net-next 1/4] net/mlx5: Disable eswitch as the first thing in mlx5_unload() Jiri Pirko
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Jiri Pirko @ 2023-08-15 14:51 UTC (permalink / raw)
  To: netdev; +Cc: kuba, pabeni, davem, edumazet, moshe, saeedm, shayd, leon

From: Jiri Pirko <jiri@nvidia.com>

Currently, the user can instantiate new SF using "devlink port add"
command. That creates an E-switch representor devlink port.

When user activates this SF, there is an auxiliary device created and
probed for it which leads to SF devlink instance creation.

There is 1:1 relationship between E-switch representor devlink port and
the SF auxiliary device devlink instance.

Expose the relation to the user by introducing new netlink attribute
DEVLINK_PORT_FN_ATTR_DEVLINK which contains the devlink instance related
to devlink port function. This is done by patch #3.

Patch #4 implements this in mlx5 driver.

Patches #1 and #2 are just small dependencies.

Examples:
$ devlink port add pci/0000:08:00.0 flavour pcisf pfnum 0 sfnum 106
pci/0000:08:00.0/32768: type eth netdev eth4 flavour pcisf controller 0 pfnum 0 sfnum 106 splittable false
  function:
    hw_addr 00:00:00:00:00:00 state inactive opstate detached roce enable
$ devlink port function set pci/0000:08:00.0/32768 state active
$ devlink port show pci/0000:08:00.0/32768
pci/0000:08:00.0/32768: type eth netdev eth4 flavour pcisf controller 0 pfnum 0 sfnum 106 splittable false
  function:
    hw_addr 00:00:00:00:00:00 state active opstate attached roce enable nested_devlink auxiliary/mlx5_core.sf.2

Jiri Pirko (4):
  net/mlx5: Disable eswitch as the first thing in mlx5_unload()
  net/mlx5: Lift reload limitation when SFs are present
  devlink: expose peer SF devlink instance
  net/mlx5: SF, Implement peer devlink set for SF representor devlink
    port

 .../net/ethernet/mellanox/mlx5/core/devlink.c | 11 ---
 .../net/ethernet/mellanox/mlx5/core/main.c    |  2 +-
 .../ethernet/mellanox/mlx5/core/sf/dev/dev.h  |  5 ++
 .../mellanox/mlx5/core/sf/dev/driver.c        | 14 ++++
 .../ethernet/mellanox/mlx5/core/sf/devlink.c  | 75 +++++++++++++++++++
 include/linux/mlx5/device.h                   |  1 +
 include/net/devlink.h                         |  4 +
 include/uapi/linux/devlink.h                  |  1 +
 net/devlink/leftover.c                        | 45 ++++++++++-
 9 files changed, 143 insertions(+), 15 deletions(-)

-- 
2.41.0


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

end of thread, other threads:[~2023-08-23 13:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-15 14:51 [patch net-next 0/4] net/mlx5: expose peer SF devlink instance Jiri Pirko
2023-08-15 14:51 ` [patch net-next 1/4] net/mlx5: Disable eswitch as the first thing in mlx5_unload() Jiri Pirko
2023-08-15 14:51 ` [patch net-next 2/4] net/mlx5: Lift reload limitation when SFs are present Jiri Pirko
2023-08-15 14:51 ` [patch net-next 3/4] devlink: expose peer SF devlink instance Jiri Pirko
2023-08-15 14:51 ` [patch net-next 4/4] net/mlx5: SF, Implement peer devlink set for SF representor devlink port Jiri Pirko
2023-08-18  2:34 ` [patch net-next 0/4] net/mlx5: expose peer SF devlink instance Jakub Kicinski
2023-08-18  7:30   ` Jiri Pirko
2023-08-18 21:20     ` Jakub Kicinski
2023-08-21 10:49       ` Jiri Pirko
2023-08-21 20:19         ` Jakub Kicinski
2023-08-22  6:36           ` Jiri Pirko
2023-08-22 15:28             ` Jakub Kicinski
2023-08-22 17:40               ` Jiri Pirko
2023-08-23 13:28               ` Jiri Pirko

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