From 27a2d1d04da67aa89f6b40297593732bbda26490 Mon Sep 17 00:00:00 2001 From: Sai Tallamraju Date: Wed, 25 Apr 2018 16:00:44 -0400 Subject: [PATCH] nvmf:Add RNIC HBA userspace library for FreeBSD Change-Id: I7d929e7520007f29511299442f791038f7a4ce1d Signed-off-by: John Meneghini Reviewed-on: https://review.gerrithub.io/409539 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Jim Harris --- examples/nvme/perf/README.md | 5 +++++ mk/spdk.common.mk | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 examples/nvme/perf/README.md diff --git a/examples/nvme/perf/README.md b/examples/nvme/perf/README.md new file mode 100644 index 000000000..e5ec38d12 --- /dev/null +++ b/examples/nvme/perf/README.md @@ -0,0 +1,5 @@ +# Compiling perf on FreeBSD + +To use perf test on FreeBSD over NVMe-oF, explicitly link userspace library of HBA. For example, on a setup with Mellanox HBA, + + LIBS += -lmlx5 diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk index 7326e7869..da2070e10 100644 --- a/mk/spdk.common.mk +++ b/mk/spdk.common.mk @@ -125,6 +125,32 @@ LIBS += -L$(CONFIG_VPP_DIR)/lib64 COMMON_CFLAGS += -I$(CONFIG_VPP_DIR)/include endif +#Attach only if FreeBSD and RDMA is specified with configure +ifeq ($(OS),FreeBSD) +ifeq ($(CONFIG_RDMA),y) +# RDMA Userspace Verbs Library +ifneq ("$(wildcard /usr/lib/libibverbs.*)","") +LIBS += -libverbs +endif +# RDMA Connection Manager Library +ifneq ("$(wildcard /usr/lib/librdmacm.*)","") +LIBS += -lrdmacm +endif +# Mellanox - MLX4 HBA Userspace Library +ifneq ("$(wildcard /usr/lib/libmlx4.*)","") +LIBS += -lmlx4 +endif +# Mellanox - MLX5 HBA Userspace Library +ifneq ("$(wildcard /usr/lib/libmlx5.*)","") +LIBS += -lmlx5 +endif +# Chelsio HBA Userspace Library +ifneq ("$(wildcard /usr/lib/libcxgb4.*)","") +LIBS += -lcxgb4 +endif +endif +endif + ifeq ($(CONFIG_DEBUG), y) COMMON_CFLAGS += -DDEBUG -O0 -fno-omit-frame-pointer else