Age | Commit message (Collapse) | Author |
|
Change the type of tm_system_s.is_idle to odp_atomic_u32_t in order to
avoid a data race reported by GCC thread sanitizer.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
Update all implementation files to use the new shorter copyright format:
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) <YEAR> <COPYRIGHT HOLDER>
*/
Inherited DPDK copyright messages have also been updated to utilize SPDX
format and now list the original source files.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
|
|
Don't include odp_api.h header inside the implementation files as it
unnecessarily includes all API headers. The remaining includes have been
cleaned up and grouped.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
tm_queue_obj contains an instance of odp_queue_t but the ODP queue is
not used for anything. The queue seems to be a leftover from very early
revisions and has been unused since 0d6d0923b. Remove the queue and
associated code.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
|
|
Add implementation for the new odp_tm_queue_stats() function.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Add support for unordered enqueue and enq multi API.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
|
|
The previous implementation used a simple counter for internal
tm_queue_obj_t indices. If an application creates and destroys TM queues
dynamically the implementation would eventually run out of valid object
indices. Fix this by using _odp_int_pkt_queue_t as index.
Fixes: https://github.com/OpenDataPlane/odp/issues/981
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Use odp_queue_t as internal queue handle. This simplifies internal
queue interface as intermediate type (void *q_int) and additional
conversions (from_ext() and to_ext()) are not needed. Queue handle
stores pointer to queue entry as before. Conversion is a simple cast
(nop as an inline function) for both queue implementations.
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>
|
|
Implementation internal (queue) references are pointers. Remove
additional (abstract) type from queue interface. Other modules
use void pointer as (abstract) queue reference. Abstract type
added complexity and confusion, as queue handles had three
different formats API handle, internal abstract type and
queue structure pointer.
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>
|
|
odp_internal.h contained code for three different purposes. Split
file into three different headers, so that it's no more a place
for random type/function prototype additions.
New files are:
* odp_init_internal.h which holds global/local init function
prototypes
* odp_global_data.h which defines global data structure
* odp_sysinfo_internal.h which contains system info internal
function prototypes
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>
|
|
Using simple commands:
find . -not -path .git -type f -exec \
sed -i -E 's/ (201[0-9]), Linaro/ \1-2018, Linaro/g' {} +
find . -not -path .git -type f -exec \
sed -i -E 's/ (201[0-9])(-201[0-9]), Linaro/ \1-2018, Linaro/g' {} +
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
|
|
Gather macros needed for upcoming mediated devices in one location.
Fix signed vs. unsigned comparisons caused by incorrect MIN / MAX usage.
Signed-off-by: Mykyta Iziumtsev <mykyta.iziumtsev@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Created abstract queue type. Queue APIs and functions towards the
internal components are converted into function pointers.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
|
|
since tm thread is handling tm group, move the thread based
barrier to tm group. otherwise, packet cannot get into the
second tm system in the same group.
Signed-off-by: Xuelin Shi <forrest.shi@linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
These changes add a new concept called the tm_system_group. This new
entity collects together a set of tm_systems that all share some
common resources - eg. share the service thread.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Replaces pktio interface as input to TM system instead of
odp_pktout_queue_t.This creates an 1 to 1 mapping between a TM system
and pktio interface.
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Resolved a valgrind issue by adding pthread_join and pthread_attr_destroy
calls when destroying a tm_system.
Also resolve a todo by removing some code that was being #if'd out.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Removed INVALID_PKT define and used directly ODP_PACKET_INVALID,
which makes it easier to e.g. grep for invalid packets over entire
implementation.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
TM code used zero as the invalid packet handle value. Use
ODP_PACKET_INVALID instead, which currently has a non-zero
value. This mismatch caused bugs when packet handle value was
zero (first packet from pool 0).
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Completed the implementation of the free_dynamic_tbl_entry() function.
This required the addition of the num_freed field to the dynamic_tbl_t
record type.
Added code to free the root_node and the queue_num_tbl inside of
tm_system_free().
Added numerous checks to handle the case of a tm_queue being destroyed
and hence removed from the queue_num_tbl in the short time from when
the queue_obj was obtained and used. Also hardened the input_work_queue
from this same sort of issue by storing the queue_num instead of the
queue_obj in the input_work_item_t record type.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Fixed some coverity warnings. Changed all 32-bit atomic variables to
be 64 bit. Add PRIu64 and PRIX64 macros and other 32-bit platform
fixes. Changed timer_wheel API to use uint64_t for user data instead
of void *, which makes it easier to support 32-bit platforms.
Added code to affinitize the tm_thread as well as the main thread.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch adds a new marking_colors_supported and marking_colors_needed
arrays. Also splits the TOS marking function - which previously could
specify ECN or DSCP marking into two separate calls. Also improved the
documentation.
Also this patch updates the linux-generic odp_traffic_mngr.c
implementation to this latest API. In addition a few bugs were fixed
in the marking implementations.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Normally we would split this into four separate parts, but because they
are interdependent, they need to be in the same patch for bisectability.
API changes:
1) Add VLAN and IP TOS marking functions.
2) Added the requirements and capabilities architecture.
Added separate record types for describing ODP application
requirements vs TM implementation capabilities. This also involved
adding per level requirements and capabilities.
3) Egress parameters are now separate from the requirements
4) Doxygen formatting cleanup.
5) Added _destroy functions for all of the profiles.
6) Added odp_tm_node_disconnect and odp_tm_queue_disconnect fcns.
7) Added odp_tm_node_info, odp_tm_queue_info and odp_tm_node_fanin_info
functions and associated record types.
8) Removed the odp_tm_periodic_update fcn.
linux-generic implementation changes:
Only changes were implementing the new and revised API changes.
validation test changes:
1) Replaced the printf with test_debug.h LOG_ERR.
2) Added a lot more LOG_ERR calls for debugging - especially for
errors in test termination code.
3) Changed create_tm_system to use the new capabilities and
requirements API architecture.
4) Added lots of code to destroy tm_queues, tm_nodes and profiles.
example changes:
1) Changed create_tm_system to use the new capabilities and
requirements API architecture.
2) Renamed Kbps and Mbps to KBPS MBPS.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Barry Spinney <spinney@ezchip.com>
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This is about making the current structure clearer so that other
interfaces can be added to ODP:
The ODP API specification (platform agnostic) is moved from
include/odp/api to include/odp/api/spec.
The ODP API platform definition (for linux generic) is moved from
platform/linux-generic/include/odp to
platform/linux-generic/include/odp/api
Include statements are adjusted accordinaly.
This patch has been done by a script which is given with the cover-letter
of this patch series.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Barry Spinney <spinney@ezchip.com>
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|