twx-linux/include/linux/mlx5
Jianbo Liu 2a4f56fbcc net/mlx5e: Keep netdev when leave switchdev for devlink set legacy only
In the cited commit, when changing from switchdev to legacy mode,
uplink representor's netdev is kept, and its profile is replaced with
nic profile, so netdev is detached from old profile, then attach to
new profile.

During profile change, the hardware resources allocated by the old
profile will be cleaned up. However, the cleanup is relying on the
related kernel modules. And they may need to flush themselves first,
which is triggered by netdev events, for example, NETDEV_UNREGISTER.
However, netdev is kept, or netdev_register is called after the
cleanup, which may cause troubles because the resources are still
referred by kernel modules.

The same process applies to all the caes when uplink is leaving
switchdev mode, including devlink eswitch mode set legacy, driver
unload and devlink reload. For the first one, it can be blocked and
returns failure to users, whenever possible. But it's hard for the
others. Besides, the attachment to nic profile is unnecessary as the
netdev will be unregistered anyway for such cases.

So in this patch, the original behavior is kept only for devlink
eswitch set mode legacy. For the others, moves netdev unregistration
before the profile change.

Fixes: 7a9fb35e8c3a ("net/mlx5e: Do not reload ethernet ports when changing eswitch mode")
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20241220081505.1286093-5-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-12-23 10:54:02 -08:00
..
cq.h
device.h RDMA v6.12 merge window 2024-09-24 11:48:00 -07:00
doorbell.h
driver.h net/mlx5e: Keep netdev when leave switchdev for devlink set legacy only 2024-12-23 10:54:02 -08:00
eq.h
eswitch.h
fs_helpers.h
fs.h net/mlx5: hw counters: Remove mlx5_fc_create_ex 2024-10-04 11:33:47 -07:00
macsec.h
mlx5_ifc_fpga.h
mlx5_ifc_vdpa.h vdpa/mlx5: Add support for modifying the VQ features field 2024-07-09 08:42:46 -04:00
mlx5_ifc.h RDMA v6.13 merge window pull request 2024-11-22 20:03:57 -08:00
mpfs.h
port.h RDMA/mlx5: Add plane index support when querying PTYS registers 2024-07-01 15:38:05 +03:00
qp.h net/mlx5: Added missing definitions in preparation for HW Steering 2024-09-09 11:10:04 -07:00
rsc_dump.h
transobj.h
vport.h