diff --git a/.gitignore b/.gitignore index a2f85cd..5409b7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rdma-core-13.tar.gz +SOURCES/rdma-core-15.tar.gz diff --git a/.rdma-core.metadata b/.rdma-core.metadata index ee92d3d..693952a 100644 --- a/.rdma-core.metadata +++ b/.rdma-core.metadata @@ -1 +1 @@ -c3aea0873ee388ac69816191e107dce948c61b35 SOURCES/rdma-core-13.tar.gz +26da48113931fdd210441c07ae55176cb4d71808 SOURCES/rdma-core-15.tar.gz diff --git a/SOURCES/0001-Add-a-helper-function-to-verify-64-bit-comp-mask.patch b/SOURCES/0001-Add-a-helper-function-to-verify-64-bit-comp-mask.patch new file mode 100644 index 0000000..f3486af --- /dev/null +++ b/SOURCES/0001-Add-a-helper-function-to-verify-64-bit-comp-mask.patch @@ -0,0 +1,75 @@ +From abb3bf03bcb543915852204b4fdaf6a88873b51a Mon Sep 17 00:00:00 2001 +From: Noa Osherovich +Date: Wed, 22 Nov 2017 11:11:21 +0200 +Subject: [PATCH rdma-core 1/3] Add a helper function to verify 64 bit comp + mask + +The common check for a mask is as follows: +if (comp_mask & ~COMP_MASK_SUPPORTED_VALUES) + return EINVAL + +This can cause an issue when using 64 bit mask if the supported variable +is signed 32 bit: It will be bitwise inverted and then zeroed to 64 +bits. This way wrong bits in the mask that exceed 32 bits will not raise +an error but will be ignored. + +Add a helper function in driver.h to be used by providers code and fix +wrong mask checks where the above was found to be applicable. + +Signed-off-by: Noa Osherovich +Reviewed-by: Yishai Hadas +(cherry picked from commit ad4419019a006938731035a766b67838678e6048) +--- + libibverbs/driver.h | 5 +++++ + providers/mlx4/verbs.c | 4 ++-- + providers/mlx5/verbs.c | 3 ++- + 3 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/libibverbs/driver.h b/libibverbs/driver.h +index 887412de..0b2cd089 100644 +--- a/libibverbs/driver.h ++++ b/libibverbs/driver.h +@@ -330,6 +330,11 @@ static inline int verbs_get_srq_num(struct ibv_srq *srq, uint32_t *srq_num) + return ENOSYS; + } + ++static inline bool check_comp_mask(uint64_t input, uint64_t supported) ++{ ++ return (input & ~supported) == 0; ++} ++ + int ibv_query_gid_type(struct ibv_context *context, uint8_t port_num, + unsigned int index, enum ibv_gid_type *type); + #endif /* INFINIBAND_DRIVER_H */ +diff --git a/providers/mlx4/verbs.c b/providers/mlx4/verbs.c +index b966ef2c..7c8f9da8 100644 +--- a/providers/mlx4/verbs.c ++++ b/providers/mlx4/verbs.c +@@ -919,8 +919,8 @@ static struct ibv_qp *create_qp_ex(struct ibv_context *context, + goto err_free; + + if (mlx4qp_attr) { +- if (mlx4qp_attr->comp_mask & +- ~(MLX4DV_QP_INIT_ATTR_MASK_RESERVED - 1)) { ++ if (!check_comp_mask(mlx4qp_attr->comp_mask, ++ MLX4DV_QP_INIT_ATTR_MASK_RESERVED - 1)) { + errno = EINVAL; + goto err_free; + } +diff --git a/providers/mlx5/verbs.c b/providers/mlx5/verbs.c +index 2315a0d9..6506bc36 100644 +--- a/providers/mlx5/verbs.c ++++ b/providers/mlx5/verbs.c +@@ -433,7 +433,8 @@ static struct ibv_cq_ex *create_cq(struct ibv_context *context, + cmd.cqe_size = cqe_sz; + + if (mlx5cq_attr) { +- if (mlx5cq_attr->comp_mask & ~(MLX5DV_CQ_INIT_ATTR_MASK_RESERVED - 1)) { ++ if (!check_comp_mask(mlx5cq_attr->comp_mask, ++ MLX5DV_CQ_INIT_ATTR_MASK_RESERVED - 1)) { + mlx5_dbg(fp, MLX5_DBG_CQ, + "Unsupported vendor comp_mask for create_cq\n"); + errno = EINVAL; +-- +2.12.1 + diff --git a/SOURCES/0001-Use-integer-as-getopt_long-returns-integer.patch b/SOURCES/0001-Use-integer-as-getopt_long-returns-integer.patch deleted file mode 100644 index 07d880b..0000000 --- a/SOURCES/0001-Use-integer-as-getopt_long-returns-integer.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a846db7bde6f756e320035da7cfe4d78e62e2a87 Mon Sep 17 00:00:00 2001 -From: Honggang Li -Date: Tue, 25 Apr 2017 13:28:41 +0800 -Subject: [PATCH] Use integer as getopt_long returns integer - -ARM chars are unsigned by default. getopt_long return 255 instead -1. -That will cause an endless loop for aarch64 platform. - -Signed-off-by: Honggang Li ---- - rdma-ndd/rdma-ndd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/rdma-ndd/rdma-ndd.c b/rdma-ndd/rdma-ndd.c -index 1579a02..e7be22b 100644 ---- a/rdma-ndd/rdma-ndd.c -+++ b/rdma-ndd/rdma-ndd.c -@@ -297,7 +297,7 @@ int main(int argc, char *argv[]) - { } - }; - -- char c = getopt_long(argc, argv, "fh", long_opts, &opt_idx); -+ int c = getopt_long(argc, argv, "fh", long_opts, &opt_idx); - if (c == -1) - break; - --- -1.8.3.1 - diff --git a/SOURCES/0001-ibacm-incorrect-usage-of-be-byte.patch b/SOURCES/0001-ibacm-incorrect-usage-of-be-byte.patch new file mode 100644 index 0000000..658a58f --- /dev/null +++ b/SOURCES/0001-ibacm-incorrect-usage-of-be-byte.patch @@ -0,0 +1,51 @@ +commit e2c3c3fefa26287dcce1e70634792cff47d775ff +Author: Michael J. Ruhl +Date: Mon Oct 16 10:24:21 2017 -0400 + + ibacm: Incorrect usage of BE byte order of MLID attach/detach_mcast() + + The MLID value passed to ibv_attach/detach_mcast() must be in host + byte order. + + acmp.c incorrectly uses the big endian format when doing a multicast + attach/detach (join). Multicast packets are used to do name resolution + by the libibacmp library. + + There are two possible results because of this issue. + + If a kernel has commit 8561eae60ff9, the attach will fail with an + EINVAL. ibacm will log this as a failure during the multicast join. + + If a kernel does not have commit 8561eae60ff9, the attach will + complete successfully. Packets sent to this address will be dropped + because the packet dlid value and the multicast address information + given by the attach will not match. + + Update MLID usage to use the correct byte order. + + Reviewed-by: Mike Marciniszyn + Signed-off-by: Michael J. Ruhl + Signed-off-by: Doug Ledford + +diff --git a/ibacm/prov/acmp/src/acmp.c b/ibacm/prov/acmp/src/acmp.c +index aa784166..78d9a295 100644 +--- a/ibacm/prov/acmp/src/acmp.c ++++ b/ibacm/prov/acmp/src/acmp.c +@@ -732,7 +732,7 @@ static void acmp_process_join_resp(struct acm_sa_mad *sa_mad) + acm_log(0, "ERROR - unable to create ah\n"); + goto out; + } +- ret = ibv_attach_mcast(ep->qp, &mc_rec->mgid, mc_rec->mlid); ++ ret = ibv_attach_mcast(ep->qp, &dest->mgid, dest->av.dlid); + if (ret) { + acm_log(0, "ERROR - unable to attach QP to multicast group\n"); + ibv_destroy_ah(dest->ah); +@@ -1429,7 +1429,7 @@ static void acmp_ep_join(struct acmp_ep *ep) + + if (ep->mc_dest[0].state == ACMP_READY && ep->mc_dest[0].ah) { + ibv_detach_mcast(ep->qp, &ep->mc_dest[0].mgid, +- be16toh(ep->mc_dest[0].av.dlid)); ++ ep->mc_dest[0].av.dlid); + ibv_destroy_ah(ep->mc_dest[0].ah); + ep->mc_dest[0].ah = NULL; + } diff --git a/SOURCES/0001-ibverbs-Report-raw-packet-caps-as-part-of-query-devi.patch b/SOURCES/0001-ibverbs-Report-raw-packet-caps-as-part-of-query-devi.patch deleted file mode 100644 index a5a5193..0000000 --- a/SOURCES/0001-ibverbs-Report-raw-packet-caps-as-part-of-query-devi.patch +++ /dev/null @@ -1,152 +0,0 @@ -From dbae02eb61ae3460922710997e7f22b1ebc075a7 Mon Sep 17 00:00:00 2001 -From: Noa Osherovich -Date: Sun, 13 Nov 2016 10:47:15 +0200 -Subject: [PATCH rdma-core 1/6] ibverbs: Report raw packet caps as part of - query device - -Currently, existing raw packet capabilities (IP CSUM and scatter FCS) -are reported separately to the user via ibv_query_device_ex. - -Unify those capabilities into a single enum and report them together -for a better user experience. - -Also introduce CVLAN stripping offload capability. CVLAN is the -customer VLAN tag (inner tag). -CVLAN stripping offload is the device's ability to strip this tag -from incoming raw Ethernet packets and report the data in the -matching work completion. - -This patch includes: -- Reading from the uverbs layer and report back to an application. -- Extending ibv_devinfo to print that information. - -Signed-off-by: Noa Osherovich -Reviewed-by: Maor Gottlieb -Reviewed-by: Yishai Hadas ---- - libibverbs/cmd.c | 8 ++++++++ - libibverbs/examples/devinfo.c | 14 ++++++++++++++ - libibverbs/kern-abi.h | 2 +- - libibverbs/man/ibv_query_device_ex.3 | 9 +++++++++ - libibverbs/verbs.h | 7 +++++++ - 5 files changed, 39 insertions(+), 1 deletion(-) - -diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c -index 9b49da00..4aebbb51 100644 ---- a/libibverbs/cmd.c -+++ b/libibverbs/cmd.c -@@ -230,6 +230,14 @@ int ibv_cmd_query_device_ex(struct ibv_context *context, - attr->max_wq_type_rq = resp->max_wq_type_rq; - } - -+ if (attr_size >= offsetof(struct ibv_device_attr_ex, raw_packet_caps) + -+ sizeof(attr->raw_packet_caps)) { -+ if (resp->response_length >= -+ offsetof(struct ibv_query_device_resp_ex, raw_packet_caps) + -+ sizeof(resp->raw_packet_caps)) -+ attr->raw_packet_caps = resp->raw_packet_caps; -+ } -+ - return 0; - } - -diff --git a/libibverbs/examples/devinfo.c b/libibverbs/examples/devinfo.c -index d88562f2..42222c4c 100644 ---- a/libibverbs/examples/devinfo.c -+++ b/libibverbs/examples/devinfo.c -@@ -401,6 +401,17 @@ static void print_packet_pacing_caps(const struct ibv_packet_pacing_caps *caps) - } - } - -+static void print_raw_packet_caps(uint32_t raw_packet_caps) -+{ -+ printf("\traw packet caps:\n"); -+ if (raw_packet_caps & IBV_RAW_PACKET_CAP_CVLAN_STRIPPING) -+ printf("\t\t\t\t\tC-VLAN stripping offload\n"); -+ if (raw_packet_caps & IBV_RAW_PACKET_CAP_SCATTER_FCS) -+ printf("\t\t\t\t\tScatter FCS offload\n"); -+ if (raw_packet_caps & IBV_RAW_PACKET_CAP_IP_CSUM) -+ printf("\t\t\t\t\tIP csum offload\n"); -+} -+ - static int print_hca_cap(struct ibv_device *ib_dev, uint8_t ib_port) - { - struct ibv_context *ctx; -@@ -499,6 +510,9 @@ static int print_hca_cap(struct ibv_device *ib_dev, uint8_t ib_port) - else - printf("\tcore clock not supported\n"); - -+ if (device_attr.raw_packet_caps) -+ print_raw_packet_caps(device_attr.raw_packet_caps); -+ - printf("\tdevice_cap_flags_ex:\t\t0x%" PRIX64 "\n", device_attr.device_cap_flags_ex); - print_device_cap_flags_ex(device_attr.device_cap_flags_ex); - print_tso_caps(&device_attr.tso_caps); -diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h -index 210dd3e4..3958f0c1 100644 ---- a/libibverbs/kern-abi.h -+++ b/libibverbs/kern-abi.h -@@ -290,7 +290,7 @@ struct ibv_query_device_resp_ex { - __u64 device_cap_flags_ex; - struct ibv_rss_caps_resp rss_caps; - __u32 max_wq_type_rq; -- __u32 reserved; -+ __u32 raw_packet_caps; - }; - - struct ibv_query_port { -diff --git a/libibverbs/man/ibv_query_device_ex.3 b/libibverbs/man/ibv_query_device_ex.3 -index c2910170..fdfb7081 100644 ---- a/libibverbs/man/ibv_query_device_ex.3 -+++ b/libibverbs/man/ibv_query_device_ex.3 -@@ -32,6 +32,7 @@ struct ibv_tso_caps tso_caps; /* TCP segmentation offload c - struct ibv_rss_caps rss_caps; /* RSS capabilities */ - uint32_t max_wq_type_rq; /* Max Work Queue from type RQ */ - struct ibv_packet_pacing_caps packet_pacing_caps; /* Packet pacing capabilities */ -+uint32_t raw_packet_caps; /* Raw packet capabilities, use enum ibv_raw_packet_caps */ - .in -8 - }; - -@@ -75,6 +76,14 @@ struct ibv_packet_pacing_caps { - uint32_t supported_qpts; /* Bitmap showing which QP types are supported. */ - }; - -+enum ibv_raw_packet_caps { -+.in +8 -+IBV_RAW_PACKET_CAP_CVLAN_STRIPPING = 1 << 0, /* CVLAN stripping is supported */ -+IBV_RAW_PACKET_CAP_SCATTER_FCS = 1 << 1, /* FCS scattering is supported */ -+IBV_RAW_PACKET_CAP_IP_CSUM = 1 << 2, /* IP CSUM offload is supported */ -+.in -8 -+}; -+ - .fi - .SH "RETURN VALUE" - .B ibv_query_device_ex() -diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h -index 25f4eded..604b09e8 100644 ---- a/libibverbs/verbs.h -+++ b/libibverbs/verbs.h -@@ -252,6 +252,12 @@ struct ibv_packet_pacing_caps { - uint32_t supported_qpts; - }; - -+enum ibv_raw_packet_caps { -+ IBV_RAW_PACKET_CAP_CVLAN_STRIPPING = 1 << 0, -+ IBV_RAW_PACKET_CAP_SCATTER_FCS = 1 << 1, -+ IBV_RAW_PACKET_CAP_IP_CSUM = 1 << 2, -+}; -+ - struct ibv_device_attr_ex { - struct ibv_device_attr orig_attr; - uint32_t comp_mask; -@@ -263,6 +269,7 @@ struct ibv_device_attr_ex { - struct ibv_rss_caps rss_caps; - uint32_t max_wq_type_rq; - struct ibv_packet_pacing_caps packet_pacing_caps; -+ uint32_t raw_packet_caps; /* Use ibv_raw_packet_caps */ - }; - - enum ibv_mtu { --- -2.12.1 - diff --git a/SOURCES/0001-iwpmd-fix-double-mutex-unlock.patch b/SOURCES/0001-iwpmd-fix-double-mutex-unlock.patch new file mode 100644 index 0000000..0d48fec --- /dev/null +++ b/SOURCES/0001-iwpmd-fix-double-mutex-unlock.patch @@ -0,0 +1,30 @@ +From c7f4e4485a35b585742c4252816a494eaec1e87c Mon Sep 17 00:00:00 2001 +From: Bharat Potnuri +Date: Wed, 31 Jan 2018 21:07:51 +0530 +Subject: [PATCH rdma-core] iwpmd: fix double mutex unlock + +pthread_mutex_unlock() is used twice and this patch fixes it. + +Fixes: be3fbf85b ("iwpmd: use ccan list.h for pending_messages") +Signed-off-by: Potnuri Bharat Teja +Reviewed-by: Steve Wise +Signed-off-by: Doug Ledford +--- + iwpmd/iwarp_pm_helper.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/iwpmd/iwarp_pm_helper.c b/iwpmd/iwarp_pm_helper.c +index bebc151f..b8c23018 100644 +--- a/iwpmd/iwarp_pm_helper.c ++++ b/iwpmd/iwarp_pm_helper.c +@@ -578,7 +578,6 @@ int add_iwpm_pending_msg(iwpm_send_msg *send_msg) + + pthread_mutex_lock(&pending_msg_mutex); + list_add(&pending_messages, &pending_msg->entry); +- pthread_mutex_unlock(&pending_msg_mutex); + pthread_mutex_unlock(&pending_msg_mutex); + /* signal the thread that a new message has been posted */ + pthread_cond_signal(&cond_pending_msg); +-- +2.16.1 + diff --git a/SOURCES/0001-libibumad-clean-up-htonll-ntohnll-handling.patch b/SOURCES/0001-libibumad-clean-up-htonll-ntohnll-handling.patch deleted file mode 100644 index c428baa..0000000 --- a/SOURCES/0001-libibumad-clean-up-htonll-ntohnll-handling.patch +++ /dev/null @@ -1,46 +0,0 @@ -From aec9bc1d8581134239f54959cde3c16503016d1d Mon Sep 17 00:00:00 2001 -From: Jarod Wilson -Date: Mon, 22 May 2017 09:49:12 -0400 -Subject: [PATCH rdma-core] libibumad: clean up htonll/ntohnll handling - -Only ntohll was being checked to see if it wasn't defined, and was then -redefining htonll as well as ntohll. This was causing some problems for -the compile of the opa-ff package. Simple enough to rearrange this code a -bit such that htonll and ntohll are handled entirely independent of one -another. - -Reported-by: Honggang Li -Signed-off-by: Jarod Wilson ---- - libibumad/umad.h | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/libibumad/umad.h b/libibumad/umad.h -index 81811380..479165a8 100644 ---- a/libibumad/umad.h -+++ b/libibumad/umad.h -@@ -247,15 +247,17 @@ static inline void umad_free(void *umad) - free(umad); - } - -+/* Users should use the glibc functions directly, not these wrappers */ - #ifndef ntohll --#undef htonll - #undef ntohll --/* Users should use the glibc functions directly, not these wrappers */ --static inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); } - static inline __attribute__((deprecated)) uint64_t ntohll(uint64_t x) { return be64toh(x); } --#define htonll htonll - #define ntohll ntohll - #endif -+#ifndef htonll -+#undef htonll -+static inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); } -+#define htonll htonll -+#endif - - END_C_DECLS - #endif /* _UMAD_H */ --- -2.12.1 - diff --git a/SOURCES/0001-srp_daemon-Don-t-create-async_ev_thread-if-only-run-.patch b/SOURCES/0001-srp_daemon-Don-t-create-async_ev_thread-if-only-run-.patch new file mode 100644 index 0000000..d70c2fd --- /dev/null +++ b/SOURCES/0001-srp_daemon-Don-t-create-async_ev_thread-if-only-run-.patch @@ -0,0 +1,48 @@ +From 441bf55e978cf37167d515a0d48773736cadfe2e Mon Sep 17 00:00:00 2001 +From: Honggang Li +Date: Wed, 20 Dec 2017 03:09:58 +0800 +Subject: [PATCH] srp_daemon: Don't create async_ev_thread if only run once + +fd3005f0cd34 moves the signal handler setup from ibsrpdm path. So, +default signal handler will be used when the main pthread send signal +SIGINT to pthread async_ev_thread. ibsrpdm will exit with non-zero +exit code as default signal handler killed it. ibsrpdm should return +with exit code zero, if no error emerged. + +We should not create async_ev_thread for ibsrpdm. + +Fixes: fd3005f0cd34 ("srp_daemon: Move the setup of the wakeup_pipe after openlog") +Reviewed-by: Bart Van Assche +Signed-off-by: Honggang Li +Signed-off-by: Leon Romanovsky +(cherry picked from commit 3f58c9237533ed9d92f3d08cad56527299781862) +Signed-off-by: Honggang Li +--- + srp_daemon/srp_daemon.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c +index 2465ccd9..df6a8b17 100644 +--- a/srp_daemon/srp_daemon.c ++++ b/srp_daemon/srp_daemon.c +@@ -1945,12 +1945,12 @@ static struct resources *alloc_res(void) + run_thread_get_trap_notices, &res->res); + if (ret) + goto err; +- } + +- ret = pthread_create(&res->res.async_ev_thread, NULL, +- run_thread_listen_to_events, &res->res); +- if (ret) +- goto err; ++ ret = pthread_create(&res->res.async_ev_thread, NULL, ++ run_thread_listen_to_events, &res->res); ++ if (ret) ++ goto err; ++ } + + if (config->retry_timeout && !config->once) { + ret = pthread_create(&res->res.reconnect_thread, NULL, +-- +2.15.GIT + diff --git a/SOURCES/0001-srp_daemon-Remove-unsupported-systemd-configurations.patch b/SOURCES/0001-srp_daemon-Remove-unsupported-systemd-configurations.patch new file mode 100644 index 0000000..defe5fc --- /dev/null +++ b/SOURCES/0001-srp_daemon-Remove-unsupported-systemd-configurations.patch @@ -0,0 +1,63 @@ +From 01ff44aeedce5dba803ea7ae761fa06615b6e0af Mon Sep 17 00:00:00 2001 +From: Honggang Li +Date: Wed, 27 Dec 2017 11:44:33 +0800 +Subject: [PATCH] srp_daemon: Remove unsupported systemd configurations + +Note: This is rhel-7.5 specific patch. + ++--------------------------+---------------+ +| lvalue | systemd | ++--------------------------+---------------+ +| MemoryDenyWriteExecute | 231 | +| ProtectControlGroups | 232 | +| ProtectKernelModules | 232 | +| RestrictRealtime | 231 | ++--------------------------+---------------+ + +RHEL-7.5 includes systemd-219-51 which does not support +those configuration yet, so remove them. + +Signed-off-by: Honggang Li +--- + srp_daemon/srp_daemon.service.in | 3 --- + srp_daemon/srp_daemon_port@.service.in | 4 ---- + 2 files changed, 7 deletions(-) + +diff --git a/srp_daemon/srp_daemon.service.in b/srp_daemon/srp_daemon.service.in +index 93e44425..b8bea643 100644 +--- a/srp_daemon/srp_daemon.service.in ++++ b/srp_daemon/srp_daemon.service.in +@@ -10,11 +10,8 @@ Before=remote-fs-pre.target + Type=oneshot + RemainAfterExit=yes + ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/srp_daemon/start_on_all_ports +-MemoryDenyWriteExecute=yes + PrivateTmp=yes + ProtectHome=yes +-ProtectKernelModules=yes +-RestrictRealtime=yes + + [Install] + WantedBy=remote-fs-pre.target +diff --git a/srp_daemon/srp_daemon_port@.service.in b/srp_daemon/srp_daemon_port@.service.in +index 3d5a11e8..7516e8a2 100644 +--- a/srp_daemon/srp_daemon_port@.service.in ++++ b/srp_daemon/srp_daemon_port@.service.in +@@ -24,14 +24,10 @@ BindsTo=srp_daemon.service + [Service] + Type=simple + ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/srp_daemon --systemd -e -c -n -j %I -R 60 +-MemoryDenyWriteExecute=yes + PrivateNetwork=yes + PrivateTmp=yes +-ProtectControlGroups=yes + ProtectHome=yes +-ProtectKernelModules=yes + ProtectSystem=full +-RestrictRealtime=yes + SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io + + [Install] +-- +2.15.GIT + diff --git a/SOURCES/0001-srp_daemon-srp_daemon.c-Don-t-rely-on-attribute-offs.patch b/SOURCES/0001-srp_daemon-srp_daemon.c-Don-t-rely-on-attribute-offs.patch deleted file mode 100644 index d0a1614..0000000 --- a/SOURCES/0001-srp_daemon-srp_daemon.c-Don-t-rely-on-attribute-offs.patch +++ /dev/null @@ -1,57 +0,0 @@ -From a7754ab3fc01b99a4963c786ee1dc1349a5d35e0 Mon Sep 17 00:00:00 2001 -From: Hal Rosenstock -Date: Thu, 13 Apr 2017 10:48:00 -0400 -Subject: [PATCH 1/3] srp_daemon/srp_daemon.c: Don't rely on attribute offset, - in get_shared_pkeys - -get_shared_pkeys has been using SubAdmGet rather than SubAdmGetTable since -commit 2ad09524931dbf98d412e1912c1bdbf22f8ac81d -srp_daemon: Work around SM bug over non-default P_Key support - -so RMPP is no longer used in response so it's not safe to -rely on AttributeOffset field. Good MAD status is sufficient -to say that valid PathRecord was returned. - -Found-by: Honggang LI -using embedded subnet manager running on an Intel True Scale -Edge Switch 12300. - -This has been broken since srptools-1.0.1 which was first -release containing commit mentioned above. - -Signed-off-by: Hal Rosenstock -Signed-off-by: Honggang Li ---- - srp_daemon/srp_daemon.c | 9 --------- - 1 file changed, 9 deletions(-) - -diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c -index 0c8bda3..76fec28 100644 ---- a/srp_daemon/srp_daemon.c -+++ b/srp_daemon/srp_daemon.c -@@ -1102,7 +1102,6 @@ static int get_shared_pkeys(struct resources *res, - struct srp_dm_rmpp_sa_mad *out_sa_mad, *in_sa_mad; - ib_path_rec_t *path_rec; - ssize_t len; -- int size; - int i, num_pkeys = 0; - uint16_t pkey; - uint16_t local_port_lid = get_port_lid(res->ud_res->ib_ctx, -@@ -1148,14 +1147,6 @@ static int get_shared_pkeys(struct resources *res, - if (len < 0) - goto err; - -- size = ib_get_attr_size(in_sa_mad->attr_offset); -- if (!size) { -- if (config->verbose) -- printf("PathRec Query did not find any targets " -- "over P_Key %x\n", pkey); -- continue; -- } -- - path_rec = (ib_path_rec_t *)in_sa_mad->data; - pkeys[num_pkeys++] = be16toh(path_rec->pkey); - } --- -1.8.3.1 - diff --git a/SOURCES/0001-srp_daemon-srp_daemon.service-should-be-started-afte.patch b/SOURCES/0001-srp_daemon-srp_daemon.service-should-be-started-afte.patch new file mode 100644 index 0000000..05e7ea9 --- /dev/null +++ b/SOURCES/0001-srp_daemon-srp_daemon.service-should-be-started-afte.patch @@ -0,0 +1,35 @@ +From 141910626b7601c4d697274ea49e951584ae24a5 Mon Sep 17 00:00:00 2001 +From: Honggang Li +Date: Fri, 29 Dec 2017 17:21:52 +0800 +Subject: [PATCH] srp_daemon: srp_daemon.service should be started after + network.target + +This is a rhel-7.5 specific workaround as rhel-7.5 is using +systemd-219. + +The srp_daemon service will be started at the very beginning state +of systemd when boot/reboot the machine, in case srp_daemon.service +is not after network.target. As result, the srp_daemon.service will +be terminated because of SERVICE_FAILURE_RESOURCES. + +Fixes: 1c7fe513e3e9 ("srp_daemon: One systemd service per port") +Signed-off-by: Honggang Li +--- + srp_daemon/srp_daemon.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/srp_daemon/srp_daemon.service.in b/srp_daemon/srp_daemon.service.in +index 188b7e1a..93e44425 100644 +--- a/srp_daemon/srp_daemon.service.in ++++ b/srp_daemon/srp_daemon.service.in +@@ -3,6 +3,7 @@ Description=Daemon that discovers and logs in to SRP target systems + Documentation=man:srp_daemon file:/etc/srp_daemon.conf + DefaultDependencies=false + Conflicts=emergency.target emergency.service ++After=network.target + Before=remote-fs-pre.target + + [Service] +-- +2.15.GIT + diff --git a/SOURCES/0002-ibacm-incorrect-list-used-for.patch b/SOURCES/0002-ibacm-incorrect-list-used-for.patch new file mode 100644 index 0000000..e6c9b4e --- /dev/null +++ b/SOURCES/0002-ibacm-incorrect-list-used-for.patch @@ -0,0 +1,51 @@ +commit f3a969b4542204c9b09d5c2d229c7b55aaa0995e +Author: Michael J. Ruhl +Date: Mon Oct 16 10:24:40 2017 -0400 + + ibacm: Incorrect list used for subnet list causes a segfault + + Setting the provider keyword in the ibacm_opts.cfg file to something + other than 'default' will cause ibacm to segfault on startup: + + ibacm[32739]: segfault at 302e40 ip 000000000040432d + sp 00007ffe4039e1c0 error 4 in ibacm[400000+c000] + + To re-produce the segfault, change the provider keyword in + ibacm_opts.cfg from: + + provider ibacmp default + + to: + + provider ibacmp 0xFE80000000000000 + + When adding subnets to a provider subnet list, the incorrect list is + used. The list used is the provider_list (list of all providers) + rather than the (specific) provider subnet list. + + This corrupts the provider_list, and causes ibacm to crash with the + above segfault. + + Use the correct list when adding subnet information to a provider. + + Fixes: 26e05f8304a506 ("ibacm: use ccan/list.h") + Reviewed-by: Mike Marciniszyn + Signed-off-by: Michael J. Ruhl + Tested-by: Nicolas Morey-Chaisemartin + Signed-off-by: Doug Ledford + +diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c +index 1ccef948..a67001d4 100644 +--- a/ibacm/src/acm.c ++++ b/ibacm/src/acm.c +@@ -2587,8 +2587,8 @@ static void acm_load_prov_config(void) + return; + } + subnet->subnet_prefix = htobe64(prefix); +- list_add_after(&provider_list, &prov->entry, +- &subnet->entry); ++ list_add_tail(&prov->subnet_list, ++ &subnet->entry); + } + } + } diff --git a/SOURCES/0002-ibverbs-Allow-creation-and-modification-of-WQ-with-c.patch b/SOURCES/0002-ibverbs-Allow-creation-and-modification-of-WQ-with-c.patch deleted file mode 100644 index 071248b..0000000 --- a/SOURCES/0002-ibverbs-Allow-creation-and-modification-of-WQ-with-c.patch +++ /dev/null @@ -1,181 +0,0 @@ -From 147a96f89b7ea5e5f708ab323c41fb81a99855aa Mon Sep 17 00:00:00 2001 -From: Noa Osherovich -Date: Tue, 15 Nov 2016 11:15:43 +0200 -Subject: [PATCH rdma-core 2/6] ibverbs: Allow creation and modification of WQ - with cvlan offload - -Enable WQ creation and modification with cvlan stripping offload. -This includes: -- Adding flags and flags mask fields to ibv_wq_init_attr. -- Similarly extend ibv_wq_attr to allow setting and unsetting this - offload during ibv_modify_wq. - -Creation of a WQ with cvlan offload is done by setting the following -fields of the ibv_wq_init_attr struct: -- Setting the IBV_WQ_FLAGS_CVLAN_STRIPPING bit of the create_flags - field. -- Setting the IBV_WQ_INIT_ATTR_FLAGS bit of the comp_mask field. - -Modification of the cvlan stripping property is done by setting the -following fields of the ibv_wq_attr struct: -- Setting IBV_WQ_ATTR_FLAGS bit of the attr_mask field. -- Setting the IBV_RAW_PACKET_CAP_CVLAN_STRIPPING bit of the - flags_mask field. -- Setting or unsetting the IBV_RAW_PACKET_CAP_CVLAN_STRIPPING bit of - the flags field. - -Signed-off-by: Noa Osherovich -Reviewed-by: Maor Gottlieb -Reviewed-by: Yishai Hadas ---- - libibverbs/cmd.c | 18 ++++++++++++++++++ - libibverbs/kern-abi.h | 4 ++++ - libibverbs/man/ibv_create_wq.3 | 11 +++++++++++ - libibverbs/man/ibv_modify_wq.3 | 2 ++ - libibverbs/verbs.h | 14 ++++++++++++-- - 5 files changed, 47 insertions(+), 2 deletions(-) - -diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c -index 4aebbb51..b8fe76df 100644 ---- a/libibverbs/cmd.c -+++ b/libibverbs/cmd.c -@@ -1894,6 +1894,15 @@ int ibv_cmd_create_wq(struct ibv_context *context, - cmd->max_wr = wq_init_attr->max_wr; - cmd->comp_mask = 0; - -+ if (cmd_core_size >= offsetof(struct ibv_create_wq, create_flags) + -+ sizeof(cmd->create_flags)) { -+ if (wq_init_attr->comp_mask & IBV_WQ_INIT_ATTR_FLAGS) { -+ if (wq_init_attr->create_flags & ~(IBV_WQ_FLAGS_RESERVED - 1)) -+ return EOPNOTSUPP; -+ cmd->create_flags = wq_init_attr->create_flags; -+ } -+ } -+ - err = write(context->cmd_fd, cmd, cmd_size); - if (err != cmd_size) - return errno; -@@ -1927,6 +1936,15 @@ int ibv_cmd_modify_wq(struct ibv_wq *wq, struct ibv_wq_attr *attr, - - cmd->curr_wq_state = attr->curr_wq_state; - cmd->wq_state = attr->wq_state; -+ if (cmd_core_size >= offsetof(struct ibv_modify_wq, flags_mask) + -+ sizeof(cmd->flags_mask)) { -+ if (attr->attr_mask & IBV_WQ_ATTR_FLAGS) { -+ if (attr->flags_mask & ~(IBV_WQ_FLAGS_RESERVED - 1)) -+ return EOPNOTSUPP; -+ cmd->flags = attr->flags; -+ cmd->flags_mask = attr->flags_mask; -+ } -+ } - cmd->wq_handle = wq->handle; - cmd->attr_mask = attr->attr_mask; - -diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h -index 3958f0c1..72a16b67 100644 ---- a/libibverbs/kern-abi.h -+++ b/libibverbs/kern-abi.h -@@ -1249,6 +1249,8 @@ struct ibv_create_wq { - __u32 cq_handle; - __u32 max_wr; - __u32 max_sge; -+ __u32 create_flags; -+ __u32 reserved; - }; - - struct ibv_create_wq_resp { -@@ -1279,6 +1281,8 @@ struct ibv_modify_wq { - __u32 wq_handle; - __u32 wq_state; - __u32 curr_wq_state; -+ __u32 flags; -+ __u32 flags_mask; - }; - - struct ibv_create_rwq_ind_table { -diff --git a/libibverbs/man/ibv_create_wq.3 b/libibverbs/man/ibv_create_wq.3 -index aad67416..9a541fea 100644 ---- a/libibverbs/man/ibv_create_wq.3 -+++ b/libibverbs/man/ibv_create_wq.3 -@@ -31,8 +31,19 @@ uint32_t max_sge; /* Requested max number of scatter/gat - struct ibv_pd *pd; /* PD to be associated with the WQ */ - struct ibv_cq *cq; /* CQ to be associated with the WQ */ - uint32_t comp_mask; /* Identifies valid fields. Use ibv_wq_init_attr_mask */ -+uint32_t create_flags /* Creation flags for this WQ, use enum ibv_wq_flags */ - .in -8 - }; -+ -+.sp -+.nf -+enum ibv_wq_flags { -+.in +8 -+IBV_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0, /* CVLAN field will be stripped from incoming packets */ -+IBV_WQ_FLAGS_RESERVED = 1 << 1, -+.in -8 -+}; -+.nf - .fi - .PP - The function -diff --git a/libibverbs/man/ibv_modify_wq.3 b/libibverbs/man/ibv_modify_wq.3 -index f17faedf..1972ec2a 100644 ---- a/libibverbs/man/ibv_modify_wq.3 -+++ b/libibverbs/man/ibv_modify_wq.3 -@@ -26,6 +26,8 @@ struct ibv_wq_attr { - uint32_t attr_mask; /* Use enum ibv_wq_attr_mask */ - enum ibv_wq_state wq_state; /* Move to this state */ - enum ibv_wq_state curr_wq_state; /* Assume this is the current state */ -+uint32_t flags; /* Flags values to modify, use enum ibv_wq_flags */ -+uint32_t flags_mask; /* Which flags to modify, use enum ibv_wq_flags */ - .in -8 - }; - .fi -diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h -index 604b09e8..33985666 100644 ---- a/libibverbs/verbs.h -+++ b/libibverbs/verbs.h -@@ -667,7 +667,13 @@ enum ibv_wq_type { - }; - - enum ibv_wq_init_attr_mask { -- IBV_WQ_INIT_ATTR_RESERVED = 1 << 0, -+ IBV_WQ_INIT_ATTR_FLAGS = 1 << 0, -+ IBV_WQ_INIT_ATTR_RESERVED = 1 << 1, -+}; -+ -+enum ibv_wq_flags { -+ IBV_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0, -+ IBV_WQ_FLAGS_RESERVED = 1 << 1, - }; - - struct ibv_wq_init_attr { -@@ -678,6 +684,7 @@ struct ibv_wq_init_attr { - struct ibv_pd *pd; - struct ibv_cq *cq; - uint32_t comp_mask; -+ uint32_t create_flags; /* use ibv_wq_flags */ - }; - - enum ibv_wq_state { -@@ -690,7 +697,8 @@ enum ibv_wq_state { - enum ibv_wq_attr_mask { - IBV_WQ_ATTR_STATE = 1 << 0, - IBV_WQ_ATTR_CURR_STATE = 1 << 1, -- IBV_WQ_ATTR_RESERVED = 1 << 2 -+ IBV_WQ_ATTR_FLAGS = 1 << 2, -+ IBV_WQ_ATTR_RESERVED = 1 << 3, - }; - - struct ibv_wq_attr { -@@ -700,6 +708,8 @@ struct ibv_wq_attr { - enum ibv_wq_state wq_state; - /* Assume this is the current WQ state */ - enum ibv_wq_state curr_wq_state; -+ uint32_t flags; /* Use ibv_wq_flags */ -+ uint32_t flags_mask; /* Use ibv_wq_flags */ - }; - - /* --- -2.12.1 - diff --git a/SOURCES/0002-mlx5-Report-Multi-Packet-RQ-capabilities-through-mlx.patch b/SOURCES/0002-mlx5-Report-Multi-Packet-RQ-capabilities-through-mlx.patch new file mode 100644 index 0000000..6ea691a --- /dev/null +++ b/SOURCES/0002-mlx5-Report-Multi-Packet-RQ-capabilities-through-mlx.patch @@ -0,0 +1,170 @@ +From 868a69e7de67e10fc96436ec41dd9e0343053581 Mon Sep 17 00:00:00 2001 +From: Noa Osherovich +Date: Thu, 3 Aug 2017 10:00:14 +0300 +Subject: [PATCH rdma-core 2/3] mlx5: Report Multi-Packet RQ capabilities + through mlx5 direct verbs + +A Multi-Packet RQ is a receive queue where multiple packets are +written to the same WQE. Each message starts in the beginning of a +stride. The total size of the scatter elements of each WQE is +determined upon RQ creation and all the posted WQEs should meet the +determined size. + +A Multi-Packet RQ reduces the number of needed post-recv operations +thus increasing performance. + +It reduces memory footprint by allowing each packet to consume a +different number of strides instead of the whole WR. + +Signed-off-by: Noa Osherovich +Reviewed-by: Yishai Hadas +(cherry picked from commit ec8ec52698c7cbd6d06bd8f3e54b673a52cb4d30) +--- + providers/mlx5/man/mlx5dv_query_device.3 | 19 +++++++++++++++++++ + providers/mlx5/mlx5-abi.h | 11 +++++++++++ + providers/mlx5/mlx5.c | 5 +++++ + providers/mlx5/mlx5.h | 1 + + providers/mlx5/mlx5dv.h | 13 ++++++++++++- + providers/mlx5/verbs.c | 1 + + 6 files changed, 49 insertions(+), 1 deletion(-) + +diff --git a/providers/mlx5/man/mlx5dv_query_device.3 b/providers/mlx5/man/mlx5dv_query_device.3 +index c2fe9a3e..bb047454 100644 +--- a/providers/mlx5/man/mlx5dv_query_device.3 ++++ b/providers/mlx5/man/mlx5dv_query_device.3 +@@ -21,6 +21,25 @@ of the internal hardware structures that mlx5dv.h represents. Additions of new f + structures are handled by comp_mask field. + .PP + .nf ++struct mlx5dv_sw_parsing_caps { ++.in +8 ++uint32_t sw_parsing_offloads; /* Use enum mlx5dv_sw_parsing_offloads */ ++uint32_t supported_qpts; ++.in -8 ++}; ++.PP ++.nf ++struct mlx5dv_striding_rq_caps { ++.in +8 ++uint32_t min_single_stride_log_num_of_bytes; /* min log size of each stride */ ++uint32_t max_single_stride_log_num_of_bytes; /* max log size of each stride */ ++uint32_t min_single_wqe_log_num_of_strides; /* min log number of strides per WQE */ ++uint32_t max_single_wqe_log_num_of_strides; /* max log number of strides per WQE */ ++uint32_t supported_qpts; ++.in -8 ++}; ++.PP ++.nf + struct mlx5dv_context { + .in +8 + uint8_t version; +diff --git a/providers/mlx5/mlx5-abi.h b/providers/mlx5/mlx5-abi.h +index bce9e559..da7d54f2 100644 +--- a/providers/mlx5/mlx5-abi.h ++++ b/providers/mlx5/mlx5-abi.h +@@ -279,6 +279,16 @@ enum mlx5_mpw_caps { + MLX5_SUPPORT_EMPW = 1 << 2, + }; + ++enum mlx5_query_dev_resp_flags { ++ MLX5_QUERY_DEV_RESP_FLAGS_CQE_128B_COMP = 1 << 0, ++ MLX5_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD = 1 << 1, ++}; ++ ++struct mlx5_striding_rq_caps { ++ struct mlx5dv_striding_rq_caps caps; ++ __u32 reserved; ++}; ++ + struct mlx5_query_device_ex_resp { + struct ibv_query_device_resp_ex ibv_resp; + __u32 comp_mask; +@@ -289,6 +299,7 @@ struct mlx5_query_device_ex_resp { + struct mlx5_packet_pacing_caps packet_pacing_caps; + __u32 support_multi_pkt_send_wqe; + __u32 reserved; ++ struct mlx5_striding_rq_caps striding_rq_caps; + }; + + #endif /* MLX5_ABI_H */ +diff --git a/providers/mlx5/mlx5.c b/providers/mlx5/mlx5.c +index e7adf148..88287536 100644 +--- a/providers/mlx5/mlx5.c ++++ b/providers/mlx5/mlx5.c +@@ -636,6 +636,11 @@ int mlx5dv_query_device(struct ibv_context *ctx_in, + if (mctx->vendor_cap_flags & MLX5_VENDOR_CAP_FLAGS_ENHANCED_MPW) + attrs_out->flags |= MLX5DV_CONTEXT_FLAGS_ENHANCED_MPW; + ++ if (attrs_out->comp_mask & MLX5DV_CONTEXT_MASK_STRIDING_RQ) { ++ attrs_out->striding_rq_caps = mctx->striding_rq_caps; ++ comp_mask_out |= MLX5DV_CONTEXT_MASK_STRIDING_RQ; ++ } ++ + attrs_out->comp_mask = comp_mask_out; + + return 0; +diff --git a/providers/mlx5/mlx5.h b/providers/mlx5/mlx5.h +index 46fce282..1e8b45be 100644 +--- a/providers/mlx5/mlx5.h ++++ b/providers/mlx5/mlx5.h +@@ -272,6 +272,7 @@ struct mlx5_context { + uint64_t vendor_cap_flags; /* Use enum mlx5_vendor_cap_flags */ + struct mlx5dv_cqe_comp_caps cqe_comp_caps; + struct mlx5dv_ctx_allocators extern_alloc; ++ struct mlx5dv_striding_rq_caps striding_rq_caps; + }; + + struct mlx5_bitmap { +diff --git a/providers/mlx5/mlx5dv.h b/providers/mlx5/mlx5dv.h +index ffe2c555..0a7fe4d6 100644 +--- a/providers/mlx5/mlx5dv.h ++++ b/providers/mlx5/mlx5dv.h +@@ -58,7 +58,9 @@ enum { + + enum mlx5dv_context_comp_mask { + MLX5DV_CONTEXT_MASK_CQE_COMPRESION = 1 << 0, +- MLX5DV_CONTEXT_MASK_RESERVED = 1 << 1, ++ MLX5DV_CONTEXT_MASK_SWP = 1 << 1, ++ MLX5DV_CONTEXT_MASK_STRIDING_RQ = 1 << 2, ++ MLX5DV_CONTEXT_MASK_RESERVED = 1 << 3, + }; + + struct mlx5dv_cqe_comp_caps { +@@ -66,6 +68,14 @@ struct mlx5dv_cqe_comp_caps { + uint32_t supported_format; /* enum mlx5dv_cqe_comp_res_format */ + }; + ++struct mlx5dv_striding_rq_caps { ++ uint32_t min_single_stride_log_num_of_bytes; ++ uint32_t max_single_stride_log_num_of_bytes; ++ uint32_t min_single_wqe_log_num_of_strides; ++ uint32_t max_single_wqe_log_num_of_strides; ++ uint32_t supported_qpts; ++}; ++ + /* + * Direct verbs device-specific attributes + */ +@@ -74,6 +84,7 @@ struct mlx5dv_context { + uint64_t flags; + uint64_t comp_mask; + struct mlx5dv_cqe_comp_caps cqe_comp_caps; ++ struct mlx5dv_striding_rq_caps striding_rq_caps; + }; + + enum mlx5dv_context_flags { +diff --git a/providers/mlx5/verbs.c b/providers/mlx5/verbs.c +index 6506bc36..e9414c64 100644 +--- a/providers/mlx5/verbs.c ++++ b/providers/mlx5/verbs.c +@@ -2003,6 +2003,7 @@ int mlx5_query_device_ex(struct ibv_context *context, + mctx->vendor_cap_flags |= MLX5_VENDOR_CAP_FLAGS_ENHANCED_MPW; + + mctx->cqe_comp_caps = resp.cqe_comp_caps; ++ mctx->striding_rq_caps = resp.striding_rq_caps.caps; + + major = (raw_fw_ver >> 32) & 0xffff; + minor = (raw_fw_ver >> 16) & 0xffff; +-- +2.12.1 + diff --git a/SOURCES/0002-srp_daemon-srp_daemon.c-Eliminate-some-unneeded-code.patch b/SOURCES/0002-srp_daemon-srp_daemon.c-Eliminate-some-unneeded-code.patch deleted file mode 100644 index b240ed5..0000000 --- a/SOURCES/0002-srp_daemon-srp_daemon.c-Eliminate-some-unneeded-code.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a0637f2652aa8f634814366bcb58b1d1e527807d Mon Sep 17 00:00:00 2001 -From: Hal Rosenstock -Date: Thu, 13 Apr 2017 10:48:25 -0400 -Subject: [PATCH 2/3] srp_daemon/srp_daemon.c: Eliminate some unneeded code in - get_shared_pkeys - -PathRecords are obtained using SubAdmGet and not SubAdmGetTable -so RMPP is not involved. Eliminate unneeded initialization of MAD -RMPP fields. - -Signed-off-by: Hal Rosenstock ---- - srp_daemon/srp_daemon.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c -index 76fec28..1cf2815 100644 ---- a/srp_daemon/srp_daemon.c -+++ b/srp_daemon/srp_daemon.c -@@ -1134,8 +1134,6 @@ static int get_shared_pkeys(struct resources *res, - - /* Mark components: DLID, SLID, PKEY */ - out_sa_mad->comp_mask = htobe64(1 << 4 | 1 << 5 | 1 << 13); -- out_sa_mad->rmpp_version = 1; -- out_sa_mad->rmpp_type = 1; - path_rec = (ib_path_rec_t *)out_sa_mad->data; - path_rec->slid = htobe16(local_port_lid); - path_rec->dlid = htobe16(dest_port_lid); --- -1.8.3.1 - diff --git a/SOURCES/0003-ibverbs-Allow-creation-of-QP-with-cvlan-stripping-of.patch b/SOURCES/0003-ibverbs-Allow-creation-of-QP-with-cvlan-stripping-of.patch deleted file mode 100644 index 2c07a92..0000000 --- a/SOURCES/0003-ibverbs-Allow-creation-of-QP-with-cvlan-stripping-of.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 9a0668e887dfab9df405d3b76286a1ee5ec3efaf Mon Sep 17 00:00:00 2001 -From: Noa Osherovich -Date: Tue, 29 Nov 2016 10:12:31 +0200 -Subject: [PATCH rdma-core 3/6] ibverbs: Allow creation of QP with cvlan - stripping offload - -Allow users to create a QP that uses cvlan stripping capabilities if -supported by the hardware. - -Setting cvlan stripping offload will cause the device to strip the -cvlan from incoming raw Ethernet packets and provide its data in the -matching work completion. - -In addition, aligned ibv_create_qp_ex's man page with current code -(added ibv_qp_create_flags enum). - -Signed-off-by: Noa Osherovich -Reviewed-by: Maor Gottlieb -Reviewed-by: Yishai Hadas ---- - libibverbs/cmd.c | 3 ++- - libibverbs/man/ibv_create_qp_ex.3 | 8 ++++++++ - libibverbs/verbs.h | 1 + - 3 files changed, 11 insertions(+), 1 deletion(-) - -diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c -index b8fe76df..06ec6711 100644 ---- a/libibverbs/cmd.c -+++ b/libibverbs/cmd.c -@@ -926,7 +926,8 @@ static void create_qp_handle_resp_common(struct ibv_context *context, - - enum { - CREATE_QP_EX2_SUP_CREATE_FLAGS = IBV_QP_CREATE_BLOCK_SELF_MCAST_LB | -- IBV_QP_CREATE_SCATTER_FCS, -+ IBV_QP_CREATE_SCATTER_FCS | -+ IBV_QP_CREATE_CVLAN_STRIPPING, - }; - - int ibv_cmd_create_qp_ex2(struct ibv_context *context, -diff --git a/libibverbs/man/ibv_create_qp_ex.3 b/libibverbs/man/ibv_create_qp_ex.3 -index c778d159..99ae4975 100644 ---- a/libibverbs/man/ibv_create_qp_ex.3 -+++ b/libibverbs/man/ibv_create_qp_ex.3 -@@ -52,6 +52,14 @@ uint32_t max_inline_data;/* Requested max number of data (bytes) - .in -8 - }; - .nf -+enum ibv_qp_create_flags { -+.in +8 -+IBV_QP_CREATE_BLOCK_SELF_MCAST_LB = 1 << 1, /* Prevent self multicast loopback */ -+IBV_QP_CREATE_SCATTER_FCS = 1 << 8, /* FCS field will be scattered to host memory */ -+IBV_QP_CREATE_CVLAN_STRIPPING = 1 << 9, /* CVLAN field will be stripped from incoming packets */ -+.in -8 -+}; -+.nf - struct ibv_rx_hash_conf { - .in +8 - uint8_t rx_hash_function; /* RX hash function, use enum ibv_rx_hash_function_flags */ -diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h -index 33985666..c9084ea1 100644 ---- a/libibverbs/verbs.h -+++ b/libibverbs/verbs.h -@@ -780,6 +780,7 @@ enum ibv_qp_init_attr_mask { - enum ibv_qp_create_flags { - IBV_QP_CREATE_BLOCK_SELF_MCAST_LB = 1 << 1, - IBV_QP_CREATE_SCATTER_FCS = 1 << 8, -+ IBV_QP_CREATE_CVLAN_STRIPPING = 1 << 9, - }; - - struct ibv_rx_hash_conf { --- -2.12.1 - diff --git a/SOURCES/0003-mlx5-Allow-creation-of-a-Multi-Packet-RQ-using-direc.patch b/SOURCES/0003-mlx5-Allow-creation-of-a-Multi-Packet-RQ-using-direc.patch new file mode 100644 index 0000000..d519244 --- /dev/null +++ b/SOURCES/0003-mlx5-Allow-creation-of-a-Multi-Packet-RQ-using-direc.patch @@ -0,0 +1,300 @@ +From de7ba62097bef7a75bb995d2ea48704eccc5e4f8 Mon Sep 17 00:00:00 2001 +From: Noa Osherovich +Date: Sun, 6 Aug 2017 10:28:48 +0300 +Subject: [PATCH rdma-core 3/3] mlx5: Allow creation of a Multi-Packet RQ using + direct verbs + +Add needed definitions to allow creation of a Multi-Packet RQ using the +mlx5 direct verbs interface. + +In order to create a Multi-Packet RQ, one needs to provide a +mlx5dv_wq_init_attr containing the following information in its +striding_rq_attrs struct: +- single_stride_log_num_of_bytes: log of size of each stride +- single_wqe_log_num_of_strides: log of number of strides per WQE +- two_byte_shift_en: When enabled, hardware pads 2 bytes of zeros + before writing the message to memory (e.g. for IP alignment). + +Signed-off-by: Noa Osherovich +Reviewed-by: Yishai Hadas +(cherry picked from commit 36a7ea92d214d35b69ad7e668cc21719b2a4d3ba) +--- + debian/ibverbs-providers.symbols | 2 ++ + providers/mlx5/CMakeLists.txt | 2 +- + providers/mlx5/libmlx5.map | 5 +++ + providers/mlx5/mlx5-abi.h | 8 ++++- + providers/mlx5/mlx5dv.h | 46 +++++++++++++++++++++++++- + providers/mlx5/verbs.c | 71 ++++++++++++++++++++++++++++++++++++---- + 6 files changed, 125 insertions(+), 9 deletions(-) + +diff --git a/debian/ibverbs-providers.symbols b/debian/ibverbs-providers.symbols +index cb21dc5b..08ff9061 100644 +--- a/debian/ibverbs-providers.symbols ++++ b/debian/ibverbs-providers.symbols +@@ -8,8 +8,10 @@ libmlx5.so.1 ibverbs-providers #MINVER# + MLX5_1.0@MLX5_1.0 13 + MLX5_1.1@MLX5_1.1 14 + MLX5_1.2@MLX5_1.2 15 ++ MLX5_1.3@MLX5_1.3 16 + mlx5dv_init_obj@MLX5_1.0 13 + mlx5dv_init_obj@MLX5_1.2 15 + mlx5dv_query_device@MLX5_1.0 13 + mlx5dv_create_cq@MLX5_1.1 14 + mlx5dv_set_context_attr@MLX5_1.2 15 ++ mlx5dv_create_wq@MLX5_1.3 16 +diff --git a/providers/mlx5/CMakeLists.txt b/providers/mlx5/CMakeLists.txt +index ab6a42d8..88a406d9 100644 +--- a/providers/mlx5/CMakeLists.txt ++++ b/providers/mlx5/CMakeLists.txt +@@ -11,7 +11,7 @@ if (MLX5_MW_DEBUG) + endif() + + rdma_shared_provider(mlx5 libmlx5.map +- 1 1.2.${PACKAGE_VERSION} ++ 1 1.3.${PACKAGE_VERSION} + buf.c + cq.c + dbrec.c +diff --git a/providers/mlx5/libmlx5.map b/providers/mlx5/libmlx5.map +index 09d886d1..b1402dc2 100644 +--- a/providers/mlx5/libmlx5.map ++++ b/providers/mlx5/libmlx5.map +@@ -17,3 +17,8 @@ MLX5_1.2 { + mlx5dv_init_obj; + mlx5dv_set_context_attr; + } MLX5_1.1; ++ ++MLX5_1.3 { ++ global: ++ mlx5dv_create_wq; ++} MLX5_1.2; +diff --git a/providers/mlx5/mlx5-abi.h b/providers/mlx5/mlx5-abi.h +index da7d54f2..5f0ecea1 100644 +--- a/providers/mlx5/mlx5-abi.h ++++ b/providers/mlx5/mlx5-abi.h +@@ -206,6 +206,10 @@ struct mlx5_create_qp_resp { + __u32 uuar_index; + }; + ++enum mlx5_create_wq_comp_mask { ++ MLX5_IB_CREATE_WQ_STRIDING_RQ = 1 << 0, ++}; ++ + struct mlx5_drv_create_wq { + __u64 buf_addr; + __u64 db_addr; +@@ -214,7 +218,9 @@ struct mlx5_drv_create_wq { + __u32 user_index; + __u32 flags; + __u32 comp_mask; +- __u32 reserved; ++ __u32 single_stride_log_num_of_bytes; ++ __u32 single_wqe_log_num_of_strides; ++ __u32 two_byte_shift_en; + }; + + struct mlx5_create_wq { +diff --git a/providers/mlx5/mlx5dv.h b/providers/mlx5/mlx5dv.h +index 0a7fe4d6..0b9b00df 100644 +--- a/providers/mlx5/mlx5dv.h ++++ b/providers/mlx5/mlx5dv.h +@@ -197,6 +197,43 @@ enum mlx5dv_obj_type { + MLX5DV_OBJ_RWQ = 1 << 3, + }; + ++enum mlx5dv_wq_init_attr_mask { ++ MLX5DV_WQ_INIT_ATTR_MASK_STRIDING_RQ = 1 << 0, ++}; ++ ++struct mlx5dv_striding_rq_init_attr { ++ uint32_t single_stride_log_num_of_bytes; ++ uint32_t single_wqe_log_num_of_strides; ++ uint8_t two_byte_shift_en; ++}; ++ ++struct mlx5dv_wq_init_attr { ++ uint64_t comp_mask; /* Use enum mlx5dv_wq_init_attr_mask */ ++ struct mlx5dv_striding_rq_init_attr striding_rq_attrs; ++}; ++ ++/* ++ * This function creates a work queue object with extra properties ++ * defined by mlx5dv_wq_init_attr struct. ++ * ++ * For each bit in the comp_mask, a field in mlx5dv_wq_init_attr ++ * should follow. ++ * ++ * MLX5DV_WQ_INIT_ATTR_MASK_STRIDING_RQ: Create a work queue with ++ * striding RQ capabilities. ++ * - single_stride_log_num_of_bytes represents the size of each stride in the ++ * WQE and its value should be between min_single_stride_log_num_of_bytes ++ * and max_single_stride_log_num_of_bytes that are reported in ++ * mlx5dv_query_device. ++ * - single_wqe_log_num_of_strides represents the number of strides in each WQE. ++ * Its value should be between min_single_wqe_log_num_of_strides and ++ * max_single_wqe_log_num_of_strides that are reported in mlx5dv_query_device. ++ * - two_byte_shift_en: When enabled, hardware pads 2 bytes of zeroes ++ * before writing the message to memory (e.g. for IP alignment) ++ */ ++struct ibv_wq *mlx5dv_create_wq(struct ibv_context *context, ++ struct ibv_wq_init_attr *wq_init_attr, ++ struct mlx5dv_wq_init_attr *mlx5_wq_attr); + /* + * This function will initialize mlx5dv_xxx structs based on supplied type. + * The information for initialization is taken from ibv_xx structs supplied +@@ -302,7 +339,9 @@ struct mlx5_err_cqe { + }; + + struct mlx5_cqe64 { +- uint8_t rsvd0[17]; ++ uint8_t rsvd0[2]; ++ __be16 wqe_id; ++ uint8_t rsvd4[13]; + uint8_t ml_path; + uint8_t rsvd20[4]; + __be16 slid; +@@ -412,6 +451,11 @@ struct mlx5_wqe_ctrl_seg { + __be32 imm; + }; + ++struct mlx5_mprq_wqe { ++ struct mlx5_wqe_srq_next_seg nseg; ++ struct mlx5_wqe_data_seg dseg; ++}; ++ + struct mlx5_wqe_av { + union { + struct { +diff --git a/providers/mlx5/verbs.c b/providers/mlx5/verbs.c +index e9414c64..15c0d4ed 100644 +--- a/providers/mlx5/verbs.c ++++ b/providers/mlx5/verbs.c +@@ -919,21 +919,36 @@ static int mlx5_calc_sq_size(struct mlx5_context *ctx, + return wq_size; + } + ++enum { ++ DV_CREATE_WQ_SUPPORTED_COMP_MASK = MLX5DV_WQ_INIT_ATTR_MASK_STRIDING_RQ ++}; ++ + static int mlx5_calc_rwq_size(struct mlx5_context *ctx, + struct mlx5_rwq *rwq, +- struct ibv_wq_init_attr *attr) ++ struct ibv_wq_init_attr *attr, ++ struct mlx5dv_wq_init_attr *mlx5wq_attr) + { + size_t wqe_size; + int wq_size; + uint32_t num_scatter; ++ int is_mprq = 0; + int scat_spc; + + if (!attr->max_wr) + return -EINVAL; ++ if (mlx5wq_attr) { ++ if (!check_comp_mask(mlx5wq_attr->comp_mask, ++ DV_CREATE_WQ_SUPPORTED_COMP_MASK)) ++ return -EINVAL; ++ ++ is_mprq = !!(mlx5wq_attr->comp_mask & ++ MLX5DV_WQ_INIT_ATTR_MASK_STRIDING_RQ); ++ } + + /* TBD: check caps for RQ */ + num_scatter = max_t(uint32_t, attr->max_sge, 1); +- wqe_size = sizeof(struct mlx5_wqe_data_seg) * num_scatter; ++ wqe_size = sizeof(struct mlx5_wqe_data_seg) * num_scatter + ++ sizeof(struct mlx5_wqe_srq_next_seg) * is_mprq; + + if (rwq->wq_sig) + wqe_size += sizeof(struct mlx5_rwqe_sig); +@@ -948,7 +963,8 @@ static int mlx5_calc_rwq_size(struct mlx5_context *ctx, + rwq->rq.wqe_shift = mlx5_ilog2(wqe_size); + rwq->rq.max_post = 1 << mlx5_ilog2(wq_size / wqe_size); + scat_spc = wqe_size - +- ((rwq->wq_sig) ? sizeof(struct mlx5_rwqe_sig) : 0); ++ ((rwq->wq_sig) ? sizeof(struct mlx5_rwqe_sig) : 0) - ++ is_mprq * sizeof(struct mlx5_wqe_srq_next_seg); + rwq->rq.max_gs = scat_spc / sizeof(struct mlx5_wqe_data_seg); + return wq_size; + } +@@ -2066,8 +2082,9 @@ static int mlx5_alloc_rwq_buf(struct ibv_context *context, + return 0; + } + +-struct ibv_wq *mlx5_create_wq(struct ibv_context *context, +- struct ibv_wq_init_attr *attr) ++static struct ibv_wq *create_wq(struct ibv_context *context, ++ struct ibv_wq_init_attr *attr, ++ struct mlx5dv_wq_init_attr *mlx5wq_attr) + { + struct mlx5_create_wq cmd; + struct mlx5_create_wq_resp resp; +@@ -2092,7 +2109,7 @@ struct ibv_wq *mlx5_create_wq(struct ibv_context *context, + if (rwq->wq_sig) + cmd.drv.flags = MLX5_RWQ_FLAG_SIGNATURE; + +- ret = mlx5_calc_rwq_size(ctx, rwq, attr); ++ ret = mlx5_calc_rwq_size(ctx, rwq, attr, mlx5wq_attr); + if (ret < 0) { + errno = -ret; + goto err; +@@ -2126,6 +2143,35 @@ struct ibv_wq *mlx5_create_wq(struct ibv_context *context, + } + + cmd.drv.user_index = usr_idx; ++ ++ if (mlx5wq_attr) { ++ if (mlx5wq_attr->comp_mask & MLX5DV_WQ_INIT_ATTR_MASK_STRIDING_RQ) { ++ if ((mlx5wq_attr->striding_rq_attrs.single_stride_log_num_of_bytes < ++ ctx->striding_rq_caps.min_single_stride_log_num_of_bytes) || ++ (mlx5wq_attr->striding_rq_attrs.single_stride_log_num_of_bytes > ++ ctx->striding_rq_caps.max_single_stride_log_num_of_bytes)) { ++ errno = EINVAL; ++ goto err_create; ++ } ++ ++ if ((mlx5wq_attr->striding_rq_attrs.single_wqe_log_num_of_strides < ++ ctx->striding_rq_caps.min_single_wqe_log_num_of_strides) || ++ (mlx5wq_attr->striding_rq_attrs.single_wqe_log_num_of_strides > ++ ctx->striding_rq_caps.max_single_wqe_log_num_of_strides)) { ++ errno = EINVAL; ++ goto err_create; ++ } ++ ++ cmd.drv.single_stride_log_num_of_bytes = ++ mlx5wq_attr->striding_rq_attrs.single_stride_log_num_of_bytes; ++ cmd.drv.single_wqe_log_num_of_strides = ++ mlx5wq_attr->striding_rq_attrs.single_wqe_log_num_of_strides; ++ cmd.drv.two_byte_shift_en = ++ mlx5wq_attr->striding_rq_attrs.two_byte_shift_en; ++ cmd.drv.comp_mask |= MLX5_IB_CREATE_WQ_STRIDING_RQ; ++ } ++ } ++ + err = ibv_cmd_create_wq(context, attr, &rwq->wq, &cmd.ibv_cmd, + sizeof(cmd.ibv_cmd), + sizeof(cmd), +@@ -2151,6 +2197,19 @@ err: + return NULL; + } + ++struct ibv_wq *mlx5_create_wq(struct ibv_context *context, ++ struct ibv_wq_init_attr *attr) ++{ ++ return create_wq(context, attr, NULL); ++} ++ ++struct ibv_wq *mlx5dv_create_wq(struct ibv_context *context, ++ struct ibv_wq_init_attr *attr, ++ struct mlx5dv_wq_init_attr *mlx5_wq_attr) ++{ ++ return create_wq(context, attr, mlx5_wq_attr); ++} ++ + int mlx5_modify_wq(struct ibv_wq *wq, struct ibv_wq_attr *attr) + { + struct mlx5_modify_wq cmd = {}; +-- +2.12.1 + diff --git a/SOURCES/0003-srp_daemon-Use-consistent-format-when-printing-LID.patch b/SOURCES/0003-srp_daemon-Use-consistent-format-when-printing-LID.patch deleted file mode 100644 index e7d8175..0000000 --- a/SOURCES/0003-srp_daemon-Use-consistent-format-when-printing-LID.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 043b3900b51e73beedc6cd3769e055a5a95a26b3 Mon Sep 17 00:00:00 2001 -From: Hal Rosenstock -Date: Thu, 13 Apr 2017 11:54:30 -0400 -Subject: [PATCH 3/3] srp_daemon: Use consistent format when printing LID - -Some LIDs are formatted in hex and others in decimal. -Be consistent (use hex LID formatting). - -Signed-off-by: Hal Rosenstock ---- - srp_daemon/srp_daemon.c | 14 +++++++------- - srp_daemon/srp_handle_traps.c | 4 ++-- - srp_daemon/srp_sync.c | 2 +- - 3 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c -index 1cf2815..bafc4a6 100644 ---- a/srp_daemon/srp_daemon.c -+++ b/srp_daemon/srp_daemon.c -@@ -632,8 +632,8 @@ recv: - ret = umad_status(in_mad); - if (ret) { - pr_err( -- "bad MAD status (%u) from lid %d\n", -- ret, (uint16_t) be16toh(out_mad->hdr.addr.lid)); -+ "bad MAD status (%u) from lid %#x\n", -+ ret, be16toh(out_mad->hdr.addr.lid)); - return -ret; - } - -@@ -935,7 +935,7 @@ static int do_port(struct resources *res, uint16_t pkey, uint16_t dlid, - - ret = get_iou_info(umad_res, dlid, &iou_info); - if (ret < 0) { -- pr_err("failed to get iou info for dlid %x\n", dlid); -+ pr_err("failed to get iou info for dlid %#x\n", dlid); - goto out; - } - -@@ -1214,7 +1214,7 @@ static int do_dm_port_list(struct resources *res) - num_pkeys = get_shared_pkeys(res, be16toh(port_info->endport_lid), - pkeys); - if (num_pkeys < 0) { -- pr_err("failed to get shared P_Keys with LID %x\n", -+ pr_err("failed to get shared P_Keys with LID %#x\n", - be16toh(port_info->endport_lid)); - free(in_mad_buf); - return num_pkeys; -@@ -1235,7 +1235,7 @@ void handle_port(struct resources *res, uint16_t pkey, uint16_t lid, uint64_t h_ - uint64_t subnet_prefix; - int isdm; - -- pr_debug("enter handle_port for lid %d\n", lid); -+ pr_debug("enter handle_port for lid %#x\n", lid); - if (get_port_info(umad_res, lid, &subnet_prefix, &isdm)) - return; - -@@ -1292,7 +1292,7 @@ static int do_full_port_list(struct resources *res) - num_pkeys = get_shared_pkeys(res, be16toh(node->lid), - pkeys); - if (num_pkeys < 0) { -- pr_err("failed to get shared P_Keys with LID %x\n", -+ pr_err("failed to get shared P_Keys with LID %#x\n", - be16toh(node->lid)); - free(in_mad_buf); - return num_pkeys; -@@ -2180,7 +2180,7 @@ catas_start: - /* unexpected error - do a full rescan */ - schedule_rescan(res->sync_res, 0); - else { -- pr_debug("lid is %d\n", lid); -+ pr_debug("lid is %#x\n", lid); - - srp_sleep(0, 100); - handle_port(res, pkey, lid, -diff --git a/srp_daemon/srp_handle_traps.c b/srp_daemon/srp_handle_traps.c -index 4d03c08..f4280ad 100644 ---- a/srp_daemon/srp_handle_traps.c -+++ b/srp_daemon/srp_handle_traps.c -@@ -559,9 +559,9 @@ static int register_to_trap(struct sync_resources *sync_res, - static uint64_t trans_id = 0x0000FFFF; - - if (subscribe) -- pr_debug("Registering to trap:%d (sm in %d)\n", trap_num, dest_lid); -+ pr_debug("Registering to trap:%d (sm in %#x)\n", trap_num, dest_lid); - else -- pr_debug("Deregistering from trap:%d (sm in %d)\n", trap_num, dest_lid); -+ pr_debug("Deregistering from trap:%d (sm in %#x)\n", trap_num, dest_lid); - - memset(res->send_buf, 0, SEND_SIZE); - -diff --git a/srp_daemon/srp_sync.c b/srp_daemon/srp_sync.c -index 369cf70..44826f0 100644 ---- a/srp_daemon/srp_sync.c -+++ b/srp_daemon/srp_sync.c -@@ -170,7 +170,7 @@ void push_lid_to_list(struct sync_resources *res, uint16_t lid, uint16_t pkey) - - for (i=0; i < res->next_task; ++i) - if (res->tasks[i].lid == lid && res->tasks[i].pkey == pkey) { -- pr_debug("lid %d is already in task list\n", lid); -+ pr_debug("lid %#x is already in task list\n", lid); - pthread_mutex_unlock(&res->mutex); - return; - } --- -1.8.3.1 - diff --git a/SOURCES/0004-ibverbs-Add-an-option-to-poll-cvlan-value-from-a-CQ.patch b/SOURCES/0004-ibverbs-Add-an-option-to-poll-cvlan-value-from-a-CQ.patch deleted file mode 100644 index 753e13a..0000000 --- a/SOURCES/0004-ibverbs-Add-an-option-to-poll-cvlan-value-from-a-CQ.patch +++ /dev/null @@ -1,111 +0,0 @@ -From a475fe442c97ad5b2c9c761805d89d4774046807 Mon Sep 17 00:00:00 2001 -From: Noa Osherovich -Date: Mon, 28 Nov 2016 12:01:37 +0200 -Subject: [PATCH rdma-core 4/6] ibverbs: Add an option to poll cvlan value from - a CQ - -When a WQ or a QP is created with cvlan stripping option, it is -stripped from the incoming packet and included in the work -completion. -Extend the poll_cq_ex mechanism with a function that reads the -stripped cvlan value from the work completion. - -In addition, as a part of introcuding the new functionality in the -man page, align it with current code (typo fix, add a missing field). - -Signed-off-by: Noa Osherovich -Reviewed-by: Maor Gottlieb -Reviewed-by: Yishai Hadas ---- - libibverbs/man/ibv_create_cq_ex.3 | 9 +++++++-- - libibverbs/verbs.h | 10 +++++++++- - 2 files changed, 16 insertions(+), 3 deletions(-) - -diff --git a/libibverbs/man/ibv_create_cq_ex.3 b/libibverbs/man/ibv_create_cq_ex.3 -index a6ae7690..020bbb4e 100644 ---- a/libibverbs/man/ibv_create_cq_ex.3 -+++ b/libibverbs/man/ibv_create_cq_ex.3 -@@ -17,10 +17,10 @@ creates a completion queue (CQ) for RDMA device context - .I context\fR. - The argument - .I cq_attr --is a pointer to struct ibv_create_cq_attr_ex as defined in . -+is a pointer to struct ibv_cq_init_attr_ex as defined in . - .PP - .nf --struct ibv_create_cq_attr_ex { -+struct ibv_cq_init_attr_ex { - .in +8 - int cqe; /* Minimum number of entries required for CQ */ - void *cq_context; /* Consumer-supplied context returned for completion events */ -@@ -28,6 +28,7 @@ struct ibv_comp_channel *channel; /* Completion channel where completio - int comp_vector; /* Completion vector used to signal completion events. Must be >= 0 and < context->num_comp_vectors. */ - uint64_t wc_flags; /* The wc_flags that should be returned in ibv_poll_cq_ex. Or'ed bit of enum ibv_wc_flags_ex. */ - uint32_t comp_mask; /* compatibility mask (extended verb). */ -+uint32_t flags /* One or more flags from enum ibv_create_cq_attr_flags */ - .in -8 - }; - -@@ -40,6 +41,7 @@ enum ibv_wc_flags_ex { - IBV_WC_EX_WITH_SL = 1 << 5, /* Require sl in WC */ - IBV_WC_EX_WITH_DLID_PATH_BITS = 1 << 6, /* Require dlid path bits in WC */ - IBV_WC_EX_WITH_COMPLETION_TIMESTAMP = 1 << 7, /* Require completion timestamp in WC /* -+ IBV_WC_EX_WITH_CVLAN = 1 << 8, /* Require VLAN info in WC */ - }; - - enum ibv_cq_init_attr_mask { -@@ -128,6 +130,9 @@ Below members and functions are used in order to poll the current completion. Th - .BI "uint64_t ibv_wc_read_completion_ts(struct ibv_cq_ex " "*cq"); \c - Get the completion timestamp from the current completion. - -+.BI "uint16_t ibv_wc_read_cvlan(struct ibv_cq_ex " "*cq"); \c -+ Get the CVLAN field from the current completion. -+ - .SH "RETURN VALUE" - .B ibv_create_cq_ex() - returns a pointer to the CQ, or NULL if the request fails. -diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h -index c9084ea1..15e93b3e 100644 ---- a/libibverbs/verbs.h -+++ b/libibverbs/verbs.h -@@ -435,6 +435,7 @@ enum ibv_create_cq_wc_flags { - IBV_WC_EX_WITH_SL = 1 << 5, - IBV_WC_EX_WITH_DLID_PATH_BITS = 1 << 6, - IBV_WC_EX_WITH_COMPLETION_TIMESTAMP = 1 << 7, -+ IBV_WC_EX_WITH_CVLAN = 1 << 8, - }; - - enum { -@@ -449,7 +450,8 @@ enum { - - enum { - IBV_CREATE_CQ_SUP_WC_FLAGS = IBV_WC_STANDARD_FLAGS | -- IBV_WC_EX_WITH_COMPLETION_TIMESTAMP -+ IBV_WC_EX_WITH_COMPLETION_TIMESTAMP | -+ IBV_WC_EX_WITH_CVLAN - }; - - enum ibv_wc_flags { -@@ -1092,6 +1094,7 @@ struct ibv_cq_ex { - uint8_t (*read_sl)(struct ibv_cq_ex *current); - uint8_t (*read_dlid_path_bits)(struct ibv_cq_ex *current); - uint64_t (*read_completion_ts)(struct ibv_cq_ex *current); -+ uint16_t (*read_cvlan)(struct ibv_cq_ex *current); - }; - - static inline struct ibv_cq *ibv_cq_ex_to_cq(struct ibv_cq_ex *cq) -@@ -1170,6 +1173,11 @@ static inline uint64_t ibv_wc_read_completion_ts(struct ibv_cq_ex *cq) - return cq->read_completion_ts(cq); - } - -+static inline uint16_t ibv_wc_read_cvlan(struct ibv_cq_ex *cq) -+{ -+ return cq->read_cvlan(cq); -+} -+ - static inline int ibv_post_wq_recv(struct ibv_wq *wq, - struct ibv_recv_wr *recv_wr, - struct ibv_recv_wr **bad_recv_wr) --- -2.12.1 - diff --git a/SOURCES/0005-mlx5-Add-read_cvlan-support.patch b/SOURCES/0005-mlx5-Add-read_cvlan-support.patch deleted file mode 100644 index 2e490c1..0000000 --- a/SOURCES/0005-mlx5-Add-read_cvlan-support.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 6a96ec1ce7af0cee4d4101bcf65a9b7c3fa01886 Mon Sep 17 00:00:00 2001 -From: Noa Osherovich -Date: Sun, 4 Dec 2016 11:18:17 +0200 -Subject: [PATCH rdma-core 5/6] mlx5: Add read_cvlan support - -When a WQ or a QP is created with cvlan stripping option, the cvlan -is stripped from the packet by the hardware and included in the work -completion. - -Implement ibv_cq_ex's member function read_cvlan to allow reading the -cvlan from the work completion. - -Signed-off-by: Noa Osherovich -Reviewed-by: Maor Gottlieb -Reviewed-by: Yishai Hadas ---- - providers/mlx5/cq.c | 9 +++++++++ - providers/mlx5/verbs.c | 3 ++- - 2 files changed, 11 insertions(+), 1 deletion(-) - -diff --git a/providers/mlx5/cq.c b/providers/mlx5/cq.c -index 4ecd4828..85d0c339 100644 ---- a/providers/mlx5/cq.c -+++ b/providers/mlx5/cq.c -@@ -1189,6 +1189,13 @@ static inline uint64_t mlx5_cq_read_wc_completion_ts(struct ibv_cq_ex *ibcq) - return be64toh(cq->cqe64->timestamp); - } - -+static inline uint16_t mlx5_cq_read_wc_cvlan(struct ibv_cq_ex *ibcq) -+{ -+ struct mlx5_cq *cq = to_mcq(ibv_cq_ex_to_cq(ibcq)); -+ -+ return be16toh(cq->cqe64->vlan_info); -+} -+ - #define BIT(i) (1UL << (i)) - - #define SINGLE_THREADED BIT(0) -@@ -1261,6 +1268,8 @@ void mlx5_cq_fill_pfns(struct mlx5_cq *cq, const struct ibv_cq_init_attr_ex *cq_ - cq->ibv_cq.read_dlid_path_bits = mlx5_cq_read_wc_dlid_path_bits; - if (cq_attr->wc_flags & IBV_WC_EX_WITH_COMPLETION_TIMESTAMP) - cq->ibv_cq.read_completion_ts = mlx5_cq_read_wc_completion_ts; -+ if (cq_attr->wc_flags & IBV_WC_EX_WITH_CVLAN) -+ cq->ibv_cq.read_cvlan = mlx5_cq_read_wc_cvlan; - } - - int mlx5_arm_cq(struct ibv_cq *ibvcq, int solicited) -diff --git a/providers/mlx5/verbs.c b/providers/mlx5/verbs.c -index 4d8f26ca..67f9748d 100644 ---- a/providers/mlx5/verbs.c -+++ b/providers/mlx5/verbs.c -@@ -327,7 +327,8 @@ static int qp_sig_enabled(void) - - enum { - CREATE_CQ_SUPPORTED_WC_FLAGS = IBV_WC_STANDARD_FLAGS | -- IBV_WC_EX_WITH_COMPLETION_TIMESTAMP -+ IBV_WC_EX_WITH_COMPLETION_TIMESTAMP | -+ IBV_WC_EX_WITH_CVLAN - }; - - enum { --- -2.12.1 - diff --git a/SOURCES/0006-ibverbs-Add-support-for-scatter-FCS-ability-in-WQ.patch b/SOURCES/0006-ibverbs-Add-support-for-scatter-FCS-ability-in-WQ.patch deleted file mode 100644 index dcf2a74..0000000 --- a/SOURCES/0006-ibverbs-Add-support-for-scatter-FCS-ability-in-WQ.patch +++ /dev/null @@ -1,60 +0,0 @@ -From b17bf50a8542a77be1fab3713f7bfc0e57a9787a Mon Sep 17 00:00:00 2001 -From: Noa Osherovich -Date: Mon, 5 Dec 2016 14:13:24 +0200 -Subject: [PATCH rdma-core 6/6] ibverbs: Add support for scatter FCS ability in - WQ - -Enable the user to create a workqueue object with the scatter FCS -offload. -If this option is set, the FCS (Frame Check Sequence) field of an -incoming raw Ethernet packet will be scattered into host memory along -the packet payload as it appeared on the wire. - -Signed-off-by: Noa Osherovich -Reviewed-by: Majd Dibbiny -Reviewed-by: Yishai Hadas ---- - libibverbs/man/ibv_create_wq.3 | 3 ++- - libibverbs/verbs.h | 5 +++-- - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/libibverbs/man/ibv_create_wq.3 b/libibverbs/man/ibv_create_wq.3 -index 9a541fea..4a8b83c5 100644 ---- a/libibverbs/man/ibv_create_wq.3 -+++ b/libibverbs/man/ibv_create_wq.3 -@@ -40,7 +40,8 @@ uint32_t create_flags /* Creation flags for this WQ, use en - enum ibv_wq_flags { - .in +8 - IBV_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0, /* CVLAN field will be stripped from incoming packets */ --IBV_WQ_FLAGS_RESERVED = 1 << 1, -+IBV_WQ_FLAGS_SCATTER_FCS = 1 << 1, /* FCS field will be scattered to host memory */ -+IBV_WQ_FLAGS_RESERVED = 1 << 2, - .in -8 - }; - .nf -diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h -index 15e93b3e..3f5e9fe3 100644 ---- a/libibverbs/verbs.h -+++ b/libibverbs/verbs.h -@@ -675,7 +675,8 @@ enum ibv_wq_init_attr_mask { - - enum ibv_wq_flags { - IBV_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0, -- IBV_WQ_FLAGS_RESERVED = 1 << 1, -+ IBV_WQ_FLAGS_SCATTER_FCS = 1 << 1, -+ IBV_WQ_FLAGS_RESERVED = 1 << 2, - }; - - struct ibv_wq_init_attr { -@@ -685,7 +686,7 @@ struct ibv_wq_init_attr { - uint32_t max_sge; - struct ibv_pd *pd; - struct ibv_cq *cq; -- uint32_t comp_mask; -+ uint32_t comp_mask; /* Use ibv_wq_init_attr_mask */ - uint32_t create_flags; /* use ibv_wq_flags */ - }; - --- -2.12.1 - diff --git a/SOURCES/fix-udma_to_device_barrier-on-aarch64.patch b/SOURCES/fix-udma_to_device_barrier-on-aarch64.patch deleted file mode 100644 index 482810e..0000000 --- a/SOURCES/fix-udma_to_device_barrier-on-aarch64.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1b563ec1fef7b8a2740e1ee74b9f025c417f7e23 Mon Sep 17 00:00:00 2001 -From: Jarod Wilson -Date: Wed, 22 Mar 2017 21:30:31 -0400 -Subject: [PATCH rdma-core] fix udma_to_device_barrier on aarch64 - -The definition for udma_to_device_barrier on aarch64 is missing. Looks -like an oversight in the commit that removed the old barrier macros and -added this one. - -Fixes: 85a5529dead5 ("Remove the old barrier macros") -CC: Jason Gunthorpe -Signed-off-by: Jarod Wilson ---- - util/udma_barrier.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/util/udma_barrier.h b/util/udma_barrier.h -index 86578af5..9932a687 100644 ---- a/util/udma_barrier.h -+++ b/util/udma_barrier.h -@@ -93,7 +93,7 @@ - #elif defined(__sparc_v9__) - #define udma_to_device_barrier() asm volatile("membar #StoreStore" ::: "memory") - #elif defined(__aarch64__) --#define wmb() asm volatile("dsb st" ::: "memory"); -+#define udma_to_device_barrier() asm volatile("dsb st" ::: "memory"); - #elif defined(__sparc__) || defined(__s390x__) - #define udma_to_device_barrier() asm volatile("" ::: "memory") - #else --- -2.11.0 - diff --git a/SOURCES/libbnxt_re_fix_lat_test_failure_in_event_mode.patch b/SOURCES/libbnxt_re_fix_lat_test_failure_in_event_mode.patch new file mode 100644 index 0000000..84e5e59 --- /dev/null +++ b/SOURCES/libbnxt_re_fix_lat_test_failure_in_event_mode.patch @@ -0,0 +1,73 @@ +commit 0b72e02a1fee3e383fad0aa2e7e5cf8c6a06c6bf +Author: Devesh Sharma +Date: Wed Jan 31 01:28:53 2018 -0500 + + libbnxt_re: Fix lat test failure in event mode + + The application assumes that, when CQ is armed, it gives interrupt + for the new CQEs generated and not for the existing CQEs. This is + in-line with the IB-Spec. However, Broadcom HW generates an interrupt + for any unread CQEs not just new ones. This results in a scenario + where the application is expecting a completion for a SEND operation + but it receives a completion for a prior incoming-send/RQE that was + not yet consumed as per the HW thereby leading to failure. + Workaround this by deferring the ARM-ing of the CQ when invoked in + the notify_cq hook to 'poll_cq' so that the CQ is armed after all + completions are consumed. + + Signed-off-by: Devesh Sharma + Signed-off-by: Somnath Kotur + Signed-off-by: Selvin Xavier + +diff --git a/providers/bnxt_re/main.h b/providers/bnxt_re/main.h +index affe24f0..08aa277d 100644 +--- a/providers/bnxt_re/main.h ++++ b/providers/bnxt_re/main.h +@@ -76,6 +76,9 @@ struct bnxt_re_cq { + struct list_head rfhead; + uint32_t cqe_size; + uint8_t phase; ++ int deferred_arm_flags; ++ bool first_arm; ++ bool deferred_arm; + }; + + struct bnxt_re_srq { +diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c +index 09ac3335..2e88304c 100644 +--- a/providers/bnxt_re/verbs.c ++++ b/providers/bnxt_re/verbs.c +@@ -202,6 +202,7 @@ struct ibv_cq *bnxt_re_create_cq(struct ibv_context *ibvctx, int ncqe, + cq->phase = resp.phase; + cq->cqq.tail = resp.tail; + cq->udpi = &cntx->udpi; ++ cq->first_arm = true; + + list_head_init(&cq->sfhead); + list_head_init(&cq->rfhead); +@@ -654,6 +655,11 @@ int bnxt_re_poll_cq(struct ibv_cq *ibvcq, int nwc, struct ibv_wc *wc) + + pthread_spin_lock(&cq->cqq.qlock); + dqed = bnxt_re_poll_one(cq, nwc, wc); ++ if (cq->deferred_arm) { ++ bnxt_re_ring_cq_arm_db(cq, cq->deferred_arm_flags); ++ cq->deferred_arm = false; ++ cq->deferred_arm_flags = 0; ++ } + pthread_spin_unlock(&cq->cqq.qlock); + /* Check if anything is there to flush. */ + pthread_spin_lock(&cntx->fqlock); +@@ -718,7 +724,12 @@ int bnxt_re_arm_cq(struct ibv_cq *ibvcq, int flags) + pthread_spin_lock(&cq->cqq.qlock); + flags = !flags ? BNXT_RE_QUE_TYPE_CQ_ARMALL : + BNXT_RE_QUE_TYPE_CQ_ARMSE; +- bnxt_re_ring_cq_arm_db(cq, flags); ++ if (cq->first_arm) { ++ bnxt_re_ring_cq_arm_db(cq, flags); ++ cq->first_arm = false; ++ } ++ cq->deferred_arm = true; ++ cq->deferred_arm_flags = flags; + pthread_spin_unlock(&cq->cqq.qlock); + + return 0; diff --git a/SOURCES/librdmacm-add-support-for-extended-join-mc.patch b/SOURCES/librdmacm-add-support-for-extended-join-mc.patch new file mode 100644 index 0000000..42ca0a1 --- /dev/null +++ b/SOURCES/librdmacm-add-support-for-extended-join-mc.patch @@ -0,0 +1,345 @@ +commit 3c1d25b8170b0c30d723b2bf89c390293dc4477c +Author: Jason Gunthorpe +Date: Fri Nov 17 11:59:13 2017 -0700 + + librdmacm: Add support for extended join multicast API + + Add support for specifying MC join flags. The following multicast join + flags will now be supported by librdmacm (as already defined in the join + flags in rdma_user_cm.h through the UAPI of the kernel). + + -Full Member: + The initiator creates the Multicast group (MCG) if it wasn't previously + created, can send Multicast messages to the group and receive messages + from the MCG. + + -Send Only Full Member: + The initiator creates the Multicast group (MCG) if it wasn't previously + created, can send Multicast messages but doesn't receive any messages + from the MCG (send-only). + + Tested-by: Christoph Lameter + Reviewed by: Hal Rosenstock + Signed-off-by: Alex Vesker + Signed-off-by: Christoph Lameter + Reviewed-by: Jason Gunthorpe + Signed-off-by: Jason Gunthorpe + +Index: rdma-core-15/debian/librdmacm-dev.install +=================================================================== +--- rdma-core-15.orig/debian/librdmacm-dev.install ++++ rdma-core-15/debian/librdmacm-dev.install +@@ -33,6 +33,7 @@ usr/share/man/man3/rdma_get_send_comp.3 + usr/share/man/man3/rdma_get_src_port.3 + usr/share/man/man3/rdma_getaddrinfo.3 + usr/share/man/man3/rdma_join_multicast.3 ++usr/share/man/man3/rdma_join_multicast_ex.3 + usr/share/man/man3/rdma_leave_multicast.3 + usr/share/man/man3/rdma_listen.3 + usr/share/man/man3/rdma_migrate_id.3 +Index: rdma-core-15/debian/librdmacm1.symbols +=================================================================== +--- rdma-core-15.orig/debian/librdmacm1.symbols ++++ rdma-core-15/debian/librdmacm1.symbols +@@ -1,5 +1,6 @@ + librdmacm.so.1 librdmacm1 #MINVER# + RDMACM_1.0@RDMACM_1.0 1.0.15 ++ RDMACM_1.1@RDMACM_1.1 16 + raccept@RDMACM_1.0 1.0.16 + rbind@RDMACM_1.0 1.0.16 + rclose@RDMACM_1.0 1.0.16 +@@ -31,6 +32,7 @@ librdmacm.so.1 librdmacm1 #MINVER# + rdma_get_src_port@RDMACM_1.0 1.0.19 + rdma_getaddrinfo@RDMACM_1.0 1.0.15 + rdma_join_multicast@RDMACM_1.0 1.0.15 ++ rdma_join_multicast_ex@RDMACM_1.1 16 + rdma_leave_multicast@RDMACM_1.0 1.0.15 + rdma_listen@RDMACM_1.0 1.0.15 + rdma_migrate_id@RDMACM_1.0 1.0.15 +Index: rdma-core-15/librdmacm/CMakeLists.txt +=================================================================== +--- rdma-core-15.orig/librdmacm/CMakeLists.txt ++++ rdma-core-15/librdmacm/CMakeLists.txt +@@ -10,7 +10,7 @@ publish_headers(infiniband + + rdma_library(rdmacm librdmacm.map + # See Documentation/versioning.md +- 1 1.0.${PACKAGE_VERSION} ++ 1 1.1.${PACKAGE_VERSION} + acm.c + addrinfo.c + cma.c +Index: rdma-core-15/librdmacm/cma.c +=================================================================== +--- rdma-core-15.orig/librdmacm/cma.c ++++ rdma-core-15/librdmacm/cma.c +@@ -114,6 +114,7 @@ struct cma_multicast { + uint32_t handle; + union ibv_gid mgid; + uint16_t mlid; ++ uint16_t join_flags; + struct sockaddr_storage addr; + }; + +@@ -1713,7 +1714,8 @@ int rdma_disconnect(struct rdma_cm_id *i + } + + static int rdma_join_multicast2(struct rdma_cm_id *id, struct sockaddr *addr, +- socklen_t addrlen, void *context) ++ socklen_t addrlen, uint16_t join_flags, ++ void *context) + { + struct ucma_abi_create_id_resp resp; + struct cma_id_private *id_priv; +@@ -1727,6 +1729,7 @@ static int rdma_join_multicast2(struct r + + mc->context = context; + mc->id_priv = id_priv; ++ mc->join_flags = join_flags; + memcpy(&mc->addr, addr, addrlen); + if (pthread_cond_init(&mc->cond, NULL)) { + ret = -1; +@@ -1746,7 +1749,7 @@ static int rdma_join_multicast2(struct r + memcpy(&cmd.addr, addr, addrlen); + cmd.addr_size = addrlen; + cmd.uid = (uintptr_t) mc; +- cmd.reserved = 0; ++ cmd.join_flags = join_flags; + + ret = write(id->channel->fd, &cmd, sizeof cmd); + if (ret != sizeof cmd) { +@@ -1784,6 +1787,30 @@ err1: + return ret; + } + ++int rdma_join_multicast_ex(struct rdma_cm_id *id, ++ struct rdma_cm_join_mc_attr_ex *mc_join_attr, ++ void *context) ++{ ++ int addrlen; ++ ++ if (mc_join_attr->comp_mask >= RDMA_CM_JOIN_MC_ATTR_RESERVED) ++ return ERR(ENOTSUP); ++ ++ if (!(mc_join_attr->comp_mask & RDMA_CM_JOIN_MC_ATTR_ADDRESS)) ++ return ERR(EINVAL); ++ ++ if (!(mc_join_attr->comp_mask & RDMA_CM_JOIN_MC_ATTR_JOIN_FLAGS) || ++ (mc_join_attr->join_flags >= RDMA_MC_JOIN_FLAG_RESERVED)) ++ return ERR(EINVAL); ++ ++ addrlen = ucma_addrlen(mc_join_attr->addr); ++ if (!addrlen) ++ return ERR(EINVAL); ++ ++ return rdma_join_multicast2(id, mc_join_attr->addr, addrlen, ++ mc_join_attr->join_flags, context); ++} ++ + int rdma_join_multicast(struct rdma_cm_id *id, struct sockaddr *addr, + void *context) + { +@@ -1793,7 +1820,8 @@ int rdma_join_multicast(struct rdma_cm_i + if (!addrlen) + return ERR(EINVAL); + +- return rdma_join_multicast2(id, addr, addrlen, context); ++ return rdma_join_multicast2(id, addr, addrlen, ++ RDMA_MC_JOIN_FLAG_FULLMEMBER, context); + } + + int rdma_leave_multicast(struct rdma_cm_id *id, struct sockaddr *addr) +@@ -1821,7 +1849,7 @@ int rdma_leave_multicast(struct rdma_cm_ + if (!mc) + return ERR(EADDRNOTAVAIL); + +- if (id->qp) ++ if (id->qp && (mc->join_flags != RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER)) + ibv_detach_mcast(id->qp, &mc->mgid, mc->mlid); + + CMA_INIT_CMD_RESP(&cmd, sizeof cmd, LEAVE_MCAST, &resp, sizeof resp); +@@ -2009,6 +2037,10 @@ static int ucma_process_join(struct cma_ + if (!evt->id_priv->id.qp) + return 0; + ++ /* Don't attach QP to multicast if joined as send only full member */ ++ if (evt->mc->join_flags == RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER) ++ return 0; ++ + return rdma_seterrno(ibv_attach_mcast(evt->id_priv->id.qp, + &evt->mc->mgid, evt->mc->mlid)); + } +Index: rdma-core-15/librdmacm/librdmacm.map +=================================================================== +--- rdma-core-15.orig/librdmacm/librdmacm.map ++++ rdma-core-15/librdmacm/librdmacm.map +@@ -71,3 +71,8 @@ RDMACM_1.0 { + rdma_create_qp_ex; + local: *; + }; ++ ++RDMACM_1.1 { ++ global: ++ rdma_join_multicast_ex; ++} RDMACM_1.0; +Index: rdma-core-15/librdmacm/man/CMakeLists.txt +=================================================================== +--- rdma-core-15.orig/librdmacm/man/CMakeLists.txt ++++ rdma-core-15/librdmacm/man/CMakeLists.txt +@@ -33,6 +33,7 @@ rdma_man_pages( + rdma_get_src_port.3 + rdma_getaddrinfo.3 + rdma_join_multicast.3 ++ rdma_join_multicast_ex.3 + rdma_leave_multicast.3 + rdma_listen.3 + rdma_migrate_id.3 +Index: rdma-core-15/librdmacm/man/rdma_join_multicast_ex.3 +=================================================================== +--- /dev/null ++++ rdma-core-15/librdmacm/man/rdma_join_multicast_ex.3 +@@ -0,0 +1,66 @@ ++.TH "RDMA_JOIN_MULTICAST_EX" 3 "2017-11-17" "librdmacm" "Librdmacm Programmer's Manual" librdmacm ++.SH NAME ++rdma_join_multicast_ex \- Joins a multicast group with extended options. ++.SH SYNOPSIS ++.B "#include " ++.P ++.B "int" rdma_join_multicast_ex ++.BI "(struct rdma_cm_id *" id "," ++.BI "struct rdma_cm_join_mc_attr_ex *" mc_join_attr "," ++.BI "void *" context ");" ++.SH ARGUMENTS ++.IP "id" 20 ++Communication identifier associated with the request. ++.IP "mc_join_attr" 20 ++Is an rdma_cm_join_mc_attr_ex struct, as defined in . ++.IP "context" 20 ++User-defined context associated with the join request. ++.SH "DESCRIPTION" ++Joins a multicast group (MCG) with extended options. ++Currently supporting MC join with a specified join flag. ++.P ++.nf ++struct rdma_cm_join_mc_attr_ex { ++.in +8 ++uint32_t comp_mask; /* Bitwise OR between "rdma_cm_join_mc_attr_mask" enum */ ++uint32_t join_flags; /* Use a single flag from "rdma_cm_mc_join_flags" enum */ ++struct sockaddr *addr; /* Multicast address identifying the group to join */ ++.in -8 ++}; ++.fi ++.P ++The supported join flags are: ++.P ++.B RDMA_MC_JOIN_FLAG_FULLMEMBER ++- Create multicast group, Send multicast messages to MCG, Receive multicast messages from MCG. ++.P ++.B RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER ++- Create multicast group, Send multicast messages to MCG, Don't receive multicast messages from MCG (send-only). ++.P ++Initiating a MC join as "Send Only Full Member" on InfiniBand requires SM support, otherwise joining will fail. ++.P ++Initiating a MC join as "Send Only Full Member" on RoCEv2/ETH will not send any IGMP messages unlike a Full Member MC join. ++When "Send Only Full Member" is used the QP will not be attached to the MCG. ++.P ++.SH "RETURN VALUE" ++Returns 0 on success, or -1 on error. If an error occurs, errno will be ++set to indicate the failure reason. ++.SH "NOTES" ++Before joining a multicast group, the rdma_cm_id must be bound to ++an RDMA device by calling rdma_bind_addr or rdma_resolve_addr. Use of ++rdma_resolve_addr requires the local routing tables to resolve the ++multicast address to an RDMA device, unless a specific source address ++is provided. The user must call rdma_leave_multicast to leave the ++multicast group and release any multicast resources. After the join ++operation completes, if a QP is associated with the rdma_cm_id, ++it is automatically attached to the multicast group when the multicast ++event is retrieved by the user. Otherwise, the user is responsible ++for calling ibv_attach_mcast to bind the QP to the multicast group. ++The join context is returned to the user through the private_data ++field in the rdma_cm_event. ++.SH "SEE ALSO" ++rdma_join_multicast(3), rdma_leave_multicast(3), rdma_bind_addr(3), rdma_resolve_addr(3), rdma_create_qp(3), ++rdma_get_cm_event(3) ++.SH "AUTHORS" ++.TP ++Alex Vesker +Index: rdma-core-15/librdmacm/rdma_cma.h +=================================================================== +--- rdma-core-15.orig/librdmacm/rdma_cma.h ++++ rdma-core-15/librdmacm/rdma_cma.h +@@ -197,6 +197,29 @@ struct rdma_addrinfo { + struct rdma_addrinfo *ai_next; + }; + ++/* Multicast join compatibility mask attributes */ ++enum rdma_cm_join_mc_attr_mask { ++ RDMA_CM_JOIN_MC_ATTR_ADDRESS = 1 << 0, ++ RDMA_CM_JOIN_MC_ATTR_JOIN_FLAGS = 1 << 1, ++ RDMA_CM_JOIN_MC_ATTR_RESERVED = 1 << 2, ++}; ++ ++/* Multicast join flags */ ++enum rdma_cm_mc_join_flags { ++ RDMA_MC_JOIN_FLAG_FULLMEMBER, ++ RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER, ++ RDMA_MC_JOIN_FLAG_RESERVED, ++}; ++ ++struct rdma_cm_join_mc_attr_ex { ++ /* Bitwise OR between "rdma_cm_join_mc_attr_mask" enum */ ++ uint32_t comp_mask; ++ /* Use a flag from "rdma_cm_mc_join_flags" enum */ ++ uint32_t join_flags; ++ /* Multicast address identifying the group to join */ ++ struct sockaddr *addr; ++}; ++ + /** + * rdma_create_event_channel - Open a channel used to report communication events. + * Description: +@@ -555,6 +578,30 @@ int rdma_join_multicast(struct rdma_cm_i + int rdma_leave_multicast(struct rdma_cm_id *id, struct sockaddr *addr); + + /** ++ * rdma_multicast_ex - Joins a multicast group with options. ++ * @id: Communication identifier associated with the request. ++ * @mc_join_attr: Extensive struct containing multicast join parameters. ++ * @context: User-defined context associated with the join request. ++ * Description: ++ * Joins a multicast group with options. Currently supporting MC join flags. ++ * The QP will be attached based on the given join flag. ++ * Join message will be sent according to the join flag. ++ * Notes: ++ * Before joining a multicast group, the rdma_cm_id must be bound to ++ * an RDMA device by calling rdma_bind_addr or rdma_resolve_addr. Use of ++ * rdma_resolve_addr requires the local routing tables to resolve the ++ * multicast address to an RDMA device. The user must call ++ * rdma_leave_multicast to leave the multicast group and release any ++ * multicast resources. The context is returned to the user through ++ * the private_data field in the rdma_cm_event. ++ * See also: ++ * rdma_leave_multicast, rdma_bind_addr, rdma_resolve_addr, rdma_create_qp ++ */ ++int rdma_join_multicast_ex(struct rdma_cm_id *id, ++ struct rdma_cm_join_mc_attr_ex *mc_join_attr, ++ void *context); ++ ++/** + * rdma_get_cm_event - Retrieves the next pending communication event. + * @channel: Event channel to check for events. + * @event: Allocated information about the next communication event. +Index: rdma-core-15/librdmacm/rdma_cma_abi.h +=================================================================== +--- rdma-core-15.orig/librdmacm/rdma_cma_abi.h ++++ rdma-core-15/librdmacm/rdma_cma_abi.h +@@ -302,7 +302,7 @@ struct ucma_abi_join_mcast { + __u64 uid; + __u32 id; + __u16 addr_size; +- __u16 reserved; ++ __u16 join_flags; + struct sockaddr_storage addr; + }; + diff --git a/SOURCES/librdmacm-mckey-test-support-for-send-only-full-member.patch b/SOURCES/librdmacm-mckey-test-support-for-send-only-full-member.patch new file mode 100644 index 0000000..218f3fc --- /dev/null +++ b/SOURCES/librdmacm-mckey-test-support-for-send-only-full-member.patch @@ -0,0 +1,96 @@ +commit 9db80df802bf9158c2d5a979175667babfce6506 +Author: Jason Gunthorpe +Date: Fri Nov 17 15:04:46 2017 -0700 + + librdmacm: mckey test support for send only full member + + Added a new flag (-o) to mckey which allows mckey to join the multicast + group as Send Only Full Member. + + Demonstrates the use of rdma_join_multicast_ex instead of + rdma_join_multicast. + + Signed-off-by: Alex Vesker + Signed-off-by: Christoph Lameter + Signed-off-by: Jason Gunthorpe + +diff --git a/librdmacm/examples/mckey.c b/librdmacm/examples/mckey.c +index 60cf8a24..7abb5246 100644 +--- a/librdmacm/examples/mckey.c ++++ b/librdmacm/examples/mckey.c +@@ -77,6 +77,7 @@ static int connections = 1; + static int message_size = 100; + static int message_count = 10; + static int is_sender; ++static int send_only; + static int unmapped_addr; + static char *dst_addr; + static char *src_addr; +@@ -241,6 +242,7 @@ static void connect_error(void) + static int addr_handler(struct cmatest_node *node) + { + int ret; ++ struct rdma_cm_join_mc_attr_ex mc_attr; + + ret = verify_test_params(node); + if (ret) +@@ -256,7 +258,14 @@ static int addr_handler(struct cmatest_node *node) + goto err; + } + +- ret = rdma_join_multicast(node->cma_id, test.dst_addr, node); ++ mc_attr.comp_mask = ++ RDMA_CM_JOIN_MC_ATTR_ADDRESS | RDMA_CM_JOIN_MC_ATTR_JOIN_FLAGS; ++ mc_attr.addr = test.dst_addr; ++ mc_attr.join_flags = send_only ? RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER ++ : RDMA_MC_JOIN_FLAG_FULLMEMBER; ++ ++ ret = rdma_join_multicast_ex(node->cma_id, &mc_attr, node); ++ + if (ret) { + perror("mckey: failure joining"); + goto err; +@@ -555,8 +564,7 @@ int main(int argc, char **argv) + { + int op, ret; + +- +- while ((op = getopt(argc, argv, "m:M:sb:c:C:S:p:")) != -1) { ++ while ((op = getopt(argc, argv, "m:M:sb:c:C:S:p:o")) != -1) { + switch (op) { + case 'm': + dst_addr = optarg; +@@ -584,6 +592,10 @@ int main(int argc, char **argv) + case 'p': + port_space = strtol(optarg, NULL, 0); + break; ++ case 'o': ++ send_only = 1; ++ break; ++ + default: + printf("usage: %s\n", argv[0]); + printf("\t-m multicast_address\n"); +@@ -596,6 +608,7 @@ int main(int argc, char **argv) + printf("\t[-S message_size]\n"); + printf("\t[-p port_space - %#x for UDP (default), " + "%#x for IPOIB]\n", RDMA_PS_UDP, RDMA_PS_IPOIB); ++ printf("\t[-o join as a send-only full-member]\n"); + exit(1); + } + } +diff --git a/librdmacm/man/mckey.1 b/librdmacm/man/mckey.1 +index a36f57ba..5e47ce5d 100644 +--- a/librdmacm/man/mckey.1 ++++ b/librdmacm/man/mckey.1 +@@ -41,6 +41,10 @@ The size of each message transferred, in bytes. This value must be smaller + than the MTU of the underlying RDMA transport, or an error will occur. + (default 100) + .TP ++\-o ++Join the multicast group as a send-only full-member. Otherwise the group is ++joined as a full-member. ++.TP + \-p port_space + The port space of the datagram communication. May be either the RDMA + UDP (0x0111) or IPoIB (0x0002) port space. (default RDMA_PS_UDP) diff --git a/SOURCES/mlx4-add-a-report-of-rss-cap.patch b/SOURCES/mlx4-add-a-report-of-rss-cap.patch new file mode 100644 index 0000000..3777d8d --- /dev/null +++ b/SOURCES/mlx4-add-a-report-of-rss-cap.patch @@ -0,0 +1,50 @@ +commit 22a04b26a8c1428b87b3cc35fd256ee615172648 +Author: Guy Levi +Date: Tue Oct 17 15:23:10 2017 +0300 + + mlx4: Add a report of RSS capabilities in ibv_query_device_ex + + Report few extra RSS capabilities that were missed in previous patches. + + Signed-off-by: Guy Levi + Reviewed-by: Yishai Hadas + +diff --git a/providers/mlx4/mlx4-abi.h b/providers/mlx4/mlx4-abi.h +index 4f2132c2..c4783d29 100644 +--- a/providers/mlx4/mlx4-abi.h ++++ b/providers/mlx4/mlx4-abi.h +@@ -99,13 +99,19 @@ struct mlx4_resize_cq { + __u64 buf_addr; + }; + ++struct mlx4_rss_caps { ++ __u64 rx_hash_fields_mask; /* enum ibv_rx_hash_fields */ ++ __u8 rx_hash_function; /* enum ibv_rx_hash_function_flags */ ++ __u8 reserved[7]; ++}; ++ + struct mlx4_query_device_ex_resp { + struct ibv_query_device_resp_ex ibv_resp; + __u32 comp_mask; + __u32 response_length; + __u64 hca_core_clock_offset; + __u32 max_inl_recv_sz; +- __u32 reserved; ++ struct mlx4_rss_caps rss_caps; /* vendor data channel */ + }; + + struct mlx4_query_device_ex { +diff --git a/providers/mlx4/verbs.c b/providers/mlx4/verbs.c +index 8532882e..8a2773f9 100644 +--- a/providers/mlx4/verbs.c ++++ b/providers/mlx4/verbs.c +@@ -87,6 +87,9 @@ int mlx4_query_device_ex(struct ibv_context *context, + if (err) + return err; + ++ attr->rss_caps.rx_hash_fields_mask = resp.rss_caps.rx_hash_fields_mask; ++ attr->rss_caps.rx_hash_function = resp.rss_caps.rx_hash_function; ++ + if (resp.comp_mask & MLX4_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET) { + mctx->core_clock.offset = resp.hca_core_clock_offset; + mctx->core_clock.offset_valid = 1; diff --git a/SPECS/rdma-core.spec b/SPECS/rdma-core.spec index 845be9f..180e37d 100644 --- a/SPECS/rdma-core.spec +++ b/SPECS/rdma-core.spec @@ -1,6 +1,6 @@ Name: rdma-core -Version: 13 -Release: 7%{?dist} +Version: 15 +Release: 6%{?dist} Summary: RDMA core userspace libraries and daemons # Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license @@ -9,21 +9,22 @@ Summary: RDMA core userspace libraries and daemons # providers/hfi1verbs Uses the 3 Clause BSD license License: GPLv2 or BSD Url: https://github.com/linux-rdma/rdma-core -Source: https://github.com/linux-rdma/rdma-core/archive/%{name}-%{version}.tar.gz +Source: https://github.com/linux-rdma/rdma-core/releases/download/v%{version}/%{name}-%{version}.tar.gz Patch1: redhat-kernel-init-ocrdma-is-tech-preview.patch Patch2: redhat-kernel-init-libi40iw-no-longer-tech-preview.patch -Patch3: fix-udma_to_device_barrier-on-aarch64.patch -Patch4: 0001-srp_daemon-srp_daemon.c-Don-t-rely-on-attribute-offs.patch -Patch5: 0002-srp_daemon-srp_daemon.c-Eliminate-some-unneeded-code.patch -Patch6: 0003-srp_daemon-Use-consistent-format-when-printing-LID.patch -Patch7: 0001-Use-integer-as-getopt_long-returns-integer.patch -Patch8: 0001-libibumad-clean-up-htonll-ntohnll-handling.patch -Patch9: 0001-ibverbs-Report-raw-packet-caps-as-part-of-query-devi.patch -Patch10: 0002-ibverbs-Allow-creation-and-modification-of-WQ-with-c.patch -Patch11: 0003-ibverbs-Allow-creation-of-QP-with-cvlan-stripping-of.patch -Patch12: 0004-ibverbs-Add-an-option-to-poll-cvlan-value-from-a-CQ.patch -Patch13: 0005-mlx5-Add-read_cvlan-support.patch -Patch14: 0006-ibverbs-Add-support-for-scatter-FCS-ability-in-WQ.patch +Patch3: 0001-ibacm-incorrect-usage-of-be-byte.patch +Patch4: 0002-ibacm-incorrect-list-used-for.patch +Patch5: 0001-srp_daemon-Don-t-create-async_ev_thread-if-only-run-.patch +Patch6: 0001-srp_daemon-Remove-unsupported-systemd-configurations.patch +Patch7: 0001-srp_daemon-srp_daemon.service-should-be-started-afte.patch +Patch8: librdmacm-add-support-for-extended-join-mc.patch +Patch9: librdmacm-mckey-test-support-for-send-only-full-member.patch +Patch10: 0001-Add-a-helper-function-to-verify-64-bit-comp-mask.patch +Patch11: 0002-mlx5-Report-Multi-Packet-RQ-capabilities-through-mlx.patch +Patch12: 0003-mlx5-Allow-creation-of-a-Multi-Packet-RQ-using-direc.patch +Patch13: mlx4-add-a-report-of-rss-cap.patch +Patch14: 0001-iwpmd-fix-double-mutex-unlock.patch +Patch15: libbnxt_re_fix_lat_test_failure_in_event_mode.patch BuildRequires: binutils BuildRequires: cmake >= 2.8.11 @@ -127,8 +128,6 @@ RDMA core development libraries and headers. %package -n libibverbs Summary: A library and drivers for direct userspace use of RDMA (InfiniBand/iWARP/RoCE) hardware -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig Requires: %{name}%{?_isa} = %{version}-%{release} Provides: libcxgb3 = %{version}-%{release} Obsoletes: libcxgb3 < %{version}-%{release} @@ -142,7 +141,7 @@ Provides: libipathverbs = %{version}-%{release} Obsoletes: libipathverbs < %{version}-%{release} Provides: libmlx4 = %{version}-%{release} Obsoletes: libmlx4 < %{version}-%{release} -%ifnarch s390x s390 +%ifnarch s390 Provides: libmlx5 = %{version}-%{release} Obsoletes: libmlx5 < %{version}-%{release} %endif @@ -154,6 +153,8 @@ Provides: libocrdma = %{version}-%{release} Obsoletes: libocrdma < %{version}-%{release} Provides: librxe = %{version}-%{release} Obsoletes: librxe < %{version}-%{release} +Provides: libusnic_verbs = %{version}-%{release} +Obsoletes: libusnic_verbs < %{version}-%{release} %description -n libibverbs libibverbs is a library that allows userspace processes to use RDMA @@ -164,9 +165,11 @@ fast path operations. Device-specific plug-in ibverbs userspace drivers are included: +- libbxnt_re: Broadcom NetXtreme-E RoCE HCA - libcxgb3: Chelsio T3 iWARP HCA - libcxgb4: Chelsio T4 iWARP HCA - libhfi1: Intel Omni-Path HFI +- libhns: HiSilicon Hip06 SoC - libi40iw: Intel Ethernet Connection X722 RDMA - libipathverbs: QLogic InfiniPath HCA - libmlx4: Mellanox ConnectX-3 InfiniBand HCA @@ -174,7 +177,9 @@ Device-specific plug-in ibverbs userspace drivers are included: - libmthca: Mellanox InfiniBand HCA - libnes: NetEffect RNIC - libocrdma: Emulex OneConnect RDMA/RoCE Device +- libqedr: QLogic QL4xxx RoCE HCA - librxe: A software implementation of the RoCE protocol +- libvmw_pvrdma: VMware paravirtual RDMA device %package -n libibverbs-utils Summary: Examples for the libibverbs library @@ -280,6 +285,7 @@ discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand. %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 %build @@ -329,16 +335,11 @@ install -D -m0644 redhat/rdma.mlx4.conf %{buildroot}/%{_sysconfdir}/rdma/mlx4.co install -D -m0755 redhat/rdma.ifup-ib %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts/ifup-ib install -D -m0755 redhat/rdma.ifdown-ib %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts/ifdown-ib install -D -m0644 redhat/rdma.service %{buildroot}%{_unitdir}/rdma.service -install -D -m0644 redhat/rdma.udev-ipoib-naming.rules %{buildroot}%{_sysconfdir}/udev/rules.d/70-persistent-ipoib.rules -install -D -m0644 redhat/rdma.mlx4.user.modprobe %{buildroot}%{_sysconfdir}/modprobe.d/mlx4.conf install -D -m0755 redhat/rdma.modules-setup.sh %{buildroot}%{dracutlibdir}/modules.d/05rdma/module-setup.sh install -D -m0644 redhat/rdma.udev-rules %{buildroot}%{_udevrulesdir}/98-rdma.rules install -D -m0644 redhat/rdma.mlx4.sys.modprobe %{buildroot}%{sysmodprobedir}/libmlx4.conf -install -D -m0644 redhat/rdma.cxgb3.sys.modprobe %{buildroot}%{sysmodprobedir}/cxgb3.conf -install -D -m0644 redhat/rdma.cxgb4.sys.modprobe %{buildroot}%{sysmodprobedir}/cxgb4.conf install -D -m0755 redhat/rdma.kernel-init %{buildroot}%{_libexecdir}/rdma-init-kernel install -D -m0755 redhat/rdma.sriov-init %{buildroot}%{_libexecdir}/rdma-set-sriov-vf -install -D -m0644 redhat/rdma.fixup-mtrr.awk %{buildroot}%{_libexecdir}/rdma-fixup-mtrr.awk install -D -m0755 redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setup.sh # ibacm @@ -347,20 +348,10 @@ bin/ib_acme -D . -O sed -i -e 's|%{_libdir}|/usr/lib|' %{buildroot}%{_mandir}/man7/ibacm_prov.7 sed -i -e 's|%{_libdir}|/usr/lib|' ibacm_opts.cfg install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/ -install -D -m0644 redhat/ibacm.service %{buildroot}%{_unitdir}/ - -# srp_daemon -install -D -m0644 redhat/srp_daemon.service %{buildroot}%{_unitdir}/ # Delete the package's init.d scripts rm -rf %{buildroot}/%{_initrddir}/ -# Remove ibverbs provider libs we don't (yet?) support -rm -f %{buildroot}/%{_libdir}/libibverbs/libvmw_pvrdma-rdmav2.so -rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/vmw_pvrdma.driver -rm -f %{buildroot}/%{_libdir}/libibverbs/libhns-rdmav2.so -rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/hns.driver - %post -n libibverbs -p /sbin/ldconfig %postun -n libibverbs -p /sbin/ldconfig @@ -398,21 +389,23 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/hns.driver %dir %{_sysconfdir}/rdma %dir %{_docdir}/%{name}-%{version} %doc %{_docdir}/%{name}-%{version}/README.md +%doc %{_docdir}/%{name}-%{version}/udev.md %config(noreplace) %{_sysconfdir}/rdma/* %config(noreplace) %{_sysconfdir}/udev/rules.d/* +%ifnarch s390 %config(noreplace) %{_sysconfdir}/modprobe.d/mlx4.conf +%endif %config(noreplace) %{_sysconfdir}/modprobe.d/truescale.conf %{_sysconfdir}/sysconfig/network-scripts/* +%{_unitdir}/rdma-hw.target +%{_unitdir}/rdma-load-modules@.service %{_unitdir}/rdma.service %dir %{dracutlibdir}/modules.d/05rdma %{dracutlibdir}/modules.d/05rdma/module-setup.sh %{_udevrulesdir}/* %{sysmodprobedir}/libmlx4.conf -%{sysmodprobedir}/cxgb3.conf -%{sysmodprobedir}/cxgb4.conf %{_libexecdir}/rdma-init-kernel %{_libexecdir}/rdma-set-sriov-vf -%{_libexecdir}/rdma-fixup-mtrr.awk %{_libexecdir}/mlx4-setup.sh %{_libexecdir}/truescale-serdes.cmds %{_sbindir}/rdma-ndd @@ -431,7 +424,8 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/hns.driver %{_mandir}/man3/rdma* %{_mandir}/man3/umad* %{_mandir}/man3/*_to_ibv_rate.* -%ifnarch s390x s390 +%ifnarch s390 +%{_mandir}/man3/mlx4dv* %{_mandir}/man3/mlx5dv* %endif %{_mandir}/man7/rdma_cm.* @@ -441,7 +435,8 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/hns.driver %dir %{_libdir}/libibverbs %{_libdir}/libibverbs*.so.* %{_libdir}/libibverbs/*.so -%ifnarch s390x s390 +%ifnarch s390 +%{_libdir}/libmlx4.so.* %{_libdir}/libmlx5.so.* %endif %config(noreplace) %{_sysconfdir}/libibverbs.d/*.driver @@ -449,7 +444,8 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/hns.driver %doc %{_docdir}/%{name}-%{version}/rxe.md %{_bindir}/rxe_cfg %{_mandir}/man7/rxe* -%ifnarch s390x s390 +%ifnarch s390 +%{_mandir}/man7/mlx4dv* %{_mandir}/man7/mlx5dv* %endif %{_mandir}/man8/rxe* @@ -467,15 +463,16 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/hns.driver %{_mandir}/man7/ibacm.* %{_mandir}/man7/ibacm_prov.* %{_unitdir}/ibacm.service +%{_unitdir}/ibacm.socket %dir %{_libdir}/ibacm %{_libdir}/ibacm/* %doc %{_docdir}/%{name}-%{version}/ibacm.md %files -n iwpmd -%{_bindir}/iwpmd +%{_sbindir}/iwpmd %{_unitdir}/iwpmd.service %config(noreplace) %{_sysconfdir}/iwpmd.conf -%{_mandir}/man1/iwpmd.* +%{_mandir}/man8/iwpmd.* %{_mandir}/man5/iwpmd.* %files -n libibcm @@ -506,6 +503,7 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/hns.driver %{_bindir}/ucmatose %{_bindir}/udaddy %{_bindir}/udpong +%{_mandir}/man1/cmtime.* %{_mandir}/man1/mckey.* %{_mandir}/man1/rcopy.* %{_mandir}/man1/rdma_client.* @@ -517,19 +515,55 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/hns.driver %{_mandir}/man1/rstream.* %{_mandir}/man1/ucmatose.* %{_mandir}/man1/udaddy.* +%{_mandir}/man1/udpong.* %files -n srp_daemon %config(noreplace) %{_sysconfdir}/srp_daemon.conf +%{_libexecdir}/srp_daemon/start_on_all_ports %{_unitdir}/srp_daemon.service +%{_unitdir}/srp_daemon_port@.service %{_sbindir}/ibsrpdm %{_sbindir}/srp_daemon %{_sbindir}/srp_daemon.sh %{_sbindir}/run_srp_daemon %{_mandir}/man1/ibsrpdm.1* %{_mandir}/man1/srp_daemon.1* +%{_mandir}/man5/srp_daemon.service.5* +%{_mandir}/man5/srp_daemon_port@.service.5* %doc %{_docdir}/%{name}-%{version}/ibsrpdm.md %changelog +* Mon Feb 19 2018 Jarod Wilson 15-6 +- libbnxt_re: fix lat test failure in event mode +- Resolves: rhbz#1545248 + +* Tue Feb 06 2018 Jarod Wilson 15-5 +- libmlx4: report RSS caps for improved DPDK support +- Fix double mutex unlock in iwpmd +- Resolves: rhbz#1527350 +- Resolves: rhbz#1542362 + +* Mon Jan 15 2018 Jarod Wilson 15-4 +- Add support for extended join multicast API in librdmacm +- Add support for striding RQ on mlx5 +- Resolves: rhbz#1515487, rhbz#1516571 + +* Tue Dec 26 2017 Honggang Li 15-3 +- srp_daemon: Don't create async_ev_thread if only run once +- srp_daemon: Remove unsupported systemd configurations +- srp_daemon: Start srp_daemon service after network target +- Resolves: bz1525193 +- Resolves: bz1528671 + +* Mon Nov 13 2017 Jarod Wilson 15-2 +- Fix ibacm segfault and improper multicast handling +- Resolves: rhbz#1502745 +- Resolves: rhbz#1502759 + +* Fri Sep 22 2017 Jarod Wilson 15-1 +- Update to upstream v15 release +- Resolves: rhbz#1494607 + * Tue May 30 2017 Jarod Wilson 13-7 - Add support for mlx5 Expand raw packet capabilities - Resolves: rhbz#1456561