diff mbox series

[net,V2,1/9] Revert "net/mlx5: Block entering switchdev mode with ns inconsistency"

Message ID 20240302070318.62997-2-saeed@kernel.org (mailing list archive)
State Accepted
Commit 8deeefb24786ea7950b37bde4516b286c877db00
Delegated to: Netdev Maintainers
Headers show
Series [net,V2,1/9] Revert "net/mlx5: Block entering switchdev mode with ns inconsistency" | expand

Checks

Context Check Description
netdev/series_format success Pull request is its own cover letter
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 956 this patch: 956
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 972 this patch: 972
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 972 this patch: 972
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 35 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-03-05--03-00 (tests: 890)

Commit Message

Saeed Mahameed March 2, 2024, 7:03 a.m. UTC
From: Gavin Li <gavinl@nvidia.com>

This reverts commit 662404b24a4c4d839839ed25e3097571f5938b9b.
The revert is required due to the suspicion it is not good for anything
and cause crash.

Fixes: 662404b24a4c ("net/mlx5e: Block entering switchdev mode with ns inconsistency")
Signed-off-by: Gavin Li <gavinl@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 .../mellanox/mlx5/core/eswitch_offloads.c     | 23 -------------------
 1 file changed, 23 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org March 5, 2024, 6:10 a.m. UTC | #1
Hello:

This series was applied to netdev/net.git (main)
by Saeed Mahameed <saeedm@nvidia.com>:

On Fri,  1 Mar 2024 23:03:10 -0800 you wrote:
> From: Gavin Li <gavinl@nvidia.com>
> 
> This reverts commit 662404b24a4c4d839839ed25e3097571f5938b9b.
> The revert is required due to the suspicion it is not good for anything
> and cause crash.
> 
> Fixes: 662404b24a4c ("net/mlx5e: Block entering switchdev mode with ns inconsistency")
> Signed-off-by: Gavin Li <gavinl@nvidia.com>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
> 
> [...]

Here is the summary with links:
  - [net,V2,1/9] Revert "net/mlx5: Block entering switchdev mode with ns inconsistency"
    https://git.kernel.org/netdev/net/c/8deeefb24786
  - [net,V2,2/9] Revert "net/mlx5e: Check the number of elements before walk TC rhashtable"
    https://git.kernel.org/netdev/net/c/b7bbd698c905
  - [net,V2,3/9] net/mlx5: E-switch, Change flow rule destination checking
    https://git.kernel.org/netdev/net/c/85ea2c5c5ef5
  - [net,V2,4/9] net/mlx5: Fix fw reporter diagnose output
    https://git.kernel.org/netdev/net/c/ac8082a3c7a1
  - [net,V2,5/9] net/mlx5: Check capability for fw_reset
    https://git.kernel.org/netdev/net/c/5e6107b499f3
  - [net,V2,6/9] net/mlx5e: Change the warning when ignore_flow_level is not supported
    https://git.kernel.org/netdev/net/c/dd238b702064
  - [net,V2,7/9] net/mlx5e: Fix MACsec state loss upon state update in offload path
    https://git.kernel.org/netdev/net/c/a71f2147b649
  - [net,V2,8/9] net/mlx5e: Use a memory barrier to enforce PTP WQ xmit submission tracking occurs after populating the metadata_map
    https://git.kernel.org/netdev/net/c/b7cf07586c40
  - [net,V2,9/9] net/mlx5e: Switch to using _bh variant of of spinlock API in port timestamping NAPI poll context
    https://git.kernel.org/netdev/net/c/90502d433c0e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index b0455134c98e..14b3bd3c5e2f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -3658,22 +3658,6 @@  static int esw_inline_mode_to_devlink(u8 mlx5_mode, u8 *mode)
 	return 0;
 }
 
-static bool esw_offloads_devlink_ns_eq_netdev_ns(struct devlink *devlink)
-{
-	struct mlx5_core_dev *dev = devlink_priv(devlink);
-	struct net *devl_net, *netdev_net;
-	bool ret = false;
-
-	mutex_lock(&dev->mlx5e_res.uplink_netdev_lock);
-	if (dev->mlx5e_res.uplink_netdev) {
-		netdev_net = dev_net(dev->mlx5e_res.uplink_netdev);
-		devl_net = devlink_net(devlink);
-		ret = net_eq(devl_net, netdev_net);
-	}
-	mutex_unlock(&dev->mlx5e_res.uplink_netdev_lock);
-	return ret;
-}
-
 int mlx5_eswitch_block_mode(struct mlx5_core_dev *dev)
 {
 	struct mlx5_eswitch *esw = dev->priv.eswitch;
@@ -3718,13 +3702,6 @@  int mlx5_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode,
 	if (esw_mode_from_devlink(mode, &mlx5_mode))
 		return -EINVAL;
 
-	if (mode == DEVLINK_ESWITCH_MODE_SWITCHDEV &&
-	    !esw_offloads_devlink_ns_eq_netdev_ns(devlink)) {
-		NL_SET_ERR_MSG_MOD(extack,
-				   "Can't change E-Switch mode to switchdev when netdev net namespace has diverged from the devlink's.");
-		return -EPERM;
-	}
-
 	mlx5_lag_disable_change(esw->dev);
 	err = mlx5_esw_try_lock(esw);
 	if (err < 0) {