All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch net-next v2 00/15] devlink: move port ops into separate structure
@ 2023-05-26 10:28 Jiri Pirko
  2023-05-26 10:28 ` [patch net-next v2 01/15] devlink: introduce port ops placeholder Jiri Pirko
                   ` (15 more replies)
  0 siblings, 16 replies; 31+ messages in thread
From: Jiri Pirko @ 2023-05-26 10:28 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.

---
v1->v2:
- see individual patches, there are 2 cosmetical changes basically:
    - fixed function names in kdoc comments
    - use dummy empty ops in case ops is null

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                        | 119 +++++----
 11 files changed, 298 insertions(+), 279 deletions(-)

-- 
2.39.2


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

end of thread, other threads:[~2023-06-01 22:16 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-26 10:28 [patch net-next v2 00/15] devlink: move port ops into separate structure Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 01/15] devlink: introduce port ops placeholder Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 02/15] ice: register devlink port for PF with ops Jiri Pirko
2023-05-26 10:52   ` Wilczynski, Michal
2023-05-26 11:35     ` Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 03/15] mlxsw_core: register devlink port " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 04/15] nfp: devlink: " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 05/15] devlink: move port_split/unsplit() ops into devlink_port_ops Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 06/15] mlx4: register devlink port with ops Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 07/15] devlink: move port_type_set() op into devlink_port_ops Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 08/15] sfc: register devlink port with ops Jiri Pirko
2023-05-30  8:02   ` Martin Habets
2023-05-26 10:28 ` [patch net-next v2 09/15] mlx5: register devlink ports " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 10/15] devlink: move port_fn_hw_addr_get/set() to devlink_port_ops Jiri Pirko
2023-05-30  8:03   ` Martin Habets
2023-05-26 10:28 ` [patch net-next v2 11/15] devlink: move port_fn_roce_get/set() " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 12/15] devlink: move port_fn_migratable_get/set() " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 13/15] devlink: move port_fn_state_get/set() " Jiri Pirko
2023-05-26 10:28 ` [patch net-next v2 14/15] devlink: move port_del() " Jiri Pirko
2023-05-27  4:10   ` Jakub Kicinski
2023-05-27  7:42     ` Jiri Pirko
2023-05-29  6:33       ` Jakub Kicinski
2023-05-29  8:31         ` Jiri Pirko
2023-05-30  1:41           ` Jakub Kicinski
2023-05-30  6:33             ` Jiri Pirko
2023-05-30  6:58             ` Jiri Pirko
2023-05-30 17:34               ` Jakub Kicinski
2023-05-31  6:33                 ` Jiri Pirko
2023-06-01 22:16                   ` Jacob Keller
2023-05-26 10:28 ` [patch net-next v2 15/15] devlink: save devlink_port_ops into a variable in devlink_port_function_validate() Jiri Pirko
2023-05-30 18:00 ` [patch net-next v2 00/15] devlink: move port ops into separate structure patchwork-bot+netdevbpf

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.