Age | Commit message (Collapse) | Author |
|
backport of: 373f97f8
Remove unnecessary limits for maximum RX/TX burst size.
Fixes: https://bugs.linaro.org/show_bug.cgi?id=3039
Signed-off-by: Matias Elo <matias.elo@nokia.com>
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>
|
|
Define the ODP API for cache line size to the cache line size defined
in the internal architecture directories. Prefix internal cache line
size identifier with '_odp'.
Signed-off-by: Brian Brooks <brian.brooks@linaro.org>
Reviewed-by: Christophe Milard <christophe.milard@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The ODP version of the _ring_create() routine does not use a socket_id
parameter, so remove the doxygen that refers to it to resolve Bug
https://bugs.linaro.org/show_bug.cgi?id=2413
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
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>
|
|
Remove all dependencies to helper by copying
protocol header definitions into linux-generic,
checked and decoupled all odph_* ODPH_* references.
Signed-off-by: Yi He <yi.he@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Removed C header includes which are not needed for API
definitions. ODP API depends on uint64_t, etc types in
stdint.h, but not other C headers. As an exception,
stdbool.h remains since 'true' and 'false' definitions
may be used with odp_bool_t. It could be also removed
later since true/false are not part of the API (where as
uint64_t, etc types).
Application needs to include other C library headers
directly. ODP API does not specify which headers are included
by odp_api.h.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Platform specific API files included endian.h and
asm/byteorder.h. These are Linux headers and should not be
visible to application through odp_api.h.
Used __ORDER_LITTLE_ENDIAN__, etc instead which are supported
by both gcc and clang.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Platform specific API files included sched.h for accessing
cpu_set_t. This is problematic since application may need to
include it also and possibly with GNU extension (with #define
_GNU_SOURCE). Application should be able to include odp_api.h
in any order relative to other headers, and with or without
any (e.g. GNU) extensions.
The odp_cpumask_t is defined with equal (or larger) size to
Linux cpu_set_t and this is verified with build time asserts.
Linux CPU_SET macros are used to access the mask as before.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2310 by copying the
user area as part of odp_packet_copy(). The copy fails if the user area
size of the destination pool is not large enough to hold the source packet
user area.
Reported-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Zoltan Kiss <zoltan.kiss@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>
|
|
Modify packet parser functions to utilize new
packet_parser_t structure.
Renamed the main parser function _odp_parse_common() to
packet_parse_common(). packet_parse_common() now takes
also segment length as argument.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Collect odp_packet_hdr_t members set by the packet parser
inside a common structure packet_parser_t.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added pktio_stop_finalize() and related STOP_PENDING and
CLOSE_PENDING pktio states. When a scheduled pktio interface is
stopped, it's moved into STOP_PENDING state until the scheduler
responses with a stop_finalize call. While stop is pending, interface
may be closed and thus moved into CLOSE_PENDING state.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Replaced pktio handle with pktio index in scheduler interface.
Indexes are used in implementation internal interfaces for
performance reasons.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Removed 'int taken', so that 'enum state' is the only
variable which holds pktio entry state. Added PKTIO_ prefix
for better name space protection and code readability.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Resolve bug https://bugs.linaro.org/show_bug.cgi?id=2316 by changing the
typedef of ODP_TIMEOUT_INVALID to be 0xffffffff to be consistent with other
buffer types. This enables pool 0 to be used as a timeout pool.
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added a new scheduler interface function, which may be used
to control empty queue scheduling. SP scheduler uses this
to ensure that empty queues are not stored into scheduler
queues.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added ordered enqueue functions to scheduler interface.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
And repurpose packet_set_len() for this, as it is no longer used.
This was introduced by the following commit, and break compatibility with
ODP-DPDK:
bd18047a "linux-gen: pktio: don't allocate new packets in classifier"
Signed-off-by: Zoltan Kiss <zoltan.kiss@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>
|
|
Bound default scheduler implementation API calls to
API structure.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added scheduler parameters into queue init scheduler interface
call.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added scheduler interface structure for API functions.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added global/local init and term functions to the scheduler
interface.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-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>
|
|
Don't allocate new packets inside of the internal
classifier helpers _odp_packet_cls_enq() and
_odp_packet_classifier(). Instead, save destination queue to
the parsed packet header and return correct packet pool.
This enables zero-copy packet classification.
Added new internal pktio helper pktin_recv_buf(), which
enqueues packets to classifier queues if necessary.
All pktio types use now a common cls_classify_packet()
helper function.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
RX/TX locks are moved inside pktio implementations and
pktios set packet header's input member.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Make room for more input flags.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Add _ring_destroy() to release shared memory allocated by
_ring_create() calls. previously this was accomplished by
manually odp_shm_lookup() and odp_shm_free().
Signed-off-by: Yi He <yi.he@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Head and tail indexes were missing volatile specifier, which
broke multi-producer and -consumer implementation.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Suggested-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Refer consistently to odp-linux as the implementation name.
Linux-generic is implementation internal directory name.
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>
|
|
Remove duplicate defines from odp_config_internal.h.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Removed last dependcies to queue and buffer internals from
schedule.c. Ordered queue implementation has still lots of
dependencies on both, but is now contained into a separate
source file to wait for clean up.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Share struct definition between schedule.c and schedule_order.c, so
that queue_entry_t references may be removed from schedule.c.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Renamed odp_schedule_internal.h to odp_schedule_if.h, since it
defines the interface. A new, truly internal header is needed for
the scheduler.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Moved ordered queue code from queue_internal.h and queue.c
into a new file. Ordered queue type is a scheduler feature but
the code contains lots of references to queue_entry_t. The code
needs a clear interface towards queues, but is first contained
into a separate file.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
First steps in decoupling scheduler from queue internal definitions.
Pass queue index instead of qentry pointer between queue and scheduler
modules. Heavy users of qentry struct (enq, deq and ordered queue code)
need more work and new interface functions to decouple.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Changed global config #defines into function calls and a scheduler
specific define (ORDERED_LOCKS_PER_QUEUE), which needs more work to
get rid off.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Break dependency between scheduler and thread id/mask code. Schedule
group data and implementation belong inside scheduler.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Break scheduler dependency on pktio internal definitions. Moved
pktio_poll function prototype into scheduler interface definition
in odp_schedule_internal.h.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Start an effort to extract scheduler interfaces (towards and from
the scheduler) into function pointer structures. When finished this
will enable multiple scheduler implementations and build / init time
selection of one.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
schedule_release_context() is internal to odp_schedule.c file.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Reported-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@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>
|
|
Add new function pointer 'print' to pktio_if_ops_t. This can
be used to print pktio type specific debug information.
In case of netmap, it is used to print the current RSS
configuration. rss_conf_print() output format was modified
to be in line with odp_pktio_print().
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>
|
|
Using memset to initialize struct odp_packet_hdr_t contents
to 0 has a significant overhead. Instead, initialize only
the required members of the struct.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Define ipc_addr_offset member of struct odp_buffer_hdr_t
only if ipc pktio is enabled to reduce struct size.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
There is no way to read payload_offset in the ODP API, so
don't save it.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_packet_hdr_t
There is no way to read vlan tags in the ODP API, so don't
save them.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|