From 67e83b5458e45b4b08f6168c240aeb1a78ef33d8 Mon Sep 17 00:00:00 2001 From: Yan Burman Date: Tue, 22 Apr 2014 07:24:47 +0000 Subject: [PATCH] isert: Add support for compiling with OFED 3.5 Signed-off-by: Yan Burman git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5453 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/Makefile | 10 +++++++++- iscsi-scst/README.iser_ofed | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index aa2053136..9e3d9e2be 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -54,7 +54,7 @@ all: include/iscsi_scst_itf_ver.h progs mods ISER_SYMVERS:=$(KMOD)/Module.symvers OFED_CFLAGS:= -MLNX_OFED:=$(shell if $( ofed_info | grep MLNX_OFED $) >/dev/null 2>/dev/null; then echo true; else echo false; fi) +MLNX_OFED:=$(shell if ofed_info | grep MLNX_OFED 2>/dev/null; then echo true; else echo false; fi) ifeq ($(MLNX_OFED),true) # Whether MLNX_OFED for ubuntu has been installed @@ -82,6 +82,9 @@ else # Whether or not the OFED kernel-ib-devel RPM has been installed. OFED_KERNEL_IB_DEVEL_RPM_INSTALLED:=$(shell if rpm -q kernel-ib-devel 2>/dev/null | grep -q $$(uname -r | sed 's/-/_/g'); then echo true; else echo false; fi) + # Whether or not the OFED compat-rdma-devel RPM has been installed. + OFED_COMPAT_RDMA_DEVEL_RPM_INSTALLED:=$(shell if rpm -q compat-rdma-devel 2>/dev/null | grep -q $$(uname -r | sed 's/-/_/g'); then echo true; else echo false; fi) + ifeq ($(OFED_KERNEL_IB_DEVEL_RPM_INSTALLED),true) # Read OFED's config.mk, which contains the definition of the variable # BACKPORT_INCLUDES. @@ -89,6 +92,11 @@ else OFED_CFLAGS:=$(shell echo $(BACKPORT_INCLUDES) -I/usr/src/ofa_kernel/include) ISER_SYMVERS:="$(ISER_SYMVERS) /usr/src/ofa_kernel/Module.symvers" endif + + ifeq ($(OFED_COMPAT_RDMA_DEVEL_RPM_INSTALLED),true) + OFED_CFLAGS:=-I/usr/src/compat-rdma/include -include /usr/src/compat-rdma/include/linux/compat-2.6.h + ISER_SYMVERS:="$(ISER_SYMVERS) /usr/src/compat-rdma/Module.symvers" + endif endif mods: Modules.symvers Module.symvers diff --git a/iscsi-scst/README.iser_ofed b/iscsi-scst/README.iser_ofed index 93310d72d..dd2b1d563 100644 --- a/iscsi-scst/README.iser_ofed +++ b/iscsi-scst/README.iser_ofed @@ -80,7 +80,8 @@ version detection by iscsi-scst makefile. For the OFED package.Make sure to enable -at least the kernel-ib and kernel-ib-devel packages. An example: +at least the kernel-ib and kernel-ib-devel packages (compat-rdma and compat-rdma-devel for OFED 3.5 and above). +An example: wget http://www.openfabrics.org/downloads/OFED/ofed-1.5.1/OFED-1.5.1.tgz tar xzf OFED-1.5.1.tgz