|
|
@@ -3566,6 +3566,7 @@ static int set_feature_cvlan_filter(struct net_device *netdev, bool enable)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+#ifdef CONFIG_MLX5_ESWITCH
|
|
|
static int set_feature_tc_num_filters(struct net_device *netdev, bool enable)
|
|
|
{
|
|
|
struct mlx5e_priv *priv = netdev_priv(netdev);
|
|
|
@@ -3578,6 +3579,7 @@ static int set_feature_tc_num_filters(struct net_device *netdev, bool enable)
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
+#endif
|
|
|
|
|
|
static int set_feature_rx_all(struct net_device *netdev, bool enable)
|
|
|
{
|
|
|
@@ -3676,7 +3678,9 @@ static int mlx5e_set_features(struct net_device *netdev,
|
|
|
err |= MLX5E_HANDLE_FEATURE(NETIF_F_LRO, set_feature_lro);
|
|
|
err |= MLX5E_HANDLE_FEATURE(NETIF_F_HW_VLAN_CTAG_FILTER,
|
|
|
set_feature_cvlan_filter);
|
|
|
+#ifdef CONFIG_MLX5_ESWITCH
|
|
|
err |= MLX5E_HANDLE_FEATURE(NETIF_F_HW_TC, set_feature_tc_num_filters);
|
|
|
+#endif
|
|
|
err |= MLX5E_HANDLE_FEATURE(NETIF_F_RXALL, set_feature_rx_all);
|
|
|
err |= MLX5E_HANDLE_FEATURE(NETIF_F_RXFCS, set_feature_rx_fcs);
|
|
|
err |= MLX5E_HANDLE_FEATURE(NETIF_F_HW_VLAN_CTAG_RX, set_feature_rx_vlan);
|
|
|
@@ -4685,7 +4689,9 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
|
|
|
FT_CAP(modify_root) &&
|
|
|
FT_CAP(identified_miss_table_mode) &&
|
|
|
FT_CAP(flow_table_modify)) {
|
|
|
+#ifdef CONFIG_MLX5_ESWITCH
|
|
|
netdev->hw_features |= NETIF_F_HW_TC;
|
|
|
+#endif
|
|
|
#ifdef CONFIG_MLX5_EN_ARFS
|
|
|
netdev->hw_features |= NETIF_F_NTUPLE;
|
|
|
#endif
|