lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240806143307.14839-1-przemyslaw.kitszel@intel.com>
Date: Tue,  6 Aug 2024 16:33:02 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: netdev@...r.kernel.org,
	Ido Schimmel <idosch@...dia.com>,
	Petr Machata <petrm@...dia.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Jiri Pirko <jiri@...nulli.us>,
	Andrew Lunn <andrew@...n.ch>,
	Florian Fainelli <f.fainelli@...il.com>,
	Vladimir Oltean <olteanv@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Paolo Abeni <pabeni@...hat.com>,
	Saeed Mahameed <saeedm@...dia.com>,
	Leon Romanovsky <leon@...nel.org>,
	Tariq Toukan <tariqt@...dia.com>,
	Tony Nguyen <anthony.l.nguyen@...el.com>,
	nex.sw.ncis.osdt.itp.upstreaming@...el.com,
	Przemek Kitszel <przemyslaw.kitszel@...el.com>
Subject: [PATCH net-next 0/5] devlink: embed driver's priv data callback param into devlink_resource

(Patch 1)
Convert dsa to use devl_* variants of devlink resource related
calls, so we could remove devlink_* variants in next 2 patches.

(Patches 2,3)
Remove some unused functions that would otherwise need an update.

(Patch 4, the main one)
Then extend devlink resource to embed driver's priv data callback,
instead just storing a pointer (so drivers could put more context for
similar resource getters, to handle them via simple single function
instead of dumb duplication).

(Patch 5)
Make use of the new possibility from patch 4, I've picked the most
repetitive case.

Motivation: current API was to distracting for me to focus on adding my
new resources :)

I'm fine with it going through mlxsw or just netdev tree.

Przemek Kitszel (5):
  net: dsa: replace devlink resource registration calls by devl_
    variants
  devlink: remove unused devlink_resource_occ_get_register() and
    _unregister()
  devlink: remove unused devlink_resource_register()
  devlink: embed driver's priv data callback param into devlink_resource
  mlxsw: spectrum_kvdl: combine devlink resource occupation getters

 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  5 +
 include/net/devlink.h                         | 18 +---
 .../ethernet/mellanox/mlx5/core/sf/hw_table.c |  5 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c    |  5 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.c    | 19 ++--
 .../ethernet/mellanox/mlxsw/spectrum1_kvdl.c  | 80 +++++++--------
 .../ethernet/mellanox/mlxsw/spectrum_cnt.c    |  9 +-
 .../mellanox/mlxsw/spectrum_policer.c         |  6 +-
 .../mellanox/mlxsw/spectrum_port_range.c      |  2 +-
 .../ethernet/mellanox/mlxsw/spectrum_router.c |  4 +-
 .../ethernet/mellanox/mlxsw/spectrum_span.c   |  3 +-
 drivers/net/netdevsim/dev.c                   | 14 +--
 drivers/net/netdevsim/fib.c                   | 10 +-
 net/devlink/resource.c                        | 97 +++----------------
 net/dsa/devlink.c                             | 23 +++--
 15 files changed, 115 insertions(+), 185 deletions(-)


base-commit: 10a6545f0bdcbb920c6a8a033fe342111d204915
-- 
2.39.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ