net/mlx5: support match GRE protocol on DR engine
authorXiaoyu Min <jackmin@mellanox.com>
Tue, 9 Jul 2019 10:59:12 +0000 (18:59 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 23 Jul 2019 12:31:34 +0000 (14:31 +0200)
DR engine support matching on GRE protocol field without MPLS supports.
So bypassing the MPLS check when DR is enabled.

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5_flow.c

index 534cd93..626d0f9 100644 (file)
@@ -1714,6 +1714,7 @@ mlx5_flow_validate_item_gre(const struct rte_flow_item *item,
                 sizeof(struct rte_flow_item_gre), error);
        if (ret < 0)
                return ret;
+#ifndef HAVE_MLX5DV_DR
 #ifndef HAVE_IBV_DEVICE_MPLS_SUPPORT
        if (spec && (spec->protocol & mask->protocol))
                return rte_flow_error_set(error, ENOTSUP,
@@ -1721,6 +1722,7 @@ mlx5_flow_validate_item_gre(const struct rte_flow_item *item,
                                          "without MPLS support the"
                                          " specification cannot be used for"
                                          " filtering");
+#endif
 #endif
        return 0;
 }