+--- a/drivers/net/mlx5/mlx5_flow.c
++++ b/drivers/net/mlx5/mlx5_flow.c
+@@ -66,9 +66,15 @@
+ struct ibv_counter_set_init_attr {
+ int dummy;
+ };
++/* rdma-core v19 has no ibv_counter_set_init_attr, but it has
++ * ibv_flow_spec_counter_action which would conflict.
++ * Newer DPDK, doesn't have the issue due to the series starting with
++ * "net/mlx5: remove flow support" */
++#ifndef HAVE_IBV_FLOW_SPEC_COUNTER_ACTION
+ struct ibv_flow_spec_counter_action {
+ int dummy;
+ };
++#endif
+ struct ibv_counter_set {
+ int dummy;
+ };