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