Merge branch 'svn-trunk'

This commit is contained in:
Bart Van Assche
2019-05-30 18:23:47 -07:00
5 changed files with 23 additions and 4 deletions
+6
View File
@@ -273,6 +273,12 @@ conftest/query_device_attr_arg/result-$(KVER).txt: \
echo "$(call run_conftest,query_device_attr_arg, \
-DIB_QUERY_DEVICE_HAS_ATTR_ARG)" >"$@"
conftest/dev_attr_max_recv_sge/result-$(KVER).txt: \
conftest/dev_attr_max_recv_sge/dev_attr_max_recv_sge.c \
conftest/dev_attr_max_recv_sge/Makefile
echo "$(call run_conftest,dev_attr_max_recv_sge, \
-DHAVE_DEV_ATTR_MAX_RECV_SGE)" >"$@"
conftest/query_gid/result-$(KVER).txt: \
conftest/query_gid/query_gid.c \
conftest/query_gid/Makefile
@@ -0,0 +1,3 @@
LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE)
obj-m += dev_attr_max_recv_sge.o
@@ -0,0 +1,10 @@
#include <linux/module.h>
#include <linux/stddef.h>
#include <rdma/ib_verbs.h>
static int modinit(void)
{
return offsetof(struct ib_device_attr, max_recv_sge);
}
module_init(modinit);
+1 -2
View File
@@ -1295,8 +1295,7 @@ static struct isert_connection *isert_conn_create(struct rdma_cm_id *cm_id,
* In mem-free devices, RC QPs can be created with a maximum of
* (max_sge - 3) entries only.
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && \
(!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8)
#ifndef HAVE_DEV_ATTR_MAX_RECV_SGE
isert_conn->max_sge = isert_dev->device_attr.max_sge - 3;
#else
isert_conn->max_sge = isert_dev->device_attr.max_recv_sge - 3;
+3 -2
View File
@@ -69,6 +69,7 @@ OFED_CFLAGS:=-I$(OFED_KERNEL_DIR)/include \
-include "linux/compat-2.6.h"
OFED_CFLAGS+=-DMOFED_MAJOR=$(shell echo "$(OFED_VERS)" | sed 's/\([0-9]\+\)[^0-9]\+\([0-9]\+\).*/\1/g')
OFED_CFLAGS+=-DMOFED_MINOR=$(shell echo "$(OFED_VERS)" | sed 's/\([0-9]\+\)[^0-9]\+\([0-9]\+\).*/\2/g')
OFED_CONFIG:=CONFIG_DTRACE=
else
# OFED 1.5
OFED_KERNEL_DIR:=/usr/src/ofa_kernel
@@ -81,7 +82,7 @@ OFED_MODULE_SYMVERS:=$(OFED_KERNEL_DIR)/$(MODULE_SYMVERS)
endif
# Use make instead of $(MAKE) to get rid of command-line option -i
run_conftest = $(shell if [ "0$(V)" -gt 0 ]; then output=/dev/stdout; else output=/dev/null; fi; if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" 1>&2 2>$${output}; then echo "$(strip $2)"; else echo "$(strip $3)"; fi)
run_conftest = $(shell if [ "0$(V)" -gt 0 ]; then output=/dev/stdout; else output=/dev/null; fi; if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) 1>&2 2>$${output}; then echo "$(strip $2)"; else echo "$(strip $3)"; fi)
run_conftest_bool = $(call run_conftest,$1,-D$(strip $2)=1,-D$(strip $2)=0)
CONFTESTS = $(shell ls -d conftest/*)
@@ -97,7 +98,7 @@ PRE_CFLAGS = $(OFED_CFLAGS) \
done)
all: check src/$(MODULE_SYMVERS) $(CONFTEST_OUTPUTS)
$(MAKE) -C $(KDIR) M=$(shell pwd)/src PRE_CFLAGS="$(PRE_CFLAGS)" modules
$(MAKE) -C $(KDIR) M=$(shell pwd)/src PRE_CFLAGS="$(PRE_CFLAGS)" $(OFED_CONFIG) modules
src/$(MODULE_SYMVERS): $(SCST_DIR)/$(MODULE_SYMVERS) $(OFED_MODULE_SYMVERS)
cat $^ | \