Skip to content

Commit

Permalink
Merge pull request #86 from linux-rdma/rdma-core-dc-support
Browse files Browse the repository at this point in the history
Falling back to ibv_post_send() for devices not supporting ibv_wr_* one
  • Loading branch information
dimasique1 authored May 9, 2020
2 parents 094b630 + 9209180 commit 79b8852
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
24 changes: 13 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,19 @@ if [test $HAVE_SNIFFER = yes]; then
AC_DEFINE([HAVE_SNIFFER], [1], [Enable Sniffer Flow Specification])
fi

CPU_IS_RO_COMPLIANT=yes
# Actually this is check for being affected by a known issue
# with Intel CPUs:
# https://lore.kernel.org/patchwork/patch/820922/
intel_no_ro_devices="6f01 6f02 6f03 6f04 6f05 6f06 6f07 6f08 6f09 6f0a 6f0b 6f0c 6f0d 6f0e 2f01 2f02 2f03 2f04 2f05 2f06 2f07 2f08 2f09 2f0a 2f0b 2f0c 2f0d 2f0e"
for cpu_num in $intel_no_ro_devices; do
ro_nonsupported=$(lspci -nn | grep -i 8086:$cpu_num)
if [ test "$ro_nonsupported" ]; then
CPU_IS_RO_COMPLIANT=no
fi
done
if [test $IS_FREEBSD = no]; then
CPU_IS_RO_COMPLIANT=yes
# Actually this is check for being affected by a known issue
# with Intel CPUs:
# https://lore.kernel.org/patchwork/patch/820922/
intel_no_ro_devices="6f01 6f02 6f03 6f04 6f05 6f06 6f07 6f08 6f09 6f0a 6f0b 6f0c 6f0d 6f0e 2f01 2f02 2f03 2f04 2f05 2f06 2f07 2f08 2f09 2f0a 2f0b 2f0c 2f0d 2f0e"
for cpu_num in $intel_no_ro_devices; do
ro_nonsupported=$(lspci -nn | grep -i 8086:$cpu_num)
if [ test "$ro_nonsupported" ]; then
CPU_IS_RO_COMPLIANT=no
fi
done
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>],
Expand Down
19 changes: 16 additions & 3 deletions src/perftest_resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -1366,12 +1366,25 @@ int verify_params_with_device_context(struct ibv_context *context,
}
}

if (current_dev == CONNECTX3_PRO || current_dev == CONNECTX3)
// those are devices supporting new post send
if (current_dev != CONNECTIB &&
current_dev != CONNECTX4 &&
current_dev != CONNECTX4LX &&
current_dev != CONNECTX5 &&
current_dev != CONNECTX5EX &&
current_dev != CONNECTX6 &&
current_dev != CONNECTX6DX &&
current_dev != CONNECTX6LX &&
current_dev != CONNECTX7 &&
current_dev != MLX5GENVF &&
current_dev != BLUEFIELD &&
current_dev != BLUEFIELD2 &&
current_dev != EFA)
{
if (!user_param->use_old_post_send)
{
fprintf(stderr, " Warning: ConnectX-3 and ConnectX-3 Pro don't support WR postsend API!\n");
fprintf(stderr, " Warning: Falling back to ibv_post_send() API\n");
fprintf(stderr, " Warning: The device chosen doesn't support WR post send API!\n");
fprintf(stderr, " Warning: Falling back to using ibv_post_send()\n");
user_param->use_old_post_send = 1;
}
}
Expand Down

0 comments on commit 79b8852

Please sign in to comment.