Commit a49e1f31 authored by Aya Levin's avatar Aya Levin Committed by Saeed Mahameed

net/mlx5e: Change function's position to a more fitting file

Move function which indicates whether tunnel inner flow table is
supported from en.h to en_fs.c. It fits better right after tunnel
protocol rules definitions.
Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 0cfafd4b
...@@ -1065,12 +1065,6 @@ int mlx5e_modify_sq(struct mlx5_core_dev *mdev, u32 sqn, ...@@ -1065,12 +1065,6 @@ int mlx5e_modify_sq(struct mlx5_core_dev *mdev, u32 sqn,
void mlx5e_activate_txqsq(struct mlx5e_txqsq *sq); void mlx5e_activate_txqsq(struct mlx5e_txqsq *sq);
void mlx5e_tx_disable_queue(struct netdev_queue *txq); void mlx5e_tx_disable_queue(struct netdev_queue *txq);
static inline bool mlx5e_tunnel_inner_ft_supported(struct mlx5_core_dev *mdev)
{
return (MLX5_CAP_ETH(mdev, tunnel_stateless_gre) &&
MLX5_CAP_FLOWTABLE_NIC_RX(mdev, ft_field_support.inner_ip_version));
}
static inline bool mlx5_tx_swp_supported(struct mlx5_core_dev *mdev) static inline bool mlx5_tx_swp_supported(struct mlx5_core_dev *mdev)
{ {
return MLX5_CAP_ETH(mdev, swp) && return MLX5_CAP_ETH(mdev, swp) &&
......
...@@ -98,6 +98,8 @@ enum mlx5e_tunnel_types { ...@@ -98,6 +98,8 @@ enum mlx5e_tunnel_types {
MLX5E_NUM_TUNNEL_TT, MLX5E_NUM_TUNNEL_TT,
}; };
bool mlx5e_tunnel_inner_ft_supported(struct mlx5_core_dev *mdev);
/* L3/L4 traffic type classifier */ /* L3/L4 traffic type classifier */
struct mlx5e_ttc_table { struct mlx5e_ttc_table {
struct mlx5e_flow_table ft; struct mlx5e_flow_table ft;
......
...@@ -749,6 +749,12 @@ static struct mlx5e_etype_proto ttc_tunnel_rules[] = { ...@@ -749,6 +749,12 @@ static struct mlx5e_etype_proto ttc_tunnel_rules[] = {
}, },
}; };
bool mlx5e_tunnel_inner_ft_supported(struct mlx5_core_dev *mdev)
{
return (MLX5_CAP_ETH(mdev, tunnel_stateless_gre) &&
MLX5_CAP_FLOWTABLE_NIC_RX(mdev, ft_field_support.inner_ip_version));
}
static u8 mlx5e_etype_to_ipv(u16 ethertype) static u8 mlx5e_etype_to_ipv(u16 ethertype)
{ {
if (ethertype == ETH_P_IP) if (ethertype == ETH_P_IP)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment