aboutsummaryrefslogtreecommitdiff
path: root/m4
AgeCommit message (Collapse)Author
2023-04-12test: ipsecfwd: build tester conditionallyTuomas Taipale
`odp_ipsecfwd` utilizes `libconfig` so build the tester only if the library is found. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2023-03-27m4: dpdk: handle trailing whitespace in DPDK_LIBSMatias Elo
Handle possible trailing whitespace (appears in CentOS 7 and Rocky Linux 8) in DPDK_LIBS. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-09-09configure: preserve CFLAGS and LDFLAGS when testing for pthreadJere Leppänen
Save and restore CFLAGS and LDFLAGS when testing for pthread. Otherwise the pthread options end up in the global flag variables, in addition to the AM_*FLAGS variables. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-09-09configure: use ODP_*FLAGS instead of *FLAGSJere Leppänen
Instead of setting CFLAGS (and CXXFLAGS, LDFLAGS) in configure, use ODP_CFLAGS instead. Then, in main level Makefile.inc, set AM_CFLAGS based on ODP_CFLAGS. Consequently, program_CFLAGS will work as intended. Also, don't do AC_SUBST([LIBS]). LIBS is handled automatically, since it's a preset variable. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2022-06-06doxygen: use correct API version numbersPetri Savolainen
Use ODP API and helper version numbers instead of linux-generic library version number in API documents. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2021-06-21linux-gen: dpdk: sync dpdk build changes from odp-dpdkMatias Elo
Sync DPDK build improvements from ODP-DPDK implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-03-25m4: odp_dpdk: add missing libm dependencyMatias Elo
DPDK PMD driver rte_pmd_octeontx2 has dependency to libm. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2021-03-19linux-gen: atomics: implement 128-bit operations using gcc builtinsMatias Elo
Add new implementation for the 128-bit atomic operations using GCC builtin atomics. This improves performance considerably compared to the basic lock-based implementation. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-09-08doc: fix doxygen warningsJerin Jacob
Fix doxygen warning due to invalid PAPER_TYPE value. Based on doxygen 1.8.20 documentation https://www.doxygen.nl/manual/config.html#cfg_paper_type 'a4wide' is not valid paper type. $ make doxygen-doc DXGEN doc/application-api-guide/Doxyfile warning: argument 'a4wide' for option PAPER_TYPE is not a valid enum value Using the default: a4! Signed-off-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-09-07build: re-format autoconf argument defaultsStanislaw Kardach
Make sure that all autoconf arguments defined by ODP use default value description similar to built-in arguments. That is: [default=<value>]. Also make sure that all arguments use AS_HELP_STRING for uniform text formatting. Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-09-07linux-gen: move plat specific m4 macrosStanislaw Kardach
scheduler and pcap are linux-generic specific m4 macros, therefore there's no need to keep them in the global scope. Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-08-26build: explicitly list dependency librariesStanislaw Kardach
Debian-based Linux distributions have introduced a while ago a very specific patch to libtool generation which disables libtool generating dependent libraries list to the linker (distribution libtool.m4 has link_all_deplibs forced to no). This causes issues when cross-compiling while using dependent libraries compiled and installed manually to non-sysroot location (see [1]). To reproduce the issue, one has to fetch a toolchain which does not contain pkg-config in it. Debian/Ubuntu aarch64 toolchains do contain version of that tool (aarch64-linux-gnu-pkg-config) which does not have the change in question. There are several solutions to fix this, however this patch opts for explicitly listing dependent libraries in examples and tests. It is done by adding the PLAT_DEP_LIBS variable which platform should fill with libraries that can be added from non-standard locations (such as libconfig and libcrypto for linux-generic). Additionally move the non-platform specific autoconf definitions prior to the platform's configure.m4 so that platforms may adapt to argument customizations passed by the user. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=297726 Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-07-02build: fix check for __atomic_compare_exchange_nKrzysztof Kanas
Current function checker syntax is broken which always results in check failing. When that is fixed the checker had to be updated with explicit function name as linking test falsely passed during check but failed in linking stage on some cross-compilers. Signed-off-by: Krzysztof Kanas <kkanas@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-05-20linux-gen: verify default configuration file versionMatias Elo
Compare configuration file version to the version defined in m4 file. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-05-20linux-gen: add configure option for setting path to the default config fileMatias Elo
Add '--with-config-file=FILE' configuration option for setting path to the default configuration file. The default configuration file has to include all configuration options. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Suggested-by: Mikko Kurikka <mikko.kurikka@nokia.com>
2020-02-26build: check if libatomic is needed for __atomic_compare_exchange_nMatias Elo
Double wide __atomic_compare_exchange_n() is required by ipfragreass example. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-10-07linux-gen: rename implementation internal autoheader definesMatias Elo
Rename implementation internal defines so that they stand out from the API defines. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-10-07linux-gen: rename ODP implementation internal configure definesMatias Elo
Rename implementation internal defines so that they stand out from the autoheader defines. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-08-16linux-dpdk: improve dpdk linkingMatias Elo
Link whole dpdk library with 'whole-archive' flags instead of linking each driver individually. Adds missing mlx5 driver dependency. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-05-28configure: add option to disable pcap pktio supportMatias Elo
Add '--without-pcap' option to explicitly build ODP without PCAP pktio regardless of if the library is available on the build host. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Suggested-by: Risto Reittinen <risto.teittinen@nokia-bell-labs.com>
2019-04-16build: support platforms that do not use configDmitry Eremin-Solenikov
Support platforms that do not use config file. Signed-off-by: Dmitry Eremin-Solenikov <deremin-solenikov@cavium.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <Stanislaw.Kardach@cavium.com>
2019-03-18m4: fix ODP_PTHREAD definitionDmitry Eremin-Solenikov
AC_SUBST PTHREAD_CFLAGS/_LIBS variables inside ODP_PTHREAD macro definition, so they get properly substituted when compiling. Signed-off-by: Dmitry Eremin-Solenikov <deremin-solenikov@cavium.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-01-26build: provide PKG_CHECK_MODULES_STATIC implementationDmitry Eremin-Solenikov
Older pkgconfig.m4 did not provide necessary macro, so let's provide it on our own. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2019-01-26build: support detection of DPDK through pkg-configDmitry Eremin-Solenikov
Debian/Ububtu have changed the way DPDK is packaged starting from DPDK 18.11. They have stopped providing single libdpdk.a/libdpdk.so scripts, which we used to detect libdpdk. So, let's support detecting DPDK via pkg-config mechanism. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2019-01-26m4: move -lnuma detection to global fileDmitry Eremin-Solenikov
Move -lnuma detection to global m4 file. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-12-18linux-gen: dpdk: fix build with no pmd driversMatias Elo
Match pattern was added to DPDK_PMDS if no pmd drivers were found. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-10-24m4: update ax_prog_doxygen.m4 to latest versionDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-08-29m4: odp_dpdk: pass CFLAGS and LDFLAGS to CC when locating libdpdk.soDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-06-21configure: m4: simplify pthread detectionMaxim Uvarov
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-06-21configure: do not use GPL AX_CHECK_COMPILE_FLAGMaxim Uvarov
remove dependency of GPL AX_CHECK_COMPILE_FLAG macro. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-06-21configure: do check of -mcx16 more simpleMaxim Uvarov
do not use GPL ax_compiler_vendor.m4 from autotools inside out project. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-05-04build: odp_dpdk: add dependencies for crypto PMDsDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Matias Elo <matias.elo@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-03-30build: fix autoconf error caused by double-registering config itemDmitry Eremin-Solenikov
Autoconf uses provided tag as is, when registering config command. Require platform code to pass platform argument, so that different config commands will be registered. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-03-30build: don't use xxd to hexdump config fileDmitry Eremin-Solenikov
Use standard od and sed programs to hexdump config file, removing dependency on xxd. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-03-29build: another DPDK-linking fixDmitry Eremin-Solenikov
Try our best to link with DPDK, if we are doing static linking of examples and tests and we detected shared DPDK library. Build the list of static libraries, in hope they are present on the system (like in Debian/Ubuntu DPDK packages). Linking can still fail, as we have warned during configure time. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-03-29build: move odp scheduler setting to common m4 fileDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-03-22linux-gen: dpdk: bump supported dpdk version to v17.11Matias Elo
Bump supported DPDK version to LTS version 17.11. Also adds dependecies for optional Mellanox PMD drivers. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bogdan Pricope <bogdan.pricope@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-03-13odp_dpdk.m4: use correct installation directoryJosep Puigdemont
We are currently using the include path used when building DPDK, however when installing DPDK, the headers are put in ${prefix}/include/dpdk. We should use the latter in our include path. Signed-off-by: Josep Puigdemont <josep.puigdemont@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-03-13odp_dpdk.m4: check for DPDK static librariesJosep Puigdemont
Signed-off-by: Josep Puigdemont <josep.puigdemont@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-03-13configure: add check for 'xxd' toolMatias Elo
Add check for 'xxd' tool and list it in DEPENDENCIES file. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-03-06linux-gen: add runtime configuration fileMatias Elo
Enables changing ODP runtime configuration options by using an optional configuration file (libconfig). Path to the conf file is passed using environment variable ODP_CONF_FILE. If ODP_CONF_FILE or a particular option is not set, hardcoded default values are used instead. An template configuration file is provided in config/odp-linux.conf. Runtime configuration is initially used by DPDK pktio to set NIC options. Adds new dependency to libconfig library. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-19odp_dpdk.m4: fix detection of system librariesJosep Puigdemont
Signed-off-by: Josep Puigdemont <josep.puigdemont@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-02configure: move pthreads check to properly defined macroDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-02configure: add ODP_CHECK_CXXFLAGDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-02configure: move ODP_CHECK_CFLAG to separate fileDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-01-24build: odp_dpdk: print info on detected DPDK type and locationDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-01-24build: odp_dpdk: another fix for linking with shared libdpdkDmitry Eremin-Solenikov
Older toolchains won't include all shared objects from the group so file to DT_NEEDED section. So use --as-needed/--no-as-needed flags to control linking with DPDK PMD libs. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-01-15linux-gen: dpdk: simplify linking with shared libdpdkDmitry Eremin-Solenikov
There is no need to pass PMDs when linking with shared DPDK library. Just pass -ldpdk which will pick up all PMDS dynamically. When linking with static DPKD library it is required to pass additional libraries after whole PMD string to fix linking when Libtool will reorder flags. So provide just two variables DPDK_LIBS and DPDK_LIBS_LT. Former should be passed directly to gcc, while later should be passed to libtool. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-08linux-gen: add support for using system-wide DPDKDmitry Eremin-Solenikov
Support using distro-installed DPDK for Pkt I/O. Distributions (like Ubuntu, Debian, etc) start providing DPDK packages. It is wise to enable users to use distro-provided DPDK version rather than requiring to always compile it from sources. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com>
2017-12-08configure: separate common DPDK check to odp_dpdk.m4Dmitry Eremin-Solenikov
Separate DPDK macros to top-level file so that they can be reused by other implementations (like ODP-DPDK). Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com>