Age | Commit message (Collapse) | Author |
|
Add internal wrapper functions for socket based pktio devices for reading
extra pktio statistics. The wrapper functions call either ethtool or
sysfs implementations.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add internal functions for reading extra pktio statistics using Linux
sysfs. These functions can be used by multiple pktio devices.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add internal functions for reading extra pktio statistics using ethtool.
These functions can be used by multiple pktio devices.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add implementation level support for the new extra packet statistics APIs.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Implement the new odp_pktin_queue_stats()/odp_pktin_event_queue_stats() and
odp_pktout_queue_stats()/odp_pktout_event_queue_stats() functions.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Fill new odp_pktio_stats_capability_t capability for all pktio devices
supporting statistics counters.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Implemented the new debug print function for all three schedulers.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Add support for anti-replay windows of up to 4096 packets. Minimum window
size remains at 32 and uses the existing implementation. New code is used
for larger windows.
Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Implemented strict versions of local and global time stamp read
functions. Moved time register read code into inline functions
on ARMv8.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Enable success bytes reporting in IPsec stats.
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Format strings and parameters in ODP_LOG(), ODP_PRINT(), etc. calls
have not been cross-checked during compilation for some time due to
commit b776ca47c0d8 ("linux-generic: debug: use global fn ptr for
logging fn"). Enable this checking.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Fix mismatches between print formats and parameters in ODP_PRINT(),
ODP_DBG(), etc. calls.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
As per TM spec, when pktout mode is TM, pktout queue setup is not
called by user. Current TM implementation expects pktout queue to
be setup when egress is PKTIO. So add internal routine to trigger
pktout queue setup when odp_tm_create() is done with egress as PKTIO.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
In sync mode the dest_queue SA parameter should be ignored but the current
code looks at it to determine whether running in sync or async mode. This
can result in incorrect behavior or crash if an application touches the
dest_queue of a sync SA after odp_ipsec_sa_param_init(). Fix the problem
by clearing the internal dest_queue SA field in sync mode.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Change the mtu field of an SA to an atomic variable since it may get
modified and accessed simultaneously by different threads. Use relaxed
atomic operations as having a delay in the visibility of the updated MTU
is probably not a big problem.
Also, get rid of the unneeded SA use count increment and decrement
around the mtu field update. An ODP application may not call the function
if it is trying to destroy the SA at the same time.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Put free SAs in a freelist to get rid of linear search in SA creation.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Implement the odp_thread_set_log_fn() API function.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
In process mode the value of_odp_schedule_configured was not synchronized
to forked processes.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Increase max_segments capability to 64 segments. LSO implementation
does not have a limit, but is limited by number free packets
in the pool. Picked a large enough number that LSO capability
does not limit segmentation of a maximum size IP packet.
Increase max_payload_len capability to be closer to MTU. Subtract
min header size (only Ethernet header) from MTU, instead of the
maximum supported header size.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
On arm64 systems, the build fails with the --disable-host-optimization
compiler flag as it is unable to locate definitions of lockless APIs
used in atomic bit operations since these declarations are present in
arch/aarch64/odp_atomic.h files Consequently, the aarch64 specific code
has been moved to the arch-specific file while the reminder code has been
moved under the default linux-generic implementation.
Signed-off-by: Malvika Gupta <Malvika.Gupta@arm.com>
Reviewed-by: Govindarajan Mohandoss <govindarajan.mohandoss@arm.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Move architecture specific atomic function implementations to separate
header files. Enables 128-bit atomic function inlining.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Not all bits returned by _odp_random_openssl_test_data() are random,
depending on RAND_MAX. And OpenSSL doesn't seem to provide repeatable
random bits.
Remove _odp_random_openssl_test_data() and use
_odp_random_std_test_data() instead.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Make the maximum number of IPsec SAs 4000 or the maximum number
of crypto sessions, whichever is lower. Move the definition of the
compile time upper limit to odp_config_internal.h.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Rename the rest of the global symbols in the static library that do
not have the "_odp_" prefix.
Fixes: https://github.com/OpenDataPlane/odp/issues/805
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Implemented the new queue debug print function.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Align to API change of user pointer type.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Remove unused functions from atomic internal header.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Improve software checksum implementation and put it in a separate
header file so that it may be easily called from multiple places.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Implementation of odp_pktio_maxlen_set() for socket pktio.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add implementation for the new odp_pktio_maxlen_set() function.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Rename pktio_if_ops_t.mtu_get to maxlen_get to make naming consistent with
the API functions.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add support for IPv4 fragmentation (ODP_LSO_PROTO_IPV4)
to LSO implementation.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Implement new LSO functions.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Implement all packet metadata API for LSO usage except
odp_packet_lso_request(), which will be added to
odp_packet_io.c since it needs access to LSO profile.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Ensure that buffer and packet header sizes do not accidentally
grow to new cache lines when adding new struct fields. Removed
comments about data alignment as those may not be always valid
(e.g. 32 bit builds). Added debug prints for checking data
alignment on the same offsets.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Refactor build system to enable adding architecture specific hash function
implementations.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
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>
|
|
Packet print function used buffer_snprint, which assumed
that event type is buffer and printed an error on packets.
Re-implemented buffer and packet print functions to not
use buffer_snprint.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Rename some symbols that are global in the static library, in order to
avoid clashes with application code. The prefix "_odp_" is added to
the existing names.
This patch renames most of the global symbols, a few more still remain
to be renamed.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Implement new odp_pool_stats_reset() and odp_pool_stats() functions.
To minimize overhead, support for alloc_ops, free_ops, cache_alloc_ops, and
cache_free_ops counters can be disabled by setting CONFIG_POOL_STATISTICS
define (platform/linux-generic/include/odp_config_internal.h) to zero.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Add implementation internal functions ring_u32_len()/ring_ptr_len() for
reading currect ring lengths.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Implement odp_ipsec_sa_info() API.
Signed-off-by: Sachin Yaligar <syaligar@marvell.com>
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Add support for IPsec stats collection.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Enable application to transmit packet vectors using odp_queue_enq() and
odp_queue_enq_multi() calls. If the whole packet vector is not transmitted
successfully, the remaining packets in the vector are freed and the
out_discards counter is incremented accordingly
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
|
|
Since the removal of the iquery scheduler in 2018, the bitmap
implementation has been unused. Remove it.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Update odp_buffer_is_valid() to conform API spec change. Try to
avoid crash with corrupted buffer handles by checking that buffer
header pointer is on a valid range before accessing buffer header
fields.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
In case of IPsec packets, odp_packet_has_error() can be used to check parse
errors after IPsec processing. All IPsec errors/warnings need to be
checked using odp_ipsec_result().
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Enable creating packet vectors using classifier.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Copy classifier CoS index into packet headers. Required for generating
packet vectors.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Enable creating packet vectors using standard pktio. Using a timeout to
wait for incoming packets is not supported.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|