diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index fa6fec1930f5..c1efa5517d17 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | |||
@@ -1767,6 +1767,9 @@ static void cleanup_root_ns(struct mlx5_core_dev *dev) | |||
1767 | 1767 | ||
1768 | void mlx5_cleanup_fs(struct mlx5_core_dev *dev) | 1768 | void mlx5_cleanup_fs(struct mlx5_core_dev *dev) |
1769 | { | 1769 | { |
1770 | if (MLX5_CAP_GEN(dev, port_type) != MLX5_CAP_PORT_TYPE_ETH) | ||
1771 | return; | ||
1772 | |||
1770 | cleanup_root_ns(dev); | 1773 | cleanup_root_ns(dev); |
1771 | cleanup_single_prio_root_ns(dev, dev->priv.fdb_root_ns); | 1774 | cleanup_single_prio_root_ns(dev, dev->priv.fdb_root_ns); |
1772 | cleanup_single_prio_root_ns(dev, dev->priv.esw_egress_root_ns); | 1775 | cleanup_single_prio_root_ns(dev, dev->priv.esw_egress_root_ns); |
@@ -1828,15 +1831,20 @@ int mlx5_init_fs(struct mlx5_core_dev *dev) | |||
1828 | { | 1831 | { |
1829 | int err = 0; | 1832 | int err = 0; |
1830 | 1833 | ||
1834 | if (MLX5_CAP_GEN(dev, port_type) != MLX5_CAP_PORT_TYPE_ETH) | ||
1835 | return 0; | ||
1836 | |||
1831 | err = mlx5_init_fc_stats(dev); | 1837 | err = mlx5_init_fc_stats(dev); |
1832 | if (err) | 1838 | if (err) |
1833 | return err; | 1839 | return err; |
1834 | 1840 | ||
1835 | if (MLX5_CAP_GEN(dev, nic_flow_table)) { | 1841 | if (MLX5_CAP_GEN(dev, nic_flow_table) && |
1842 | MLX5_CAP_FLOWTABLE_NIC_RX(dev, ft_support)) { | ||
1836 | err = init_root_ns(dev); | 1843 | err = init_root_ns(dev); |
1837 | if (err) | 1844 | if (err) |
1838 | goto err; | 1845 | goto err; |
1839 | } | 1846 | } |
1847 | |||
1840 | if (MLX5_CAP_GEN(dev, eswitch_flow_table)) { | 1848 | if (MLX5_CAP_GEN(dev, eswitch_flow_table)) { |
1841 | err = init_fdb_root_ns(dev); | 1849 | err = init_fdb_root_ns(dev); |
1842 | if (err) | 1850 | if (err) |