net/mlx5e: Move Ethernet driver debugfs to profile init callback
authorJianbo Liu <jianbol@nvidia.com>
Tue, 16 May 2023 02:28:02 +0000 (02:28 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 25 May 2023 03:44:18 +0000 (20:44 -0700)
commitc4c24fc30cc417ace332ceceaba4f70f81dcd521
treed96e2bf69447d648d1ade1d8fdc78faecabf1103
parentbdf274750fca17b289404ef03453c4070725302c
net/mlx5e: Move Ethernet driver debugfs to profile init callback

As priv->dfs_root is cleared, and therefore missed, when change
eswitch mode, move the creation of the root debugfs to the init
callback of mlx5e_nic_profile and mlx5e_uplink_rep_profile, and
the destruction to the cleanup callback for symmeter.

Fixes: 288eca60cc31 ("net/mlx5e: Add Ethernet driver debugfs")
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c