@@ -3829,6 +3829,24 @@ int mlx5e_set_features(struct net_device *netdev, netdev_features_t features)
3829
3829
return 0 ;
3830
3830
}
3831
3831
3832
+ static netdev_features_t mlx5e_fix_uplink_rep_features (struct net_device * netdev ,
3833
+ netdev_features_t features )
3834
+ {
3835
+ features &= ~NETIF_F_HW_TLS_RX ;
3836
+ if (netdev -> features & NETIF_F_HW_TLS_RX )
3837
+ netdev_warn (netdev , "Disabling hw_tls_rx, not supported in switchdev mode\n" );
3838
+
3839
+ features &= ~NETIF_F_HW_TLS_TX ;
3840
+ if (netdev -> features & NETIF_F_HW_TLS_TX )
3841
+ netdev_warn (netdev , "Disabling hw_tls_tx, not supported in switchdev mode\n" );
3842
+
3843
+ features &= ~NETIF_F_NTUPLE ;
3844
+ if (netdev -> features & NETIF_F_NTUPLE )
3845
+ netdev_warn (netdev , "Disabling ntuple, not supported in switchdev mode\n" );
3846
+
3847
+ return features ;
3848
+ }
3849
+
3832
3850
static netdev_features_t mlx5e_fix_features (struct net_device * netdev ,
3833
3851
netdev_features_t features )
3834
3852
{
@@ -3860,15 +3878,8 @@ static netdev_features_t mlx5e_fix_features(struct net_device *netdev,
3860
3878
netdev_warn (netdev , "Disabling rxhash, not supported when CQE compress is active\n" );
3861
3879
}
3862
3880
3863
- if (mlx5e_is_uplink_rep (priv )) {
3864
- features &= ~NETIF_F_HW_TLS_RX ;
3865
- if (netdev -> features & NETIF_F_HW_TLS_RX )
3866
- netdev_warn (netdev , "Disabling hw_tls_rx, not supported in switchdev mode\n" );
3867
-
3868
- features &= ~NETIF_F_HW_TLS_TX ;
3869
- if (netdev -> features & NETIF_F_HW_TLS_TX )
3870
- netdev_warn (netdev , "Disabling hw_tls_tx, not supported in switchdev mode\n" );
3871
- }
3881
+ if (mlx5e_is_uplink_rep (priv ))
3882
+ features = mlx5e_fix_uplink_rep_features (netdev , features );
3872
3883
3873
3884
mutex_unlock (& priv -> state_lock );
3874
3885
0 commit comments