aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2018-07-17 16:29:33 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2018-07-17 16:51:12 +0200
commite917a18b4cce2501b0a735ce65b0ce2c60312959 (patch)
tree0b44555ad03a9e90af94b0173fc9cdcd29f110b2
parent2edad65d0a0479fa2ee544c03a2f10032287162a (diff)
make rdma-core v19 fix work on 17.11.3
Change-Id: I7ba99030c054dc77c43e9a12c082ced32b67f502 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
-rw-r--r--debian/patches/net-mlx5-fix-build-with-rdma-core-v19.patch28
1 files changed, 27 insertions, 1 deletions
diff --git a/debian/patches/net-mlx5-fix-build-with-rdma-core-v19.patch b/debian/patches/net-mlx5-fix-build-with-rdma-core-v19.patch
index ebb058e4..90ac3c97 100644
--- a/debian/patches/net-mlx5-fix-build-with-rdma-core-v19.patch
+++ b/debian/patches/net-mlx5-fix-build-with-rdma-core-v19.patch
@@ -19,6 +19,9 @@ support the new API will be submitted.
Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")
Cc: stable@dpdk.org
+Note: lacking b42c000 "net/mlx5: remove flow support" this was not
+enough and needed special handling for ibv_flow_spec_counter_action.
+
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
@@ -34,12 +37,35 @@ Last-Update: 2018-06-17
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
-@@ -145,7 +145,7 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtoo
+@@ -145,7 +145,12 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtoo
$Q sh -- '$<' '$@' \
HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT \
infiniband/verbs.h \
- enum IBV_FLOW_SPEC_ACTION_COUNT \
+ type 'struct ibv_counter_set_init_attr' \
++ $(AUTOCONF_OUTPUT)
++ $Q sh -- '$<' '$@' \
++ HAVE_IBV_FLOW_SPEC_COUNTER_ACTION \
++ infiniband/verbs.h \
++ type 'struct ibv_flow_spec_counter_action' \
$(AUTOCONF_OUTPUT)
# Create mlx5_autoconf.h or update it in case it differs from the new one.
+--- 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;
+ };