aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/m4
AgeCommit message (Collapse)Author
2021-05-26Merge tag 'v1.28.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2021-04-28Merge tag 'v1.27.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-03-31linux-dpdk: enable dynamic dpdk linkingMatias Elo
Enable dynamic DPDK linking using pkg-config. By default DPDK is linked statically. Dynamic linking can be enabled using with '--enable-dpdk-shared' configuration option. This option effects only when DPDK is found using pkg-config (system path or PKG_CONFIG_PATH). With DPDK v19.11 it is still recommended to use the legacy '--with-dpdk-path' method. Fixes: https://github.com/OpenDataPlane/odp-dpdk/issues/117 Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@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>
2021-03-12linux-gen: thread: read maximum number of threads from config fileJanne Peltonen
Add system:thread_count_max config parameter that can be used to reduce the maximum number of threads below the build time configured maximum. This can be used to reduce thread related resource consumption such as thread-local memory. Most code still uses the build time limit, ODP_THREAD_COUNT_MAX, so this change merely enables possible later optimizations in those cases. ODP-DPDK will already benefit from this change as the number of queue pairs for a crypto device can be lowered to match the actual number of threads without ODP-DPDK having worry about possible sharing of the queue pairs between threads. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-03-12linux-gen: pool: add maximum packet length config optionMatias Elo
Add configuration file option for the maximum packet data length in bytes. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-02-23helper: add CLI helper API and implementationJere Leppänen
CLI helper API allows starting and stopping ODP CLI server, which may be connected to using a telnet client. CLI commands may be used to get information from an ODP instance, for debugging purposes. This implementation depends on libcli. If libcli is not available, CLI helper is automatically excluded. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-02-05linux-gen: thread: read maximum number of threads from config fileJanne Peltonen
Add system:thread_count_max config parameter that can be used to reduce the maximum number of threads below the build time configured maximum. This can be used to reduce thread related resource consumption such as thread-local memory. Most code still uses the build time limit, ODP_THREAD_COUNT_MAX, so this change merely enables possible later optimizations in those cases. ODP-DPDK will already benefit from this change as the number of queue pairs for a crypto device can be lowered to match the actual number of threads without ODP-DPDK having worry about possible sharing of the queue pairs between threads. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-01-15linux-gen: pool: add maximum packet length config optionMatias Elo
Add configuration file option for the maximum packet data length in bytes. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-01-12Merge branch 'master' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2020-12-03example: cls: add application test scriptKiran Kumar K
Add test for the classifier example application. The test configures one PMR to match source IP addresses. The test traffic is read from a capture file using pcap pktio. The number of received packets is verified from both the target queue and default queue. Classifier example test is now run during 'make check'. Signed-off-by: Kiran Kumar K <kirankumark@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-11-30example: generator: use platform defined pktio_envSunil Kumar Kori
odp_generator uses hard coded null interface to validate functionality. Patch optimises it to use platform defined pktio_env. Signed-off-by: Sunil Kumar Kori <skori@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-10-20Merge branch 'master' of https://github.com/OpenDataPlane/odp into odp-dpdkMatias Elo
Signed-off-by: Matias Elo <matias.elo@nokia.com>
2020-10-14example: script: enhance application run scriptSunil Kumar Kori
Currently example applications uses pcap based pktio to validate the functionality on linux-generic platform during make check but other platforms may not be supporting pcap interfaces as pktio. So example application's run scripts are enhanced to use generic framework to define pktio interfaces and corresponding interface environment scripts are placed under platform implementation. Signed-off-by: Sunil Kumar Kori <skori@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-09-21build: fix build for linux-generic platformMatias Elo
Fix linux-generic platform build by isolating linux-dpdk specific build system modifications. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-09-15linux-gen: libconfig: use static platform name in configMatias Elo
Use static platform name instead of $with_platform variable. Fixes build in multiplatform repositories (e.g. odp-dpdk). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-09-07linux-gen: mark plat-specific config argumentsStanislaw Kardach
Ensure that configure arguments which are specific to a platform are marked in the help strings as linux-generic. Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-09-07build: fix spelling in autoconf argumentsStanislaw Kardach
Fix character case in ODP autoconf arguments. Most built-in autoconf arguments always start help text with lower case letter (with notable exception of --with-sysroot), therefore do the same. Additionally DPDK is spelled in lower case in the help text. Signed-off-by: Stanislaw Kardach <skardach@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-07build: prevent AM_CONDITIONAL checks on plat flagsStanislaw Kardach
AM_CONDITIONALS are expected by automake to be global. However we do have platform-specific conditionals. One way of working around that is to move all AM_CONDITIONAL statements to AC_CONFIG_COMMANDS_PRE phase. That preserves the confidional logic while eliminating the global check. Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-09-07build: add ability to emit platform config stateStanislaw Kardach
Every platform may now add its own configure status by appending to PLAT_CFG_TEXT autoconf variable. Note that since it is an autoconf variable, it should be appended by AS_VAR_APPEND. 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-09-07build: use more generic naming for PCAP PKTIO testStanislaw Kardach
PCAP pktio is a platform specific concept which is used throughout the examples and tests. Therefore rename it so that it's more clear that this flag is checking whether there is a PCAP pktio support rather than PCAP libraries available. Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-09-07build: move OpenSSL config to common configStanislaw Kardach
Autoconf configuration for OpenSSL is required for the IPSec example as well as for linux-generic internals. Therefore any other platform added will by extension require this code if it wants to compile the IPSec example. 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-06-23build: allow per-platform lib nameStanislaw Kardach
So far the build system (helper, examples, tests) expected that the ODP library is named libodp-linux. However that's only a recommended library name. Therefore move the library name specification to the platform automake files. More precisely platform has to define the following: 1. In configure.m4: ODP_LIB_NAME=<name> 2. In Makefile.am: lib_LTLIBRARIES += $(LIB)/lib<name>.la Where <name> is the library name. Please note that lib_LTLIBRARIES has to be explicitly named (cannot use ODP_LIB_NAME variable), otherwise automake will fail to generate compile target. Trying to perform a substitutions in it is only possible with full library name substitution (see [1]), however then all possible library names have to be defined in EXTRA_LTLIBRARIES which cannot contain substitutions. This would effectively replace one hard-coded place with another. [1] https://www.gnu.org/software/automake/manual/ html_node/Conditional-Libtool-Libraries.html Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2020-06-10linux-gen: use provided conf file for install and rebuildThomas Pansiot
When providing a conf file with "--with-config-file", - In case of change in this file, rebuild was not doing anything - In case of change in generic conf file, rebuild was using generic conf file instead of provided one to regenerate / rebuild - Generic conf file was installed Signed-off-by: Thomas Pansiot <thomas.pansiot@nokia.com> Reviewed-by: Matias Elo <matias.elo@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-05-20linux-gen: record default config file versionMatias Elo
Enables checking default configuration file version during configure phase. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-11-05linux-gen: ring: remove internal ring testMatias Elo
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-09-16linux-gen: remove mmap_vlan_ins testPetri Savolainen
Remove redundant test case for VLAN insertion feature, which was removed. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@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-01-26linux-gen: fix compiling dpdk pktio with ClangDmitry Eremin-Solenikov
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-11-29linux-gen: drop performance.m4Maxim Uvarov
performance.m4 which provides --enable-test-perf-proc is not needed now because process mode is tested with standard tests. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-and-tested-by Matias Elo <matias.elo@nokia.com>
2018-11-28linux-gen: remove performance test for process modeMaxim Uvarov
process mode tests run when process mode config is specified. Here it has to be dropped. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-11-09linuxgen: add dumpconfig utilityMaxim Uvarov
it might be useful to package small binary which prints platform default builtin config file. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-06-29linux-gen: support building ODP without libcrypto from OpenSSLDmitry Eremin-Solenikov
Closes https://github.com/Linaro/odp/issues/626 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-06-15linux-gen: hash: table based crc32 implementationPetri Savolainen
Remove dependency to zlib and use own table based implementation of crc32. The table was generated with odp_hash_crc_gen64() code (printed the table it generates internally). Signed-off-by: Petri Savolainen <petri.savolainen@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-06-11linux-gen: hash_crc32: crc32 implementation with zlibPetri Savolainen
Implement crc32 function with zlib. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-05-11odp: pktio: add pcapng capture capabilitiesIlias Apalodimas
Introduce new fast pcap capture interface to odp. How to test: sudo mkdir /var/run/odp/ start the ODP application sudo dd if=/var/run/odp/"pid"-ethX-flow-"queue" of=~/t.pcap Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-04-25linux-gen: dpdk: fix linking to libnumaDmitry Eremin-Solenikov
Linking to dpdk/numa can fail with the following message: /usr/bin/x86_64-linux-gnu-ld: lib/.libs/libodp-linux.a(dpdk.o): undefined reference to symbol 'numa_num_configured_nodes@@libnuma_1.2' //usr/lib/x86_64-linux-gnu/libnuma.so.1: error adding symbols: DSO missing from command line 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-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-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-07linux-gen: version: implementation name contentPetri Savolainen
Removed quotes from implementation name (from "odp-linux" to odp_linux). Added ODP_ prefix to name and build version macros. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@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-28example: generator: move script back to example directoryDmitry Eremin-Solenikov
Move script back to examples dir, so that platform other than linux-generic might be able to run this test/example, if they choose to implement null: PktIO type. 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-28linux-gen: schedule, queue: select scheduler/queue via environmentDmitry Eremin-Solenikov
Use ODP_SCHEDULER environment variable to select scheduler/queue implementation. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>