# # Copyright (c) 2018-2022 Amazon.com, Inc. or its affiliates. All rights reserved. # # 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 # General Public License (GPL) Version 2, available from the file # COPYING in the main directory of this source tree, or the # BSD license below: # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # - Redistributions of source code must retain the above # copyright notice, this list of conditions and the following # disclaimer. # # - Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials # provided with the distribution. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # if HAVE_EFA _efa_files = \ prov/efa/src/efa_device.c \ prov/efa/src/efa_hmem.c \ prov/efa/src/efa_shm.c \ prov/efa/src/efa_av.c \ prov/efa/src/efa_domain.c \ prov/efa/src/efa_fabric.c \ prov/efa/src/efa_mr.c \ prov/efa/src/efa_strerror.c \ prov/efa/src/efa_user_info.c \ prov/efa/src/efa_prov_info.c \ prov/efa/src/efa_fork_support.c \ prov/efa/src/efa_tp_def.c \ prov/efa/src/efa_base_ep.c \ prov/efa/src/efa_prov.c \ prov/efa/src/efa_env.c \ prov/efa/src/efa_cntr.c \ prov/efa/src/dgram/efa_dgram_ep.c \ prov/efa/src/dgram/efa_dgram_cq.c \ prov/efa/src/dgram/efa_dgram_msg.c \ prov/efa/src/dgram/efa_dgram_rma.c \ prov/efa/src/rdm/efa_rdm_peer.c \ prov/efa/src/rdm/efa_rdm_cq.c \ prov/efa/src/rdm/efa_rdm_ep_utils.c \ prov/efa/src/rdm/efa_rdm_ep_fiops.c \ prov/efa/src/rdm/efa_rdm_ep_progress.c \ prov/efa/src/rdm/efa_rdm_rma.c \ prov/efa/src/rdm/efa_rdm_msg.c \ prov/efa/src/rdm/efa_rdm_pke.c \ prov/efa/src/rdm/efa_rdm_pke_utils.c \ prov/efa/src/rdm/efa_rdm_pke_rtm.c \ prov/efa/src/rdm/efa_rdm_pke_rtr.c \ prov/efa/src/rdm/efa_rdm_pke_rtw.c \ prov/efa/src/rdm/efa_rdm_pke_rta.c \ prov/efa/src/rdm/efa_rdm_pke_req.c \ prov/efa/src/rdm/efa_rdm_pke_nonreq.c \ prov/efa/src/rdm/efa_rdm_pke_cmd.c \ prov/efa/src/rdm/efa_rdm_pkt_type.c \ prov/efa/src/rdm/efa_rdm_ope.c \ prov/efa/src/rdm/efa_rdm_rxe_map.c \ prov/efa/src/rdm/efa_rdm_atomic.c \ prov/efa/src/rdm/efa_rdm_tracepoint_def.c \ prov/efa/src/rdm/efa_rdm_srx.c \ prov/efa/src/rdm/efa_rdm_util.c _efa_headers = \ prov/efa/src/efa.h \ prov/efa/src/efa_av.h \ prov/efa/src/efa_mr.h \ prov/efa/src/efa_shm.h \ prov/efa/src/efa_hmem.h \ prov/efa/src/efa_device.h \ prov/efa/src/efa_domain.h \ prov/efa/src/efa_errno.h \ prov/efa/src/efa_user_info.h \ prov/efa/src/efa_prov_info.h \ prov/efa/src/efa_fork_support.h \ prov/efa/src/efa_cq.h \ prov/efa/src/efa_cntr.h \ prov/efa/src/efa_base_ep.h \ prov/efa/src/efa_tp_def.h \ prov/efa/src/efa_tp.h \ prov/efa/src/efa_prov.h \ prov/efa/src/efa_env.h \ prov/efa/src/fi_ext_efa.h \ prov/efa/src/dgram/efa_dgram_ep.h \ prov/efa/src/dgram/efa_dgram_cq.h \ prov/efa/src/rdm/efa_rdm_peer.h \ prov/efa/src/rdm/efa_rdm_cq.h \ prov/efa/src/rdm/efa_rdm_ep.h \ prov/efa/src/rdm/efa_rdm_rma.h \ prov/efa/src/rdm/efa_rdm_msg.h \ prov/efa/src/rdm/efa_rdm_pke.h \ prov/efa/src/rdm/efa_rdm_pke_utils.h \ prov/efa/src/rdm/efa_rdm_pke_req.h \ prov/efa/src/rdm/efa_rdm_pke_rtm.h \ prov/efa/src/rdm/efa_rdm_pke_rtr.h \ prov/efa/src/rdm/efa_rdm_pke_rtw.h \ prov/efa/src/rdm/efa_rdm_pke_rta.h \ prov/efa/src/rdm/efa_rdm_pke_nonreq.h \ prov/efa/src/rdm/efa_rdm_pke_cmd.h \ prov/efa/src/rdm/efa_rdm_pkt_type.h \ prov/efa/src/rdm/efa_rdm_atomic.h \ prov/efa/src/rdm/efa_rdm_ope.h \ prov/efa/src/rdm/efa_rdm_rxe_map.h \ prov/efa/src/rdm/efa_rdm_protocol.h \ prov/efa/src/rdm/efa_rdm_tracepoint_def.h \ prov/efa/src/rdm/efa_rdm_tracepoint.h \ prov/efa/src/rdm/efa_rdm_srx.h \ prov/efa/src/rdm/efa_rdm_util.h if HAVE_LTTNG efa_LDFLAGS += -llttng-ust endif HAVE_LTTNG if ENABLE_EFA_UNIT_TEST noinst_PROGRAMS += prov/efa/test/efa_unit_test TESTS += prov/efa/test/efa_unit_test nodist_prov_efa_test_efa_unit_test_SOURCES = \ prov/efa/test/efa_unit_tests.h \ prov/efa/test/efa_unit_tests.c \ prov/efa/test/efa_unit_test_mocks.c \ prov/efa/test/efa_unit_test_common.c \ prov/efa/test/efa_unit_test_domain.c \ prov/efa/test/efa_unit_test_ep.c \ prov/efa/test/efa_unit_test_av.c \ prov/efa/test/efa_unit_test_cq.c \ prov/efa/test/efa_unit_test_cntr.c \ prov/efa/test/efa_unit_test_device.c \ prov/efa/test/efa_unit_test_info.c \ prov/efa/test/efa_unit_test_hmem.c \ prov/efa/test/efa_unit_test_srx.c \ prov/efa/test/efa_unit_test_rnr.c \ prov/efa/test/efa_unit_test_ope.c \ prov/efa/test/efa_unit_test_send.c \ prov/efa/test/efa_unit_test_fork_support.c \ prov/efa/test/efa_unit_test_runt.c efa_CPPFLAGS += -I$(top_srcdir)/include -I$(top_srcdir)/prov/efa/test $(cmocka_CPPFLAGS) prov_efa_test_efa_unit_test_CPPFLAGS = $(efa_CPPFLAGS) prov_efa_test_efa_unit_test_LDADD = $(cmocka_LIBS) $(linkback) prov_efa_test_efa_unit_test_LDFLAGS = $(cmocka_rpath) $(efa_LDFLAGS) $(cmocka_LDFLAGS) \ -Wl,--wrap=ibv_create_ah \ -Wl,--wrap=ibv_is_fork_initialized \ -Wl,--wrap=efadv_query_device \ -Wl,--wrap=ofi_copy_from_hmem_iov if HAVE_EFADV_CQ_EX prov_efa_test_efa_unit_test_LDFLAGS += -Wl,--wrap=efadv_create_cq endif HAVE_EFADV_CQ_EX if HAVE_NEURON prov_efa_test_efa_unit_test_LDFLAGS += -Wl,--wrap=neuron_alloc endif HAVE_NEURON if HAVE_EFADV_QUERY_MR prov_efa_test_efa_unit_test_LDFLAGS += -Wl,--wrap=efadv_query_mr endif HAVE_EFADV_QUERY_MR if HAVE_EFA_DATA_IN_ORDER_ALIGNED_128_BYTES prov_efa_test_efa_unit_test_LDFLAGS += -Wl,--wrap=ibv_query_qp_data_in_order endif prov_efa_test_efa_unit_test_LIBS = $(efa_LIBS) $(linkback) endif ENABLE_EFA_UNIT_TEST efa_CPPFLAGS += \ -I$(top_srcdir)/prov/efa/src/ \ -I$(top_srcdir)/prov/efa/src/dgram/ \ -I$(top_srcdir)/prov/efa/src/rdm/ rdmainclude_HEADERS += \ prov/efa/src/fi_ext_efa.h if HAVE_EFA_DL pkglib_LTLIBRARIES += libefa-fi.la libefa_fi_la_SOURCES = $(_efa_files) $(_efa_headers) $(common_srcs) libefa_fi_la_CPPFLAGS = $(AM_CPPFLAGS) $(efa_CPPFLAGS) libefa_fi_la_LDFLAGS = \ -module -avoid-version -shared -export-dynamic $(efa_LDFLAGS) libefa_fi_la_LIBADD = $(linkback) $(efa_LIBS) libefa_fi_la_DEPENDENCIES = $(linkback) else !HAVE_EFA_DL src_libfabric_la_SOURCES += $(_efa_files) $(_efa_headers) src_libfabric_la_CPPFLAGS += $(efa_CPPFLAGS) src_libfabric_la_LDFLAGS += $(efa_LDFLAGS) src_libfabric_la_LIBADD += $(efa_LIBS) endif !HAVE_EFA_DL prov_install_man_pages += man/man7/fi_efa.7 endif HAVE_EFA efa-doxygen: doxygen prov/efa/docs/Doxyfile prov_dist_man_pages += man/man7/fi_efa.7