net: sched: move the can_offload check from binding phase to rule insertion phase
[linux-2.6-microblaze.git] / drivers / net / ethernet / mellanox / mlx5 / core / en_main.c
index 560b208..28ae00b 100644 (file)
@@ -3106,6 +3106,9 @@ int mlx5e_setup_tc_block_cb(enum tc_setup_type type, void *type_data,
 {
        struct mlx5e_priv *priv = cb_priv;
 
+       if (!tc_can_offload(priv->netdev))
+               return -EOPNOTSUPP;
+
        switch (type) {
        case TC_SETUP_CLSFLOWER:
                return mlx5e_setup_tc_cls_flower(priv, type_data);