From 09d80a9e8ecb67f7509a425950ed2d4430334430 Mon Sep 17 00:00:00 2001 From: Arlin Davis Date: Mon, 21 Jul 2014 12:33:12 -0700 Subject: [PATCH] Add MCM provider and MPXYD service to build update package version to 2.1.0 MCM provider is dependent on Intel MPSS SCIF library. Signed-off-by: Arlin Davis --- Makefile.am | 207 ++++++++++++++++++++++++++++++++++--- configure.in | 119 ++++++++++----------- dapl.spec.in | 69 ++++++++++--- dapl/udapl/libdaplomcm.map | 7 ++ 4 files changed, 313 insertions(+), 89 deletions(-) create mode 100644 dapl/udapl/libdaplomcm.map diff --git a/Makefile.am b/Makefile.am index 78c8fd0..f9c4093 100755 --- a/Makefile.am +++ b/Makefile.am @@ -1,15 +1,10 @@ # $Id: $ +ACLOCAL_AMFLAGS = -I m4 + OSFLAGS = -DOS_RELEASE=$(shell expr `uname -r | cut -f1 -d.` \* 65536 + `uname -r | cut -f2 -d.`) # Check for RedHat, needed for ia64 udapl atomic operations (IA64_FETCHADD syntax) # and built-in atomics for RedHat EL5 -if OS_RHEL4 -OSFLAGS += -DREDHAT_EL4 -endif - -if OS_RHEL5 -OSFLAGS += -DREDHAT_EL5 -endif if OS_SUSE11 OSFLAGS += -DSUSE_11 @@ -19,6 +14,7 @@ if EXT_TYPE_IB XFLAGS = -DDAT_EXTENSIONS XPROGRAMS = dapl/openib_common/ib_extensions.c XHEADERS = +XDAT = dat/include/dat2/dat_ib_extensions.h XLIBS = if DEFINE_COUNTERS XFLAGS += -DDAPL_COUNTERS @@ -33,6 +29,7 @@ else XFLAGS = XPROGRAMS = XHEADERS = +XDAT = XLIBS = endif @@ -45,11 +42,12 @@ XFLAGS += -DDEFINE_ATTR_LINK_LAYER endif if DEBUG -AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAPL_DBG -DDAT_CONF="\"$(sysconfdir)/dat.conf\"" +AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAPL_DBG -DDAT_CONF="\"$(sysconfdir)/dat.conf\"" else AM_CFLAGS = -g -Wall -D_GNU_SOURCE -DDAT_CONF="\"$(sysconfdir)/dat.conf\"" endif +AM_CFLAGS += -DMPXYD_CONF="\"$(sysconfdir)/mpxyd.conf\"" AM_CFLAGS += -DPACKAGE_DATE=$$(date +'%Y%m%d') sysconf_DATA = doc/dat.conf @@ -64,6 +62,9 @@ endif if DEFINE_UCM daplliboucmdir = $(libdir) endif +if DEFINE_MCM +dapllibomcmdir = $(libdir) +endif datlib_LTLIBRARIES = dat/udat/libdat2.la if DEFINE_CMA @@ -75,6 +76,9 @@ endif if DEFINE_UCM daplliboucm_LTLIBRARIES = dapl/udapl/libdaploucm.la endif +if DEFINE_MCM +dapllibomcm_LTLIBRARIES = dapl/udapl/libdaplomcm.la +endif dat_udat_libdat2_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) $(XFLAGS) \ -I$(srcdir)/dat/include/ -I$(srcdir)/dat/udat/ \ @@ -106,6 +110,16 @@ dapl_udapl_libdaploucm_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) $(XFLAG -I$(srcdir)/dapl/openib_ucm \ -I$(srcdir)/dapl/openib_ucm/linux endif +if DEFINE_MCM +dapl_udapl_libdaplomcm_la_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $(OSFLAGS) $(XFLAGS) \ + -DOPENIB -DCQ_WAIT_OBJECT \ + -I$(srcdir)/dat/include/ -I$(srcdir)/dapl/include/ \ + -I$(srcdir)/dapl/common -I$(srcdir)/dapl/udapl/linux \ + -I$(srcdir)/dapl/openib_common \ + -I$(srcdir)/dapl/svc \ + -I$(srcdir)/dapl/openib_mcm \ + -I$(srcdir)/dapl/openib_mcm/linux +endif if HAVE_LD_VERSION_SCRIPT dat_version_script = -Wl,--version-script=$(srcdir)/dat/udat/libdat2.map if DEFINE_CMA @@ -117,6 +131,9 @@ endif if DEFINE_UCM daploucm_version_script = -Wl,--version-script=$(srcdir)/dapl/udapl/libdaploucm.map endif +if DEFINE_MCM + daplomcm_version_script = -Wl,--version-script=$(srcdir)/dapl/udapl/libdaplomcm.map +endif else dat_version_script = if DEFINE_CMA @@ -128,6 +145,9 @@ endif if DEFINE_UCM daploucm_version_script = endif +if DEFINE_MCM + daplopcm_version_script = +endif endif # @@ -260,6 +280,7 @@ dapl_udapl_libdaplofa_la_LDFLAGS = -version-info 2:0:0 $(daplofa_version_script) -Wl,-init,dapl_init -Wl,-fini,dapl_fini \ -lpthread -libverbs -lrdmacm $(XLIBS) endif + if DEFINE_SCM # # uDAPL OpenFabrics Socket CM version for IB: libdaplscm.so @@ -375,6 +396,7 @@ dapl_udapl_libdaploscm_la_LDFLAGS = -version-info 2:0:0 $(daploscm_version_scrip -Wl,-init,dapl_init -Wl,-fini,dapl_fini \ -lpthread -libverbs $(XLIBS) endif + if DEFINE_UCM # # uDAPL OpenFabrics UD CM version for IB: libdaplucm.so @@ -486,11 +508,130 @@ dapl_udapl_libdaploucm_la_SOURCES = dapl/udapl/dapl_init.c \ dapl/openib_ucm/cm.c \ dapl/openib_ucm/device.c $(XPROGRAMS) -dapl_udapl_libdaploucm_la_LDFLAGS = -version-info 2:0:0 $(daploscm_version_script) \ +dapl_udapl_libdaploucm_la_LDFLAGS = -version-info 2:0:0 $(daploucm_version_script) \ -Wl,-init,dapl_init -Wl,-fini,dapl_fini \ -lpthread -libverbs $(XLIBS) endif +if DEFINE_MCM +# +# uDAPL OpenFabrics MIC Proxy CM for IB: libdaplmcm.so +# Proxy MIC Infiniband RDMA via SCIF using mpxyd server +# +dapl_udapl_libdaplomcm_la_SOURCES = dapl/udapl/dapl_init.c \ + dapl/udapl/dapl_evd_create.c \ + dapl/udapl/dapl_evd_query.c \ + dapl/udapl/dapl_cno_create.c \ + dapl/udapl/dapl_cno_modify_agent.c \ + dapl/udapl/dapl_cno_free.c \ + dapl/udapl/dapl_cno_wait.c \ + dapl/udapl/dapl_cno_query.c \ + dapl/udapl/dapl_lmr_create.c \ + dapl/udapl/dapl_evd_wait.c \ + dapl/udapl/dapl_evd_disable.c \ + dapl/udapl/dapl_evd_enable.c \ + dapl/udapl/dapl_evd_modify_cno.c \ + dapl/udapl/dapl_evd_set_unwaitable.c \ + dapl/udapl/dapl_evd_clear_unwaitable.c \ + dapl/udapl/linux/dapl_osd.c \ + dapl/common/dapl_cookie.c \ + dapl/common/dapl_cr_accept.c \ + dapl/common/dapl_cr_query.c \ + dapl/common/dapl_cr_reject.c \ + dapl/common/dapl_cr_util.c \ + dapl/common/dapl_cr_callback.c \ + dapl/common/dapl_cr_handoff.c \ + dapl/common/dapl_ep_connect.c \ + dapl/common/dapl_ep_create.c \ + dapl/common/dapl_ep_disconnect.c \ + dapl/common/dapl_ep_dup_connect.c \ + dapl/common/dapl_ep_free.c \ + dapl/common/dapl_ep_reset.c \ + dapl/common/dapl_ep_get_status.c \ + dapl/common/dapl_ep_modify.c \ + dapl/common/dapl_ep_post_rdma_read.c \ + dapl/common/dapl_ep_post_rdma_write.c \ + dapl/common/dapl_ep_post_recv.c \ + dapl/common/dapl_ep_post_send.c \ + dapl/common/dapl_ep_query.c \ + dapl/common/dapl_ep_util.c \ + dapl/common/dapl_evd_dequeue.c \ + dapl/common/dapl_evd_free.c \ + dapl/common/dapl_evd_post_se.c \ + dapl/common/dapl_evd_resize.c \ + dapl/common/dapl_evd_util.c \ + dapl/common/dapl_evd_cq_async_error_callb.c \ + dapl/common/dapl_evd_qp_async_error_callb.c \ + dapl/common/dapl_evd_un_async_error_callb.c \ + dapl/common/dapl_evd_connection_callb.c \ + dapl/common/dapl_evd_dto_callb.c \ + dapl/common/dapl_get_consumer_context.c \ + dapl/common/dapl_get_handle_type.c \ + dapl/common/dapl_hash.c \ + dapl/common/dapl_hca_util.c \ + dapl/common/dapl_ia_close.c \ + dapl/common/dapl_ia_open.c \ + dapl/common/dapl_ia_query.c \ + dapl/common/dapl_ia_util.c \ + dapl/common/dapl_llist.c \ + dapl/common/dapl_lmr_free.c \ + dapl/common/dapl_lmr_query.c \ + dapl/common/dapl_lmr_util.c \ + dapl/common/dapl_lmr_sync_rdma_read.c \ + dapl/common/dapl_lmr_sync_rdma_write.c \ + dapl/common/dapl_mr_util.c \ + dapl/common/dapl_provider.c \ + dapl/common/dapl_sp_util.c \ + dapl/common/dapl_psp_create.c \ + dapl/common/dapl_psp_create_any.c \ + dapl/common/dapl_psp_free.c \ + dapl/common/dapl_psp_query.c \ + dapl/common/dapl_pz_create.c \ + dapl/common/dapl_pz_free.c \ + dapl/common/dapl_pz_query.c \ + dapl/common/dapl_pz_util.c \ + dapl/common/dapl_rmr_create.c \ + dapl/common/dapl_rmr_free.c \ + dapl/common/dapl_rmr_bind.c \ + dapl/common/dapl_rmr_query.c \ + dapl/common/dapl_rmr_util.c \ + dapl/common/dapl_rsp_create.c \ + dapl/common/dapl_rsp_free.c \ + dapl/common/dapl_rsp_query.c \ + dapl/common/dapl_cno_util.c \ + dapl/common/dapl_set_consumer_context.c \ + dapl/common/dapl_ring_buffer_util.c \ + dapl/common/dapl_name_service.c \ + dapl/common/dapl_timer_util.c \ + dapl/common/dapl_ep_create_with_srq.c \ + dapl/common/dapl_ep_recv_query.c \ + dapl/common/dapl_ep_set_watermark.c \ + dapl/common/dapl_srq_create.c \ + dapl/common/dapl_srq_free.c \ + dapl/common/dapl_srq_query.c \ + dapl/common/dapl_srq_resize.c \ + dapl/common/dapl_srq_post_recv.c \ + dapl/common/dapl_srq_set_lw.c \ + dapl/common/dapl_srq_util.c \ + dapl/common/dapl_debug.c \ + dapl/common/dapl_ia_ha.c \ + dapl/common/dapl_csp.c \ + dapl/common/dapl_ep_post_send_invalidate.c \ + dapl/common/dapl_ep_post_rdma_read_to_rmr.c \ + dapl/openib_common/mem.c \ + dapl/openib_common/cq.c \ + dapl/openib_common/qp.c \ + dapl/openib_common/util.c \ + dapl/openib_mcm/cm.c \ + dapl/openib_mcm/mix.c \ + dapl/openib_mcm/proxy.c \ + dapl/openib_mcm/device.c $(XPROGRAMS) + +dapl_udapl_libdaplomcm_la_LDFLAGS = -version-info 2:0:0 $(daplomcm_version_script) \ + -Wl,-init,dapl_init -Wl,-fini,dapl_fini \ + -lpthread -libverbs -lscif $(XLIBS) +endif + libdatincludedir = $(includedir)/dat2 libdatinclude_HEADERS = dat/include/dat2/dat.h \ @@ -502,9 +643,8 @@ libdatinclude_HEADERS = dat/include/dat2/dat.h \ dat/include/dat2/udat_config.h \ dat/include/dat2/udat.h \ dat/include/dat2/udat_redirection.h \ - dat/include/dat2/udat_vendor_specific.h \ - dat/include/dat2/dat_ib_extensions.h - + dat/include/dat2/udat_vendor_specific.h $(XDAT) + man_MANS = man/dtest.1 man/dapltest.1 man/dat.conf.5 EXTRA_DIST = dat/common/dat_dictionary.h \ @@ -523,6 +663,7 @@ EXTRA_DIST = dat/common/dat_dictionary.h \ dat/include/dat2/udat.h \ dat/include/dat2/udat_redirection.h \ dat/include/dat2/udat_vendor_specific.h \ + dat/include/dat2/dat_ib_extensions.h \ dapl/common/dapl_adapter_util.h \ dapl/common/dapl_cno_util.h \ dapl/common/dapl_cookie.h \ @@ -550,6 +691,7 @@ EXTRA_DIST = dat/common/dat_dictionary.h \ dapl/include/dapl_vendor.h \ dapl/openib_common/dapl_ib_dto.h \ dapl/openib_common/dapl_ib_common.h \ + dapl/openib_common/dapl_mic_common.h \ dapl/openib_common/collectives/ib_collectives.h \ dapl/openib_common/collectives/fca_provider.h \ dapl/openib_cma/dapl_ib_util.h \ @@ -558,15 +700,24 @@ EXTRA_DIST = dat/common/dat_dictionary.h \ dapl/openib_scm/linux/openib_osd.h \ dapl/openib_ucm/dapl_ib_util.h \ dapl/openib_ucm/linux/openib_osd.h \ + dapl/openib_mcm/dapl_ib_util.h \ + dapl/openib_mcm/linux/openib_osd.h \ + dapl/svc/mpxyd.h \ dat/udat/libdat2.map \ dapl/udapl/libdaplofa.map \ dapl/udapl/libdaploscm.map \ dapl/udapl/libdaploucm.map \ + dapl/udapl/libdaplomcm.map \ + README \ + README.mcm \ + LICENSE.txt \ LICENSE.txt \ LICENSE2.txt \ LICENSE3.txt \ doc/dat.conf \ + doc/mpxyd.conf \ dapl.spec.in \ + mpxyd.init.in \ $(man_MANS) \ test/dapltest/include/dapl_bpool.h \ test/dapltest/include/dapl_client_info.h \ @@ -596,7 +747,35 @@ EXTRA_DIST = dat/common/dat_dictionary.h \ test/dapltest/include/dapl_version.h \ test/dapltest/mdep/linux/dapl_mdep_user.h +if DEFINE_MCM +sbin_PROGRAMS = svc/mpxyd +svc_mpxyd_SOURCES = dapl/svc/mpxyd.c \ + dapl/svc/util.c \ + dapl/svc/mix.c \ + dapl/svc/mcm.c \ + dapl/svc/mpxy_out.c \ + dapl/svc/mpxy_in.c +svc_mpxyd_CFLAGS = $(AM_CFLAGS) -lscif -libverbs -lpthread -Idat/include -I$(srcdir)/dapl/openib_common +sysconf_DATA += doc/mpxyd.conf + +install-exec-hook: + install -D -m 755 mpxyd.init $(DESTDIR)$(sysconfdir)/init.d/mpxyd; + echo %{_sbindir}/mpxyd > mcm-files + echo %{_sysconfdir}/init.d/mpxyd >> mcm-files + echo %{_sysconfdir}/mpxyd.conf >> mcm-files +endif + dist-hook: dapl.spec - cp dapl.spec $(distdir) - + cp dapl.spec $(distdir)/ + +rpmcheck: dapl.spec dist + mkdir -p rpmbuild/{SOURCES,BUILD,RPMS,SPECS,BUILDROOT} + cp $(distdir).tar.gz rpmbuild/SOURCES + +srcrpms: rpmcheck + rpmbuild -bs --define "_topdir ${PWD}/rpmbuild" dapl.spec + +rpms: rpmcheck + rpmbuild -ba --define "_topdir ${PWD}/rpmbuild" dapl.spec + SUBDIRS = . test/dtest test/dapltest diff --git a/configure.in b/configure.in index 104829c..c32495a 100644 --- a/configure.in +++ b/configure.in @@ -1,57 +1,41 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(dapl, 2.0.42, linux-rdma@vger.kernel.org) +AC_INIT(dapl, 2.1.0, linux-rdma@vger.kernel.org) AC_CONFIG_SRCDIR([dat/udat/udat.c]) AC_CONFIG_AUX_DIR(config) +AC_CONFIG_MACRO_DIR([m4]) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(dapl, 2.0.42) +AM_INIT_AUTOMAKE(dapl, 2.1.0) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AM_PROG_LIBTOOL -AC_ARG_ENABLE(libcheck, [ --disable-libcheck do not test for presence of ib libraries], -[ if test x$enableval = xno ; then - disable_libcheck=yes - fi -]) +AC_ARG_ENABLE([libcheck], + AS_HELP_STRING([--disable-libcheck], [do not test for presence of ib libraries]), + [ if test x$enableval = xno ; then + disable_libcheck=yes + fi ] +) dnl Checks for programs AC_PROG_CC -dnl Checks for libraries -if test "$disable_libcheck" != "yes" -then -AC_CHECK_LIB(ibverbs, ibv_get_device_list, [], - AC_MSG_ERROR([ibv_get_device_list() not found. libdapl requires libibverbs.])) - -AC_CHECK_HEADER(infiniband/verbs.h, [], +dnl Checks for header files and libraries +if test "$disable_libcheck" != "yes"; then + AC_CHECK_HEADER(infiniband/verbs.h, [], AC_MSG_ERROR([ not found. Is libibverbs installed?])) - -AC_CHECK_MEMBER(struct ibv_port_attr.link_layer, + AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h]) + AC_CHECK_MEMBER(struct ibv_port_attr.link_layer, AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "yes"), AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "no"), [#include ]) - -if test "$with_ib_acm" != "" && test "$with_ib_acm" != "no"; then -AC_CHECK_MEMBER(struct ibv_path_record.service_id, [], - AC_MSG_ERROR([IB ACM support requires libibverbs 1.1.4 or greater.]), - [#include ]) -AC_CHECK_HEADER(infiniband/acm.h, [], - AC_MSG_ERROR([IB ACM requested but not found.])) -fi + AC_CHECK_FUNCS([gethostname gettimeofday inet_ntoa memset select socket strcasecmp strdup strerror strtol sysinfo]) else AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "no") fi -dnl End check for libraries - -if test "$with_ib_acm" != "" && test "$with_ib_acm" != "no"; then - AC_DEFINE(DAPL_USE_IBACM, 1, [set to 1 to use IB ACM services]) - ac_use_acm=yes -else - ac_use_acm=no -fi -AM_CONDITIONAL(DAPL_USE_IBACM, test "$ac_use_acm" = "yes") +dnl End check for header files and libraries AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script, if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then @@ -62,15 +46,35 @@ AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script, AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes") dnl Support debug mode build - if enable-debug provided the DEBUG variable is set -AC_ARG_ENABLE(debug, -[ --enable-debug Turn on debug mode, default=off], -[case "${enableval}" in - yes) debug=true ;; - no) debug=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; -esac],[debug=false]) +AC_ARG_ENABLE([debug], + AS_HELP_STRING([--enable-debug],[enable debug build, default=disabled]), + [case "${enableval}" in + yes) debug=true ;; + no) debug=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; + esac], + [debug=false]) AM_CONDITIONAL(DEBUG, test x$debug = xtrue) +dnl Support for IB acm sevices +AC_ARG_ENABLE([acm], + AS_HELP_STRING([--enable-acm],[enable IB ACM services, default=disabled]), + [case "$enableval" in + yes) + AC_DEFINE(DAPL_USE_IBACM, 1, [set to 1 to use IB ACM services]) + AC_CHECK_MEMBER(struct ibv_path_record.service_id, [], + AC_MSG_ERROR([IB ACM support requires libibverbs 1.1.4 or greater.]), + [#include ]) + AC_CHECK_HEADER(infiniband/acm.h, [], + AC_MSG_ERROR([IB ACM requested but not found.])) + AC_DEFINE(DAPL_USE_IBACM, 1, [set to 1 to use IB ACM services]) + acm=true ;; + no) acm=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-acm) ;; + esac], + [acm=false]) +AM_CONDITIONAL(DAPL_USE_IBACM, test x$acm = true) + dnl Support to enable/disable CMA (rdma_cm) provider library build AC_ARG_ENABLE([cma], AS_HELP_STRING([--disable-cma],[disable CMA (rdma_cm) provider build, default=enabled]), @@ -104,6 +108,18 @@ AC_ARG_ENABLE([ucm], [ucm=true]) AM_CONDITIONAL(DEFINE_UCM, test x$ucm = xtrue) +dnl Support to enable/disable MCM (proxy) MIC SCIF provider library build +AC_CHECK_HEADER(scif.h, [sciffound=true], [sciffound=false]) +AC_ARG_ENABLE([mcm], + AS_HELP_STRING([--enable-mcm],[enable MCM (proxy CM) SCIF provider build, default=auto]), + [case "${enableval}" in + yes) AS_IF([test x$sciffound = xtrue], [mcm=true], AC_MSG_ERROR([ not found. Is libscif installed?])) ;; + no) mcm=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-mcm) ;; + esac], + [mcm=$sciffound]) +AM_CONDITIONAL(DEFINE_MCM, test x$mcm = xtrue) + dnl Support to enable/disable IB extended counters (CM,LINK,DIAG) AC_ARG_ENABLE([counters], AS_HELP_STRING([--enable-counters],[enable counters provider build, default=disabled]), @@ -151,26 +167,6 @@ AC_ARG_ENABLE([coll-type], ],[coll_type=none]) AM_CONDITIONAL(COLL_TYPE_FCA, test "$coll_type" = "fca") -dnl Check for Redhat EL release 4 -AC_CACHE_CHECK(Check for RHEL4 system, ac_cv_rhel4, - if test -f /etc/redhat-release && - test -n "`grep -e "release 4" /etc/redhat-release`"; then - ac_cv_rhel4=yes - else - ac_cv_rhel4=no - fi) -AM_CONDITIONAL(OS_RHEL4, test "$ac_cv_rhel4" = "yes") - -dnl Check for Redhat EL release 5 -AC_CACHE_CHECK(Check for RHEL5 system, ac_cv_rhel5, - if test -f /etc/redhat-release && - test -n "`grep -e "release 5" /etc/redhat-release`"; then - ac_cv_rhel5=yes - else - ac_cv_rhel5=no - fi) -AM_CONDITIONAL(OS_RHEL5, test "$ac_cv_rhel5" = "yes") - dnl Check for SuSE release 11 AC_CACHE_CHECK(Check for SUSE_11 system, ac_cv_suse11, if test -f /etc/SuSE-release && @@ -181,6 +177,5 @@ AC_CACHE_CHECK(Check for SUSE_11 system, ac_cv_suse11, fi) AM_CONDITIONAL(OS_SUSE11, test "$ac_cv_suse11" = "yes") -AC_CONFIG_FILES([Makefile test/dtest/Makefile test/dapltest/Makefile dapl.spec]) - +AC_CONFIG_FILES([Makefile test/dtest/Makefile test/dapltest/Makefile dapl.spec mpxyd.init]) AC_OUTPUT diff --git a/dapl.spec.in b/dapl.spec.in index 22644e7..73bd9ed 100644 --- a/dapl.spec.in +++ b/dapl.spec.in @@ -1,5 +1,5 @@ # Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. -# Copyright (c) 2007, Intel Corporation. All rights reserved. +# Copyright (c) 2007-2014, Intel Corporation. All rights reserved. # # This Software is licensed under one of the following licenses: # @@ -31,20 +31,28 @@ # uDAT and uDAPL 2.0 Registry RPM SPEC file # # $Id: $ +# don't fail when not given extra FLAGS: +%{!?_CPPFLAGS: %define _CPPFLAGS ""} +%{!?_LDFLAGS: %define _LDFLAGS ""} +%{!?_CONF: %define _CONF ""} + +%define debug_package %{nil} + Name: dapl Version: @VERSION@ Release: 1%{?dist} -Summary: A Library for userspace access to RDMA devices using OS Agnostic DAT APIs. +Summary: A Library for userspace access to RDMA devices using OS Agnostic DAT APIs, proxy daemon for offloading RDMA Group: System Environment/Libraries License: Dual GPL/BSD/CPL Url: http://openfabrics.org/ Source: http://www.openfabrics.org/downloads/%{name}/%{name}-%{version}.tar.gz -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +BuildRoot: %{_topdir}/BUILDROOT +Obsoletes: intel-mic-ofed-dapl Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig -Requires(post): sed -Requires(post): coreutils +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig %description Along with the OpenFabrics kernel drivers, libdat and libdapl provides a userspace @@ -54,6 +62,8 @@ atomic operations and rdma write with immediate data. %package devel Summary: Development files for the libdat and libdapl libraries Group: System Environment/Libraries +Requires: %{name} = %{version}-%{release} +Obsoletes: intel-mic-ofed-dapl-devel %description devel Header files for libdat and libdapl library. @@ -61,6 +71,7 @@ Header files for libdat and libdapl library. %package devel-static Summary: Static development files for libdat and libdapl library Group: System Environment/Libraries +Obsoletes: intel-mic-ofed-dapl-devel-static %description devel-static Static libraries for libdat and libdapl library. @@ -69,6 +80,7 @@ Static libraries for libdat and libdapl library. Summary: Test suites for uDAPL library Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} +Obsoletes: intel-mic-ofed-dapl-utils %description utils Useful test suites to validate uDAPL library API's. @@ -77,26 +89,50 @@ Useful test suites to validate uDAPL library API's. %setup -q %build -%configure --enable-ext-type=ib +%configure CPPFLAGS=%{_CPPFLAGS} LDFLAGS=%{_LDFLAGS} %{_CONF} + make %{?_smp_mflags} %install -rm -rf %{buildroot} -make DESTDIR=%{buildroot} install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + # remove unpackaged files from the buildroot rm -f %{buildroot}%{_libdir}/*.la +# make init.d so we can exclude it later: +mkdir -p %{buildroot}%{_sysconfdir}/init.d +touch mcm-files + %clean rm -rf %{buildroot} -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%post +# fix problem with older dapl packages that clobber dat.conf when updating +cp %{_sysconfdir}/dat.conf /tmp/%{version}-dat.conf +/sbin/ldconfig + +if [ $1 -gt 1 ]; then + /sbin/chkconfig --add mpxyd &> /dev/null || true + service mpxyd start +elif [ $1 -gt 2 ]; then + service mpxyd restart +fi + +%preun +if [ -f /etc/init.d/mpxyd ]; then + /sbin/chkconfig --del mpxyd &> /dev/null + service mpxyd stop +fi -%files +%postun +/sbin/ldconfig + +%files -f mcm-files %defattr(-,root,root,-) %{_libdir}/libda*.so.* -%{_sysconfdir}/dat.conf -%doc AUTHORS README COPYING ChangeLog LICENSE.txt LICENSE2.txt LICENSE3.txt +%config %{_sysconfdir}/dat.conf +%doc AUTHORS README COPYING ChangeLog LICENSE.txt LICENSE2.txt LICENSE3.txt README.mcm %files devel %defattr(-,root,root,-) @@ -114,7 +150,14 @@ rm -rf %{buildroot} %{_mandir}/man1/*.1* %{_mandir}/man5/*.5* +%triggerpostun -- dapl < 2.0.35-1 +# fix problem with older dapl packages that clobber dat.conf during update +mv /tmp/%{version}-dat.conf %{_sysconfdir}/dat.conf + %changelog +* Fri Jul 18 2014 Arlin Davis - 2.1.0 +- DAT/DAPL Version 2.1.0 Release 1, add MIC support, OFED 3.12-1 + * Mon May 4 2014 Arlin Davis - 2.0.42 - DAT/DAPL Version 2.0.42 Release 1, OFED 3.12 GA diff --git a/dapl/udapl/libdaplomcm.map b/dapl/udapl/libdaplomcm.map new file mode 100644 index 0000000..80e12a4 --- /dev/null +++ b/dapl/udapl/libdaplomcm.map @@ -0,0 +1,7 @@ +DAPL_MCM_2.0 { + global: + dat_provider_fini; + dat_provider_init; + dapl_extensions; + local: *; +}; -- 2.46.0