aboutsummaryrefslogtreecommitdiffstats
path: root/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files')
-rw-r--r--meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0001-Fix-build-with-clang.patch32
-rw-r--r--meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0002-typecast-enum-to-int-before-comparison.patch115
-rw-r--r--meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0003-initialize-use_config_mr.patch31
-rw-r--r--meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0004-Fix-clang-warnings.patch56
-rw-r--r--meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/init_c.patch23
5 files changed, 257 insertions, 0 deletions
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0001-Fix-build-with-clang.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0001-Fix-build-with-clang.patch
new file mode 100644
index 00000000..93d8aba6
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0001-Fix-build-with-clang.patch
@@ -0,0 +1,32 @@
+From b705caef6c717adc80585843b7fcc68700ced4b6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Aug 2017 09:25:24 -0700
+Subject: [PATCH 1/4] Fix build with clang
+
+Fix
+error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses]
+ if ((!port_attr->comp_mask & IBV_EXP_QUERY_PORT_ATTR_MASK1) ||
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ include/infiniband/verbs_exp.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/infiniband/verbs_exp.h b/include/infiniband/verbs_exp.h
+index ae94deb..42ed83d 100644
+--- a/include/infiniband/verbs_exp.h
++++ b/include/infiniband/verbs_exp.h
+@@ -2955,7 +2955,7 @@ static inline int ibv_exp_query_port(struct ibv_context *context,
+ &port_attr->port_attr);
+
+ /* Check that only valid flags were given */
+- if ((!port_attr->comp_mask & IBV_EXP_QUERY_PORT_ATTR_MASK1) ||
++ if (!(port_attr->comp_mask & IBV_EXP_QUERY_PORT_ATTR_MASK1) ||
+ (port_attr->comp_mask & ~IBV_EXP_QUERY_PORT_ATTR_MASKS) ||
+ (port_attr->mask1 & ~IBV_EXP_QUERY_PORT_MASK)) {
+ errno = EINVAL;
+--
+2.14.1
+
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0002-typecast-enum-to-int-before-comparison.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0002-typecast-enum-to-int-before-comparison.patch
new file mode 100644
index 00000000..00516eba
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0002-typecast-enum-to-int-before-comparison.patch
@@ -0,0 +1,115 @@
+From 7edab012f2d28de7e6d3657ec698e1090d0112de Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Aug 2017 09:25:49 -0700
+Subject: [PATCH 2/4] typecast enum to int before comparison
+
+Fix
+error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ examples/cc_pingpong.c | 2 +-
+ examples/rc_pingpong.c | 2 +-
+ examples/srq_pingpong.c | 2 +-
+ examples/task_pingpong.c | 2 +-
+ examples/uc_pingpong.c | 2 +-
+ examples/umr_rc.c | 2 +-
+ examples/xsrq_pingpong.c | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/examples/cc_pingpong.c b/examples/cc_pingpong.c
+index 7b3e397..567c503 100644
+--- a/examples/cc_pingpong.c
++++ b/examples/cc_pingpong.c
+@@ -1408,7 +1408,7 @@ int main(int argc, char *argv[])
+
+ case 'm':
+ mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0));
+- if (mtu < 0) {
++ if ((int)mtu < 0) {
+ usage(argv[0]);
+ return 1;
+ }
+diff --git a/examples/rc_pingpong.c b/examples/rc_pingpong.c
+index 786577e..e661368 100644
+--- a/examples/rc_pingpong.c
++++ b/examples/rc_pingpong.c
+@@ -759,7 +759,7 @@ int main(int argc, char *argv[])
+
+ case 'm':
+ mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0));
+- if (mtu < 0) {
++ if ((int)mtu < 0) {
+ usage(argv[0]);
+ return 1;
+ }
+diff --git a/examples/srq_pingpong.c b/examples/srq_pingpong.c
+index 9762866..f85a7cd 100644
+--- a/examples/srq_pingpong.c
++++ b/examples/srq_pingpong.c
+@@ -697,7 +697,7 @@ int main(int argc, char *argv[])
+
+ case 'm':
+ mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0));
+- if (mtu < 0) {
++ if ((int)mtu < 0) {
+ usage(argv[0]);
+ return 1;
+ }
+diff --git a/examples/task_pingpong.c b/examples/task_pingpong.c
+index 748f8bb..d03a8b2 100644
+--- a/examples/task_pingpong.c
++++ b/examples/task_pingpong.c
+@@ -1005,7 +1005,7 @@ int main(int argc, char *argv[])
+
+ case 'm':
+ mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0));
+- if (mtu < 0) {
++ if ((int)mtu < 0) {
+ usage(argv[0]);
+ return 1;
+ }
+diff --git a/examples/uc_pingpong.c b/examples/uc_pingpong.c
+index 879bd77..a38a054 100644
+--- a/examples/uc_pingpong.c
++++ b/examples/uc_pingpong.c
+@@ -606,7 +606,7 @@ int main(int argc, char *argv[])
+
+ case 'm':
+ mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0));
+- if (mtu < 0) {
++ if ((int)mtu < 0) {
+ usage(argv[0]);
+ return 1;
+ }
+diff --git a/examples/umr_rc.c b/examples/umr_rc.c
+index ab76d3c..0ec636a 100644
+--- a/examples/umr_rc.c
++++ b/examples/umr_rc.c
+@@ -950,7 +950,7 @@ int main(int argc, char *argv[])
+
+ case 'm':
+ mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0));
+- if (mtu < 0) {
++ if ((int)mtu < 0) {
+ usage(argv[0]);
+ return 1;
+ }
+diff --git a/examples/xsrq_pingpong.c b/examples/xsrq_pingpong.c
+index c4ae51d..cebae5d 100644
+--- a/examples/xsrq_pingpong.c
++++ b/examples/xsrq_pingpong.c
+@@ -910,7 +910,7 @@ int main(int argc, char *argv[])
+ break;
+ case 'm':
+ ctx.mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0));
+- if (ctx.mtu < 0) {
++ if ((int)ctx.mtu < 0) {
+ usage(argv[0]);
+ return 1;
+ }
+--
+2.14.1
+
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0003-initialize-use_config_mr.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0003-initialize-use_config_mr.patch
new file mode 100644
index 00000000..da4ef15b
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0003-initialize-use_config_mr.patch
@@ -0,0 +1,31 @@
+From 936da7fcab06ff3bc7c1c1e1ab108a36797da039 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Aug 2017 09:28:00 -0700
+Subject: [PATCH 3/4] initialize use_config_mr
+
+Fixes
+error: variable 'use_contig_mr' is uninitialized when used here [-Werror,-Wuninitialized]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ examples/dcini.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/dcini.c b/examples/dcini.c
+index 001e905..08d75ec 100644
+--- a/examples/dcini.c
++++ b/examples/dcini.c
+@@ -269,7 +269,7 @@ int main(int argc, char *argv[])
+ int size = 4096;
+ int iters = 1000;
+ int use_event = 0;
+- int use_contig_mr;
++ int use_contig_mr = 0;
+ int err;
+ struct ibv_ah_attr ah_attr;
+ struct dc_ctx ctx = {
+--
+2.14.1
+
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0004-Fix-clang-warnings.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0004-Fix-clang-warnings.patch
new file mode 100644
index 00000000..26f09e54
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0004-Fix-clang-warnings.patch
@@ -0,0 +1,56 @@
+From 08944074f9d9525a57e88a4990dd833d0999b8df Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Aug 2017 09:36:55 -0700
+Subject: [PATCH 4/4] Fix clang warnings
+
+../../../../../../../workspace/sources/dpdk-dev-libibverbs/examples/intf.c:1221:11: error: comparison of array 'ctx->dev_name' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare]
+ if (ctx->dev_name != NULL) {
+ ~~~~~^~~~~~~~ ~~~~
+../../../../../../../workspace/sources/dpdk-dev-libibverbs/examples/intf.c:1893:13: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
+ if (size < 0 || size > MAX_MSG_SIZE)
+ ~~~~ ^ ~
+../../../../../../../workspace/sources/dpdk-dev-libibverbs/examples/intf.c:1901:12: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare]
+ if (mtu < 0)
+ ~~~ ^ ~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ examples/intf.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/examples/intf.c b/examples/intf.c
+index 8d158ee..1f1af50 100644
+--- a/examples/intf.c
++++ b/examples/intf.c
+@@ -1218,7 +1218,7 @@ int create_resources(struct intf_context *ctx)
+ return 1;
+ }
+
+- if (!ctx->dev_name) {
++ if (!ctx->dev_name[0]) {
+ ctx->ib_dev = *dev_list;
+ if (!ctx->ib_dev) {
+ fprintf(stderr, "No IB devices found\n");
+@@ -1828,7 +1828,7 @@ int parse_input(struct intf_input *input, struct intf_input *default_input, int
+ char *ib_devname = NULL;
+ char *vrbs_intf = NULL;
+ char *cpus_str = NULL;
+- unsigned long long size;
++ long long size;
+
+ memcpy(input, default_input, sizeof(*input));
+
+@@ -1898,7 +1898,7 @@ int parse_input(struct intf_input *input, struct intf_input *default_input, int
+
+ case 'm':
+ mtu = mtu_to_enum(strtol(optarg, NULL, 0));
+- if (mtu < 0)
++ if ((int)mtu < 0)
+ goto print_usage;
+ input->ib_data.mtu = mtu;
+ break;
+--
+2.14.1
+
diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/init_c.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/init_c.patch
new file mode 100644
index 00000000..a7708d7c
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/init_c.patch
@@ -0,0 +1,23 @@
+dpdk-dev-libibverbs: suppress gcc7 warnings
+
+We know that format-truncation in init.c is okay.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/src/init.c
++++ b/src/init.c
+@@ -31,6 +31,11 @@
+ * SOFTWARE.
+ */
+
++/* For this file we know we can ignore this warning. */
++#if __GNUC__ > 6
++#pragma GCC diagnostic ignored "-Wformat-truncation"
++#endif
++
+ #if HAVE_CONFIG_H
+ # include <config.h>
+ #endif /* HAVE_CONFIG_H */