Re: [PATCH net-next V3 01/15] net/mlx5e: Generalize TC <-> IPsec mutual exclusion

From: Daniel Zahka

Date: Fri Sep 04 2026 - 11:44:42 EST


On Thu Sep 3, 2026 at 4:52 AM EDT, Tariq Toukan wrote:
> -#ifdef CONFIG_MLX5_ESWITCH
> -static int mlx5e_ipsec_block_tc_offload(struct mlx5_core_dev *mdev)
> -{
> - struct mlx5_eswitch *esw = mdev->priv.eswitch;
> - int err = 0;
> -
> - if (esw) {
> - err = mlx5_esw_lock(esw);

This appears to the last caller of mlx5_esw_lock(), so the function will
be dead code after this patch.

> - if (err)
> - return err;
> - }
> -
> - if (mdev->num_block_ipsec) {
> - err = -EBUSY;
> - goto unlock;
> - }
> -
> - mdev->num_block_tc++;
> -
> -unlock:
> - if (esw)
> - mlx5_esw_unlock(esw);
> -
> - return err;
> -}