Age | Commit message (Collapse) | Author |
|
Renamed single_user pktio queue parameters to op_mode with
enumeration type. This is in line with event queue enq_ and
deq_mode parameters which are defined for the same purpose.
Also term "single" gives wrong impression since application
may use multiple threads but must itself synchronize those.
This enables op_mode extensions in the future (e.g. dedicated
single thread mode).
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 some multiqueue api type and function name, so
that those fit better on 80 char lines. Standardized packet
input side to use odp_pktin_ prefix and output side odp_pktout_
prefix.
odp_pktio_input_mode_t odp_pktin_mode_t
odp_pktio_output_mode_t odp_pktout_mode_t
odp_pktio_input_queue_param_t odp_pktin_queue_param_t
odp_pktio_output_queue_param_t odp_pktout_queue_param_t
odp_pktio_input_queues_config() odp_pktin_queue_config()
odp_pktio_output_queues_config() odp_pktout_queue_config()
odp_pktio_in_queues() odp_pktin_event_queue()
odp_pktio_pktin_queues() odp_pktin_queue()
odp_pktio_pktout_queues() odp_pktout_queue()
odp_pktio_input_queue_param_init() odp_pktin_queue_param_init()
odp_pktio_output_queue_param_init() odp_pktout_queue_param_init()
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>
|
|
Enqueue and dequeue mode parameters are needed to e.g. deny
direct dequeue operations on scheduled or packet output queues.
Additionally, application may inform implementation about
intended usage (e.g. will not enqueue into packet input queue)
and synchronization needs (application synchronizes enq/deq calls).
There is possibility to add modes later on. For example,
a dedicated, single thread mode could be added, which would pin
a queue (enq or deq end) to a dedicated thread.
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>
|
|
Switch timer to use SIGEV_THREAD_ID instead of SIGEV_THREAD.
I.e. do not start timer handle thread on each timer action.
Start timer handle manually and wait for signal there.
This patch also fixes nasty bug with hanging timer threads,
which wants to access to timer pool and free shm on pool
destroy action.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
|
|
This is a bug fix for netmat pktio MTU size. Valid packets
were being dropped in netmap_send() due to not taking into
account the ethernet header length.
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>
|
|
Added type into queue parameters structure, since the type
specifies other parameters usage (e.g. sched params must be
filled for SCHED queue type). It's also provides future proof
odp_queue_create(), etc function prototype definition.
Defined PLAIN as the default type, since it does not require
definition of any other queue params (e.g. sched params).
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>
|
|
Fixed odp_queue_type_t to be an enum. Type need to be fixed
so that it can be added as part of odp_queue_param_t.
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>
Conflicts:
platform/linux-generic/include/odp/plat/queue_types.h
|
|
Aligned pktin and pktout modes with renamed queue types in
the following way:
ODP_PKTIN_MODE_RECV to ODP_PKTIN_MODE_DIRECT
ODP_PKTIN_MODE_POLL to ODP_PKTIN_MODE_QUEUE
ODP_PKTIN_MODE_SCHED was not renamed
ODP_PKTOUT_MODE_SEND to ODP_PKTOUT_MODE_DIRECT
Direct pktio modes (_RECV/_SEND) are renamed to _DIRECT, which
is future proof to support additional direct calls for packet
input/output.
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>
|
|
Term "poll" does not describe queue type accurately. Many resources
can be polled. For example, application polls the scheduler to
dequeue from "sched" type queues. Term "plain queues" describe better
what these queues offer, a plain storage of events which application
can directly dequeue (instead of using 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>
|
|
In practice, this type of queues are referred as "parallel queues"
instead of "none queues". Also "none" type is quite pessimistic
term, since scheduler may perform lots of HW offload also in this mode.
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>
|
|
Implements Ethernet destination mac address verification
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
No code change.
Because we merged branches partially (with cherry-pick) odp_term_global
function placed in different offsets in file for master and api-next branch.
This patch aligns file in master branch with api-next.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Use multiqueue recv for poll type input queues.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Highlight that application must ensure that there's no
race while calling init functions. Also lock free call
will never set op.init flag, since init call will not need
to implement locking or other (lock free) synchronization.
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>
|
|
Memory compare is a commonly used C library function on
data plane applications. This enables using HW offload
(e.g. vector unit) for compare operations.
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>
|
|
Use full memory barrier from API instead of the internal
function.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Replace internal non-relaxed atomics with API calls. Timer and
spinlock were not converted since those use flags and 128 variables.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Implemented 64 bit non-relaxed atomic operations. Additional
ordering is not needed in case of using ATOMIC_OP since it
includes both acquire and release ordering.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Implemented 32bit cas_rel and cas_acq_rel calls.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Implemented 32 and 64 bit atomic exchange operations.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Now redundant with atomic, barrier and lock tests.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
No functionnal changes: just code reordering to match the ODP modules.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Rename release ordering from _rls_ to _rel_ since it matches
better with _acq_rel_, which is going to be used for C11
memory_order_acq_rel order.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Platforms may support some uint64 operations lock-free and
others not. For example, inc_64 can be natively supported but
cas_64 (or max_64/min_64) not. User may be able to switch to
32 bit variables when a 64 bit operation uses locks. The same
atomic operation struture could be used for platform init to guide
lock vs. lock-free implementation (e.g. if cas_64 is never
called, inc_64 can be lock-free).
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added 32 bit acquire load/cas and release store/add/sub calls.
These are the minimum set of non-relaxed calls that are needed
for building lock-free algorithms. 64 bit versions can be added
later.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added atomic min and max operations. These can be used e.g.
to maintain high and low water marks of an another atomic counter.
These use relaxed memory order.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added cas operations for 32 and 64 bit atomic variables. These
use relaxed memory order (as all other operations).
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The following types: uint16le_t, uint16be_t, uint32le_t, uint32be_t,
uint64le_t, uint64be_t, uint16sum_t, uint32sum_t defined in the api and
in platform/linux-generic/include/odp/plat/byteorder_types.h were not
odp_* prefixed and could create name clash with an applications.
This patch prefixes those with odp_*, suppressing "int" for shortness.
e.g. uint16le_t becomes odp_u16le_t
Also modifies files using these types, of course.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
For debug purposes, otherwise it's not trivial to figure out which pktio was
successful.
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added support for poll type input queues.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
All ODP API enums are typedef'd and type name has
a '_t' post-fix.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
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>
|
|
All ODP API enums are typedef'd and type name has
a '_t' post-fix.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
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>
|
|
Removed odp_spin() and replaced usage with odp_cpu_pause().
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>
Conflicts:
platform/linux-generic/Makefile.am
|
|
Implemented pause as an inline function in a cpu arch dependent
header file.
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>
Conflicts:
platform/linux-generic/Makefile.am
|
|
The legacy variable cpu_hz holds the max frequency for odp_cpu_hz_max(),
so rename it to cpu_hz_max for better meaning.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
In the default dummy function systemcpu(), only cpu_hz[0] and model_str[0]
are set to dummy values, then in the validation code if iterate each CPU,
cores other than core 0 report failure, this patchs pad all the arrays to
default values to pass validation.
For bug: https://bugs.linaro.org/show_bug.cgi?id=1870
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Reviewed-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
When per-CPU framework was introduced, it was only implemented on x86,
for other platforms, only the model_str[0] and cpu_hz[0] are set to pass
compile, this patch set all values for model_str[] and cpu_hz[] on the
PowerPC platform.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
When per-CPU framework was introduced, it was only implemented on x86,
for other platforms, only the model_str[0] and cpu_hz[0] are set to pass
compile, this patch set all values for model_str[] and cpu_hz[] on the
MIPS platform.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The values of cpu_arch_str were deleted due to codes reorganization, this
patch adds values to them again.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
All the CPU frequency API return value type is uint64_t, this patch makes
them return 0 on failure instead of -1.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch moves the PowerPC system info codes into the newly added PowerPC
specific platform file.
This patch also creates syslink to arch/linux/odp_cpu_cycles.c for PowerPC.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch moves the ARM system info codes into the general arch file,
ARM sysinfo isn't implemented now and there is no need to create specific
arch file for it, but this can serve as the default implementaton instead.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch moves the MIPS system info codes into the newly added MIPS
specific platform file.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch moves the x86 system info codes into the newly added x86
specific platform file.
Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
These arch depedent files are not limited to cpu_cycle
calls implementation only.
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>
|
|
ODP_PKTIO_ANY is defined in the API header but there's no description of
its intended use and it wouldn't make sense to pass it to the majority
of exisitng APIs that take odp_pktio_t handles.
It's not currently used anywhere, so remove it.
Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org>
|