lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.16 0413/1039] net/mlx5e: Sync VXLAN udp ports during uplink representor profile change
    Date
    From: Maor Dickman <maord@nvidia.com>

    [ Upstream commit 07f6dc4024ea1d2314b9c8b81fd4e492864fcca1 ]

    Currently during NIC profile disablement all VXLAN udp ports offloaded to the
    HW are flushed and during its enablement the driver send notification to
    the stack to inform the core that the entire UDP tunnel port state has been
    lost, uplink representor doesn't have the same behavior which can cause
    VXLAN udp ports offload to be in bad state while moving between modes while
    VXLAN interface exist.

    Fixed by aligning the uplink representor profile behavior to the NIC behavior.

    Fixes: 84db66124714 ("net/mlx5e: Move set vxlan nic info to profile init")
    Signed-off-by: Maor Dickman <maord@nvidia.com>
    Reviewed-by: Roi Dayan <roid@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_rep.c | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
    index 48895d79796a8..c0df4b1115b72 100644
    --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
    +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
    @@ -50,6 +50,7 @@
    #include "fs_core.h"
    #include "lib/mlx5.h"
    #include "lib/devcom.h"
    +#include "lib/vxlan.h"
    #define CREATE_TRACE_POINTS
    #include "diag/en_rep_tracepoint.h"
    #include "en_accel/ipsec.h"
    @@ -1027,6 +1028,7 @@ static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv)
    rtnl_lock();
    if (netif_running(netdev))
    mlx5e_open(netdev);
    + udp_tunnel_nic_reset_ntf(priv->netdev);
    netif_device_attach(netdev);
    rtnl_unlock();
    }
    @@ -1048,6 +1050,7 @@ static void mlx5e_uplink_rep_disable(struct mlx5e_priv *priv)
    mlx5_notifier_unregister(mdev, &priv->events_nb);
    mlx5e_rep_tc_disable(priv);
    mlx5_lag_remove_netdev(mdev, priv->netdev);
    + mlx5_vxlan_reset_to_default(mdev->vxlan);
    }

    static MLX5E_DEFINE_STATS_GRP(sw_rep, 0);
    --
    2.34.1


    \
     
     \ /
      Last update: 2022-01-24 23:09    [W:3.450 / U:0.536 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site