From 7671073bed9d2fcdcf5a7a4074749a61d922a597 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 15 Aug 2018 13:09:49 -0700 Subject: [PATCH] config: add define for rdma send with inval On newer versions of the kernel, we see a significant performance impact if send with invalidate is not enabled. However, depending on the user's version of IB verbs, it may not be supported. We need to warn them of the performance issues. Change-Id: I93a5f5375af90ca3102a6bd084df430b1153419c Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/422460 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- configure | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/configure b/configure index 3dd02e379..35cf6149b 100755 --- a/configure +++ b/configure @@ -307,6 +307,40 @@ if [[ "$OSTYPE" == "freebsd"* ]]; then fi fi +if [ "$CONFIG_RDMA" = "y" ]; then + if [ "$OSTYPE" != "FreeBSD"* ]; then + ibv_lib_file="$(readlink -f /usr/lib64/libibverbs.so)" || true + if [ -z $ibv_lib_file ]; then + ibv_lib_file="libibverbs.so.0.0.0" + fi + ibv_ver_str="$(basename $ibv_lib_file)" + ibv_maj_ver=`echo $ibv_ver_str | cut -d. -f3` + ibv_min_ver=`echo $ibv_ver_str | cut -d. -f4` + if [[ "$ibv_maj_var" > 1 || ("$ibv_maj_ver" -eq 1 && "$ibv_min_ver" -ge 1) ]]; then + CONFIG_RDMA_SEND_WITH_INVAL="y" + else + CONFIG_RDMA_SEND_WITH_INVAL="n" + cat <> CONFIG.local fi +if [ -n "$CONFIG_RDMA_SEND_WITH_INVAL" ]; then + echo "CONFIG_RDMA_SEND_WITH_INVAL?=$CONFIG_RDMA_SEND_WITH_INVAL" >> CONFIG.local +fi if [ -n "$CONFIG_SHARED" ]; then echo "CONFIG_SHARED?=$CONFIG_SHARED" >> CONFIG.local fi