diff --git a/srpt/Makefile b/srpt/Makefile index c93a1179d..2c113eafc 100644 --- a/srpt/Makefile +++ b/srpt/Makefile @@ -198,6 +198,12 @@ conftest/create_send_mad_base/result-$(KVER).txt: \ echo "$(call run_conftest,create_send_mad_base, \ -DCREATE_SEND_MAD_HAS_BASE_ARG)" >"$@" +conftest/dev_attr_max_send_sge/result-$(KVER).txt: \ + conftest/dev_attr_max_send_sge/dev_attr_max_send_sge.c \ + conftest/dev_attr_max_send_sge/Makefile + echo "$(call run_conftest_bool,dev_attr_max_send_sge, \ + HAVE_DEV_ATTR_MAX_SEND_SGE)" >"$@" + conftest/gid_change/result-$(KVER).txt: \ conftest/gid_change/gid_change.c \ conftest/gid_change/Makefile diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 85cd2bdda..3c4a46f48 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2006 - 2009 Mellanox Technology Inc. All rights reserved. - * Copyright (C) 2008 - 2017 Bart Van Assche . + * Copyright (C) 2008 - 2018 Bart Van Assche . * Copyright (C) 2008 Vladislav Bolkhovitin * * This software is available to you under a choice of one of two @@ -2249,7 +2249,7 @@ retry: * max_sge values < max_sge_delta, use max_sge. For intermediate * max_sge values, use max_sge_delta. */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0) +#if HAVE_DEV_ATTR_MAX_SEND_SGE ch->max_send_sge = sdev->dev_attr.max_send_sge; ch->max_recv_sge = sdev->dev_attr.max_recv_sge; #else diff --git a/srpt/src/ib_srpt.h b/srpt/src/ib_srpt.h index 8339091d9..7eb7e51fe 100644 --- a/srpt/src/ib_srpt.h +++ b/srpt/src/ib_srpt.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2006 - 2009 Mellanox Technology Inc. All rights reserved. - * Copyright (C) 2009 - 2017 Bart Van Assche . + * Copyright (C) 2009 - 2018 Bart Van Assche . * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU