summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2022-07-12 11:26:28 +0300
committerPaolo Abeni <pabeni@redhat.com>2022-07-12 11:26:29 +0300
commitbfc54866856ffe2cb82886337afdece7703f2415 (patch)
treedd85580ea6dd577bdd216c81441f5cce4bdd6705 /include
parent2afe46474ba3fd3ae6e016bab57efd73f4b96175 (diff)
parentf0680ef0f9497f88b513dea1ae54664f0806ecfb (diff)
downloadlinux-bfc54866856ffe2cb82886337afdece7703f2415.tar.xz
Merge branch 'mlx5-devlink-mutex-removal-part-1'
Moshe Shemesh Says: =================== 1) Fix devlink lock in mlx5 devlink eswitch callbacks Following the commit 14e426bf1a4d "devlink: hold the instance lock during eswitch_mode callbacks" which takes devlink instance lock for all devlink eswitch callbacks and adds a temporary workaround, this patchset removes the workaround, replaces devlink API functions by devl_ API where called from mlx5 driver eswitch callbacks flows and adds devlink instance lock in other driver's path that leads to these functions. While moving to devl_ API the patchset removes part of the devlink API functions which mlx5 was the last one to use and so not used by any driver now. The patchset also remove DEVLINK_NL_FLAG_NO_LOCK flag from the callbacks of port_new/port which are called only from mlx5 driver and the already locked by the patchset as parallel paths to the eswitch callbacks using devl_ API functions. This patchset will be followed by another patchset that will remove DEVLINK_NL_FLAG_NO_LOCK flag from devlink reload and devlink health callbacks. Thus we will have all devlink callbacks locked and it will pave the way to remove devlink mutex. =================== Link: https://lore.kernel.org/r/20220711081408.69452-1-saeed@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx5/driver.h4
-rw-r--r--include/net/devlink.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 76d7661e3e63..bd882884b23c 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -551,6 +551,10 @@ enum {
* creation/deletion on drivers rescan. Unset during device attach.
*/
MLX5_PRIV_FLAGS_DETACH = 1 << 2,
+ /* Distinguish between mlx5e_probe/remove called by module init/cleanup
+ * and called by other flows which can already hold devlink lock
+ */
+ MLX5_PRIV_FLAGS_MLX5E_LOCKED_FLOW = 1 << 3,
};
struct mlx5_adev {
diff --git a/include/net/devlink.h b/include/net/devlink.h
index 2a2a2a0c93f7..5150deb67fab 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -1569,9 +1569,6 @@ void devlink_port_attrs_pci_vf_set(struct devlink_port *devlink_port, u32 contro
void devlink_port_attrs_pci_sf_set(struct devlink_port *devlink_port,
u32 controller, u16 pf, u32 sf,
bool external);
-int devlink_rate_leaf_create(struct devlink_port *port, void *priv);
-void devlink_rate_leaf_destroy(struct devlink_port *devlink_port);
-void devlink_rate_nodes_destroy(struct devlink *devlink);
void devlink_port_linecard_set(struct devlink_port *devlink_port,
struct devlink_linecard *linecard);
struct devlink_linecard *