Merge branch 'devlink-params-cleanup'
authorDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2023 09:49:14 +0000 (09:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2023 09:49:14 +0000 (09:49 +0000)
commit238052e0449d23d9a8aca811242882b27a26c231
tree63c066beb07d3b8cbde8f58f7cc77fe1d69797e1
parent170677fee45baa955b3f7c1f41e6031d1d1e2272
parent6b4bfa43ce29165fb0a2a8ef770d94c1d93e5ad8
Merge branch 'devlink-params-cleanup'

Jiri Pirko says:

====================
devlink: params cleanups and devl_param_driverinit_value_get() fix

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.

---
v1->v2:
- a small bug was fixed in patch #2, the rest of the code stays the same
  so I left review/ack tags attached to them
====================

Signed-off-by: David S. Miller <davem@davemloft.net>