netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next 0/7] devlink: params cleanups and devl_param_driverinit_value_get() fix
@ 2023-02-09 15:43 Jiri Pirko
  2023-02-09 15:43 ` [patch net-next 1/7] devlink: don't use strcpy() to copy param value Jiri Pirko
                   ` (8 more replies)
  0 siblings, 9 replies; 24+ messages in thread
From: Jiri Pirko @ 2023-02-09 15:43 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, pabeni, edumazet, tariqt, saeedm, jacob.e.keller,
	gal, kim.phillips, moshe

From: Jiri Pirko <jiri@nvidia.com>

The primary motivation of this patchset is the patch #6, which fixes an
issue introduced by 075935f0ae0f ("devlink: protect devlink param list
by instance lock") and reported by Kim Phillips <kim.phillips@amd.com>
(https://lore.kernel.org/netdev/719de4f0-76ac-e8b9-38a9-167ae239efc7@amd.com/)
and my colleagues doing mlx5 driver regression testing.

The basis idea is that devl_param_driverinit_value_get() could be
possible to the called without holding devlink intance lock in
most of the cases (all existing ones in the current codebase),
which would fix some mlx5 flows where the lock is not held.

To achieve that, make sure that the param value does not change between
reloads with patch #2.

Also, convert the param list to xarray which removes the worry about
list_head consistency when doing lockless lookup.

The rest of the patches are doing some small related cleanup of things
that poke me in the eye during the work.

Jiri Pirko (7):
  devlink: don't use strcpy() to copy param value
  devlink: make sure driver does not read updated driverinit param
    before reload
  devlink: fix the name of value arg of
    devl_param_driverinit_value_get()
  devlink: use xa_for_each_start() helper in
    devlink_nl_cmd_port_get_dump_one()
  devlink: convert param list to xarray
  devlink: allow to call devl_param_driverinit_value_get() without
    holding instance lock
  devlink: add forgotten devlink instance lock assertion to
    devl_param_driverinit_value_set()

 include/net/devlink.h       |   6 +-
 net/devlink/core.c          |   4 +-
 net/devlink/dev.c           |   2 +
 net/devlink/devl_internal.h |   5 +-
 net/devlink/leftover.c      | 139 ++++++++++++++++++++----------------
 5 files changed, 90 insertions(+), 66 deletions(-)

-- 
2.39.0


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

end of thread, other threads:[~2023-02-10  8:51 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-09 15:43 [patch net-next 0/7] devlink: params cleanups and devl_param_driverinit_value_get() fix Jiri Pirko
2023-02-09 15:43 ` [patch net-next 1/7] devlink: don't use strcpy() to copy param value Jiri Pirko
2023-02-09 16:39   ` Simon Horman
2023-02-09 15:43 ` [patch net-next 2/7] devlink: make sure driver does not read updated driverinit param before reload Jiri Pirko
2023-02-09 16:42   ` Simon Horman
2023-02-09 15:43 ` [patch net-next 3/7] devlink: fix the name of value arg of devl_param_driverinit_value_get() Jiri Pirko
2023-02-09 16:43   ` Simon Horman
2023-02-09 15:43 ` [patch net-next 4/7] devlink: use xa_for_each_start() helper in devlink_nl_cmd_port_get_dump_one() Jiri Pirko
2023-02-09 16:43   ` Simon Horman
2023-02-09 15:43 ` [patch net-next 5/7] devlink: convert param list to xarray Jiri Pirko
2023-02-09 16:45   ` Simon Horman
2023-02-10  7:53     ` Jiri Pirko
2023-02-10  8:51       ` Simon Horman
2023-02-09 15:43 ` [patch net-next 6/7] devlink: allow to call devl_param_driverinit_value_get() without holding instance lock Jiri Pirko
2023-02-09 16:46   ` Simon Horman
2023-02-09 15:43 ` [patch net-next 7/7] devlink: add forgotten devlink instance lock assertion to devl_param_driverinit_value_set() Jiri Pirko
2023-02-09 16:47   ` Simon Horman
2023-02-09 21:05 ` [patch net-next 0/7] devlink: params cleanups and devl_param_driverinit_value_get() fix Kim Phillips
2023-02-09 21:31   ` Jakub Kicinski
2023-02-09 22:37     ` Kim Phillips
2023-02-10  0:16       ` Jakub Kicinski
2023-02-10  7:55       ` Jiri Pirko
2023-02-10  4:53 ` Jakub Kicinski
2023-02-10  7:56   ` Jiri Pirko

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).