All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch net-next 00/15] devlink: move port ops into separate structure
@ 2023-05-24 12:18 Jiri Pirko
  2023-05-24 12:18 ` [patch net-next 01/15] devlink: introduce port ops placeholder Jiri Pirko
                   ` (15 more replies)
  0 siblings, 16 replies; 36+ messages in thread
From: Jiri Pirko @ 2023-05-24 12:18 UTC (permalink / raw)
  To: netdev
  Cc: kuba, pabeni, davem, edumazet, leon, saeedm, moshe,
	jesse.brandeburg, anthony.l.nguyen, tariqt, idosch, petrm,
	simon.horman, ecree.xilinx, habetsm.xilinx, michal.wilczynski,
	jacob.e.keller

From: Jiri Pirko <jiri@nvidia.com>

In devlink, some of the objects have separate ops registered alongside
with the object itself. Port however have ops in devlink_ops structure.
For drivers what register multiple kinds of ports with different ops
this is not convenient.

This patchset changes does following changes:
1) Introduces devlink_port_ops with functions that allow devlink port
   to be registered passing a pointer to driver port ops. (patch #1)
2) Converts drivers to define port_ops and register ports passing the
   ops pointer. (patches #2, #3, #4, #6, #8, and #9)
3) Moves ops from devlink_ops struct to devlink_port_ops.
   (patches #5, #7, #10-15)

No functional changes.

Jiri Pirko (15):
  devlink: introduce port ops placeholder
  ice: register devlink port for PF with ops
  mlxsw_core: register devlink port with ops
  nfp: devlink: register devlink port with ops
  devlink: move port_split/unsplit() ops into devlink_port_ops
  mlx4: register devlink port with ops
  devlink: move port_type_set() op into devlink_port_ops
  sfc: register devlink port with ops
  mlx5: register devlink ports with ops
  devlink: move port_fn_hw_addr_get/set() to devlink_port_ops
  devlink: move port_fn_roce_get/set() to devlink_port_ops
  devlink: move port_fn_migratable_get/set() to devlink_port_ops
  devlink: move port_fn_state_get/set() to devlink_port_ops
  devlink: move port_del() to devlink_port_ops
  devlink: save devlink_port_ops into a variable in
    devlink_port_function_validate()

 drivers/net/ethernet/intel/ice/ice_devlink.c  |  10 +-
 drivers/net/ethernet/mellanox/mlx4/main.c     |  58 ++---
 .../net/ethernet/mellanox/mlx5/core/devlink.c |   9 -
 .../mellanox/mlx5/core/esw/devlink_port.c     |  29 ++-
 .../net/ethernet/mellanox/mlx5/core/eswitch.h |  12 +-
 .../mellanox/mlx5/core/eswitch_offloads.c     |  12 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c    |  10 +-
 .../net/ethernet/netronome/nfp/nfp_devlink.c  |  10 +-
 drivers/net/ethernet/sfc/efx_devlink.c        |  80 +++---
 include/net/devlink.h                         | 228 +++++++++---------
 net/devlink/leftover.c                        | 120 +++++----
 11 files changed, 298 insertions(+), 280 deletions(-)

-- 
2.39.2


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

end of thread, other threads:[~2023-05-26  8:53 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-24 12:18 [patch net-next 00/15] devlink: move port ops into separate structure Jiri Pirko
2023-05-24 12:18 ` [patch net-next 01/15] devlink: introduce port ops placeholder Jiri Pirko
2023-05-24 20:51   ` kernel test robot
2023-05-25  4:48   ` Jakub Kicinski
2023-05-25  6:07     ` Jiri Pirko
2023-05-24 12:18 ` [patch net-next 02/15] ice: register devlink port for PF with ops Jiri Pirko
2023-05-24 17:30   ` Jesse Brandeburg
2023-05-24 12:18 ` [patch net-next 03/15] mlxsw_core: register devlink port " Jiri Pirko
2023-05-25 12:36   ` Petr Machata
2023-05-24 12:18 ` [patch net-next 04/15] nfp: devlink: " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 05/15] devlink: move port_split/unsplit() ops into devlink_port_ops Jiri Pirko
2023-05-24 17:32   ` Jesse Brandeburg
2023-05-25  4:53   ` Jakub Kicinski
2023-05-25  6:05     ` Jiri Pirko
2023-05-25 15:27       ` Jakub Kicinski
2023-05-25 16:53         ` Jiri Pirko
2023-05-25 12:37   ` Petr Machata
2023-05-24 12:18 ` [patch net-next 06/15] mlx4: register devlink port with ops Jiri Pirko
2023-05-24 12:18 ` [patch net-next 07/15] devlink: move port_type_set() op into devlink_port_ops Jiri Pirko
2023-05-24 12:18 ` [patch net-next 08/15] sfc: register devlink port with ops Jiri Pirko
2023-05-24 17:57   ` Alejandro Lucero Palau
2023-05-25  6:10     ` Jiri Pirko
2023-05-25 15:13     ` Alejandro Lucero Palau
2023-05-25 16:52       ` Jiri Pirko
2023-05-24 12:18 ` [patch net-next 09/15] mlx5: register devlink ports " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 10/15] devlink: move port_fn_hw_addr_get/set() to devlink_port_ops Jiri Pirko
2023-05-24 12:18 ` [patch net-next 11/15] devlink: move port_fn_roce_get/set() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 12/15] devlink: move port_fn_migratable_get/set() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 13/15] devlink: move port_fn_state_get/set() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 14/15] devlink: move port_del() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 15/15] devlink: save devlink_port_ops into a variable in devlink_port_function_validate() Jiri Pirko
2023-05-25  4:55   ` Jakub Kicinski
2023-05-25  5:58     ` Jiri Pirko
2023-05-25 15:29       ` Jakub Kicinski
2023-05-26  8:53         ` Jiri Pirko
2023-05-24 14:02 ` [patch net-next 00/15] devlink: move port ops into separate structure Petr Machata

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.