lkml.org 
[lkml]   [2021]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.11 105/775] net/mlx5e: Enable XDP for Connect-X IPsec capable devices
    Date
    From: Raed Salem <raeds@nvidia.com>

    [ Upstream commit e33f9f5f2d3a5fa97728a43708f41da2d4faae65 ]

    This limitation was inherited by previous Innova (FPGA) IPsec
    implementation, it uses its private set of RQ handlers which
    does not support XDP, for Connect-X this is no longer true.

    Fix by keeping this limitation only for Innova IPsec supporting devices,
    as otherwise this limitation effectively wrongly blocks XDP for all
    future Connect-X devices for all flows even if IPsec offload is not
    used.

    Fixes: 2d64663cd559 ("net/mlx5: IPsec: Add HW crypto offload support")
    Signed-off-by: Raed Salem <raeds@nvidia.com>
    Reviewed-by: Alaa Hleihel <alaa@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
    index 3fc7d18ac868b..92436569ce86b 100644
    --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
    +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
    @@ -4455,8 +4455,9 @@ static int mlx5e_xdp_allowed(struct mlx5e_priv *priv, struct bpf_prog *prog)
    return -EINVAL;
    }

    - if (MLX5_IPSEC_DEV(priv->mdev)) {
    - netdev_warn(netdev, "can't set XDP with IPSec offload\n");
    + if (mlx5_fpga_is_ipsec_device(priv->mdev)) {
    + netdev_warn(netdev,
    + "XDP is not available on Innova cards with IPsec support\n");
    return -EINVAL;
    }

    --
    2.27.0


    \
     
     \ /
      Last update: 2021-03-02 00:40    [W:3.223 / U:0.488 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site