aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c
diff options
context:
space:
mode:
authorAmit Cohen <amcohen@nvidia.com>2021-08-22 14:37:15 +0300
committerDavid S. Miller <davem@davemloft.net>2021-08-22 21:39:55 +0100
commitc3d2ed93b14d5300530549f08ef5c6b87bbaa5bb (patch)
treeeacdb99ce30268d2235b6bf7d72d380dc7fbcffb /drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c
parentmlxsw: Convert existing consumers to use new API for parsing configuration (diff)
downloadlinux-dev-c3d2ed93b14d5300530549f08ef5c6b87bbaa5bb.tar.xz
linux-dev-c3d2ed93b14d5300530549f08ef5c6b87bbaa5bb.zip
mlxsw: Remove old parsing depth infrastructure
The previous patches added new API to handle parsing depth and converted the existing code to use it. Remove the old infrastructure which is not needed anymore. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c
index c722ac370fb6..d018d2da5949 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c
@@ -10,14 +10,6 @@
#include "spectrum.h"
#include "spectrum_nve.h"
-/* Eth (18B) | IPv6 (40B) | UDP (8B) | VxLAN (8B) | Eth (14B) | IPv6 (40B)
- *
- * In the worst case - where we have a VLAN tag on the outer Ethernet
- * header and IPv6 in overlay and underlay - we need to parse 128 bytes
- */
-#define MLXSW_SP_NVE_VXLAN_PARSING_DEPTH 128
-#define MLXSW_SP_NVE_DEFAULT_PARSING_DEPTH 96
-
#define MLXSW_SP_NVE_VXLAN_SUPPORTED_FLAGS (VXLAN_F_UDP_ZERO_CSUM_TX | \
VXLAN_F_LEARN)
@@ -115,66 +107,6 @@ static void mlxsw_sp_nve_vxlan_config(const struct mlxsw_sp_nve *nve,
config->udp_dport = cfg->dst_port;
}
-static int __mlxsw_sp_nve_parsing_set(struct mlxsw_sp *mlxsw_sp,
- unsigned int parsing_depth,
- __be16 udp_dport)
-{
- char mprs_pl[MLXSW_REG_MPRS_LEN];
-
- mlxsw_reg_mprs_pack(mprs_pl, parsing_depth, be16_to_cpu(udp_dport));
- return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(mprs), mprs_pl);
-}
-
-static int mlxsw_sp_nve_parsing_set(struct mlxsw_sp *mlxsw_sp,
- __be16 udp_dport)
-{
- int parsing_depth = mlxsw_sp->nve->inc_parsing_depth_refs ?
- MLXSW_SP_NVE_VXLAN_PARSING_DEPTH :
- MLXSW_SP_NVE_DEFAULT_PARSING_DEPTH;
-
- return __mlxsw_sp_nve_parsing_set(mlxsw_sp, parsing_depth, udp_dport);
-}
-
-static int
-__mlxsw_sp_nve_inc_parsing_depth_get(struct mlxsw_sp *mlxsw_sp,
- __be16 udp_dport)
-{
- int err;
-
- mlxsw_sp->nve->inc_parsing_depth_refs++;
-
- err = mlxsw_sp_nve_parsing_set(mlxsw_sp, udp_dport);
- if (err)
- goto err_nve_parsing_set;
- return 0;
-
-err_nve_parsing_set:
- mlxsw_sp->nve->inc_parsing_depth_refs--;
- return err;
-}
-
-static void
-__mlxsw_sp_nve_inc_parsing_depth_put(struct mlxsw_sp *mlxsw_sp,
- __be16 udp_dport)
-{
- mlxsw_sp->nve->inc_parsing_depth_refs--;
- mlxsw_sp_nve_parsing_set(mlxsw_sp, udp_dport);
-}
-
-int mlxsw_sp_nve_inc_parsing_depth_get(struct mlxsw_sp *mlxsw_sp)
-{
- __be16 udp_dport = mlxsw_sp->nve->config.udp_dport;
-
- return __mlxsw_sp_nve_inc_parsing_depth_get(mlxsw_sp, udp_dport);
-}
-
-void mlxsw_sp_nve_inc_parsing_depth_put(struct mlxsw_sp *mlxsw_sp)
-{
- __be16 udp_dport = mlxsw_sp->nve->config.udp_dport;
-
- __mlxsw_sp_nve_inc_parsing_depth_put(mlxsw_sp, udp_dport);
-}
-
static void
mlxsw_sp_nve_vxlan_config_prepare(char *tngcr_pl,
const struct mlxsw_sp_nve_config *config)