Age | Commit message (Collapse) | Author |
|
Remove ipsec_offload application as it is mostly duplicate of
the ipsec_api application.
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
As part of -i option, interface name could be in PCI Domain Bus
Device Function (DBDF) format to represent the device. Application
will throw error during argument parsing as DBDF format itself
contains colon(:). So updating parsing logic to use comma(,) as a
separator instead of colon(:).
Also updating MAC address representation to use colons as colon
is no longer reserved for field separation.
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Use full memory barriers to forbid compiler and CPU to move
time samples apart. This improves accuracy of time to tick
conversions.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Write timeouts that arrive exactly also to the log. Diff_ns does
not need to be written as the log is initialized to zero.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Added -s option to select the clock source.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Maximum timeout can be short in periodic mode, as (after the
start delay) timeouts are requested to the next period.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Added -x option to control maximum timeout parameter. When zero,
maximum timeout is calculated from other options as before.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Bitwise operators shouldn't be applied to signed operands.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
The return value of odp_pktio_info() was never checked.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Print IPsec capabilities.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
pktio_env file was missing from gitignore.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Use the new odp_sys_config_print() and odp_system_info()
calls.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
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>
|
|
Added an option to check the number of received packets per CoS.
Using -C option, the minimum number of expected packets can be specified
for each CoS. On application close, the number of received packets on
each CoS will be compared to the expected values. If received packet
count is less than the expected value, the application will exit with
an error.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Fix missing timer pool start before allocating and setting timers.
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
|
|
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>
|
|
Fix help text for '--time' option and add missing verbose mode option.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add support for destination IPv4 address PMR term.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add support for destination MAC address PMR term.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add new command line option -P (--promisc_mode) for enabling promiscuous
mode for the pktio interface. Enabling promiscuous mode is required for
example when using ODP_PMR_DMAC PMRs.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Since odp_l3fwd does not use packet static or dynamic references,
set the hint in pktio config so that platform will optimize for
that case.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
As per new API spec, for pktio to generate checksum, it is mandatory
that application keeps L3 and L4 types in packet meta data valid
along with L3 and L4 offsets. So this patch updates the same.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Remove null pktio test which is linux-generic implementation specific.
Testing with this pktio type didn't provide much additional value anyway.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
During 'make distcheck' scripts are copied into distribution
directory twice. In first iteration scripts are successfully
copied into destination path with read/execute permission
and in second iteration build system throws permission error
because file already exist.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
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>
|
|
Rename ipsec application to ipsec_crypto to better distinguish it from
the ipsec api example.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Add README file to document application example usage.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
The application supports adding either AH or ESP header, not both.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
This application can be used to test various debug print
functions of ODP API. Debug functions to be called are
selected with command line options. E.g. -s option reserves
a SHM area and calls odp_shm_print() to print debug
information about it.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
It is often beneficial to run "make check" on a remote target platform.
However in order to run it, a full build-system has to be present which
may not be efficient or possible for embedded platforms.
Alternatively autotools offer a mechanism which may be used:
LOG_COMPILER environment variable. If specified, all test invocations
are prepended with its contents. This allows injecting a wrapper script
which will ensure the test is run remotely (i.e. through ssh).
Prior to that the binaries have to be transported to the remote system.
This cannot be done in the script itself as it has no knowledge on the
dependencies of the test program, only its path. Test could be relying
on some files stored in srcdir or builddir.
An issue exists that if ODP is built in out-of-tree method (builddir !=
srcdir), only the compiled test programs are copied to the builddir.
scripts and script data files remain in srcdir and wrapper script is
called with an absolute path to the script located in srcdir.
This would require to copy the srcdir to exactly the same path on the
target as on build host. This may alias with some paths already there.
To prevent this from happening add make target wrappers which copy
scripts and script data to build directory which allows the autotools
test harness to produce a proper wrapper script invocation with a
relative path and allows to only copy the builddir to the target to a
strictly controlled location.
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Fix typos and clarify intructions.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Previously, the application would close right away if no test streams were
created. A signal handler is added to close the application cleanly.
Fixes: https://github.com/OpenDataPlane/odp/issues/983
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Previously, the application would close right away if no test streams were
created. A signal handler is added to close the application cleanly.
Fixes: https://github.com/OpenDataPlane/odp/issues/983
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Honor the odp_pool_capability_t::buf.max_align attribute while
creating the pool.
Some implementation chooses to optimize odp_buffer_t handling in
such a way that implementation-specific metadata and actual
data can be in the same cache-line as a performance optimization
while accessing the odp_buffer_t.
As a fix, except helpers, let the application uses the default
alignment from odp_pool_param_init().
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
odp_pktio_info_t.name is uninitialized if odp_pktio_info() call fails.
Fixes GCC 10 LTO build error.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Use atomic flag variables when triggering thread exits from other threads.
This fixes the data races with the non-atomic flags and makes sure the
compiler will not optimize the flag polling away from the polling loops.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Previously, the IPSec example tests would pass in the CI even though the
tests were not properly run due to failures to allocate test input packets.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
The application tried to allocate packets of length zero, which is not
allowed by the API.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
GCC7.3 warns about uninitialized members of timer pool parameters.
Application should take care to ensure clean parameter initialization.
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
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>
|
|
This prevents multiple inclusion of libodp-linux during builds, once as
part of libodphelper and then directly by the application. This causes
problems when linking statically with LTO enabled. On tested compiler
(9.2.1-9ubuntu2) such duplication causes constructor symbols to be
defined multiple times. This means that constructors will be run
multiple times which leads to unexpected behavior.
To fix this, remove libodp from helper link list. This works when
compiling applications because there is no point in using libodphelper
without libodp-linux, therefore both libraries have to be provided.
After removing library order in example/Makefile.inc is required to
ensure the proper linking.
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Store an explicit pointer to the memory buffer used for holding interface
names and use it to free the buffer later. A static analyzer complained
about a leak since it did not see that the memory was still pointed to
by the first ifname returned by strtok().
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Do not try to store more interface names than what fits in the if_names
array. The code used to print a message about truncating the list of ports
but did not actually do it.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
If timer_ctx allocation fails, do not call destroy_timers(), which would
dereference it.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
In the existing application, -c is not honored, instead, it picks the
first available CPU from odp_cpumask_default_control().
https://github.com/OpenDataPlane/odp/pull/955 fixes the above-mentioned
problem, but hello world does not have to demonstrate CPU pinning,
instead it should demonstrate a minimum functionality application.
User can run the application with taskset command if it needs to run
on a particular CPU.
To simplify and fix the existing bug, this patch removes the -c option.
Also, it fixes a segfault issue if -n provided without any argument.
Suggested-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
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>
|