X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx5%2Fmlx5_flow.h;h=e1e798b7a69db69f35743021eb6ec8ec1d79fdcf;hb=d9263ab13886f8b25a324e40ddb205f1a3f71c6d;hp=cb1e6fd8b9af3467eea980310766128e0af572c0;hpb=4bb14c83df952bdb54a735873d4a5347b38e1117;p=dpdk.git diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index cb1e6fd8b9..e1e798b7a6 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -21,6 +21,9 @@ #pragma GCC diagnostic error "-Wpedantic" #endif +#include "mlx5.h" +#include "mlx5_prm.h" + /* Pattern outer Layer bits. */ #define MLX5_FLOW_LAYER_OUTER_L2 (1u << 0) #define MLX5_FLOW_LAYER_OUTER_L3_IPV4 (1u << 1) @@ -319,11 +322,14 @@ struct mlx5_flow_counter { uint32_t shared:1; /**< Share counter ID with other flow rules. */ uint32_t ref_cnt:31; /**< Reference counter. */ uint32_t id; /**< Counter ID. */ + union { /**< Holds the counters for the rule. */ #if defined(HAVE_IBV_DEVICE_COUNTERS_SET_V42) - struct ibv_counter_set *cs; /**< Holds the counters for the rule. */ + struct ibv_counter_set *cs; #elif defined(HAVE_IBV_DEVICE_COUNTERS_SET_V45) - struct ibv_counters *cs; /**< Holds the counters for the rule. */ + struct ibv_counters *cs; #endif + struct mlx5_devx_counter_set *dcs; + }; uint64_t hits; /**< Number of packets matched by the rule. */ uint64_t bytes; /**< Number of bytes matched by the rule. */ }; @@ -425,9 +431,11 @@ int mlx5_flow_validate_item_gre(const struct rte_flow_item *item, struct rte_flow_error *error); int mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item, uint64_t item_flags, + const struct rte_flow_item_ipv4 *acc_mask, struct rte_flow_error *error); int mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, uint64_t item_flags, + const struct rte_flow_item_ipv6 *acc_mask, struct rte_flow_error *error); int mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev, const struct rte_flow_item *item,