Age | Commit message (Collapse) | Author |
|
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
CI got following error:
pktio.c: In function 'pktio_test_recv_queue':
pktio.c:643:11: error: 'pktio[0]' may be used uninitialized
in this function [-Werror=maybe-uninitialized]
pktio_tx = pktio[0]
That can never happen due to num_ifaces always > 1 in our test.
Add special check for that to make new gcc happy.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Christophe Milard <christophe.milard@linaro.org>
|
|
odp_pktio_send_queue()
Add simple validation test for odp_pktio_recv_queue() and
odp_pktio_send_queue().
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>
|
|
Add validation test for odp_pktout_queue_config().
Uses also new odp_pktout_queue_param_init(),
odp_pktout_queue(), and odp_pktio_capability()
functions.
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>
|
|
Add validation tests for odp_pktin_queue_config() for
ODP_PKTIN_MODE_DIRECT, ODP_PKTIN_MODE_SCHED, and
ODP_PKTIN_MODE_QUEUE.
Uses also new odp_pktin_queue_param_init(),
odp_pktio_capability(), odp_pktin_event_queue(), and
odp_pktin_queue() functions.
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>
|
|
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>
|
|
There is no single OpenDataPlane product anymore, so pointing out to the
generic implementation instead.
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Reviewd-and-tested-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@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>
|
|
It's quite difficult to review code with 0 for skip and
something else for not skip tests. Define readable names
to make better code reading.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
From doc: "A return value of 0 meansinactive,
anything else is active.".
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Do not fail if odp_cpu_hz() returns 0, just skip the test.
Suggested-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Add missing validation test to resolve bug
https://bugs.linaro.org/show_bug.cgi?id=2017
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
As poll queue type was renamed, update variable names and
documentation accordingly.
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 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>
|
|
Setting ODP_QUEUE_TYPE_SCHED for in_mode is incorrect,
ODP_PKTIN_MODE_SCHED has to be used.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
Simplify ODP documentation builds by using .svg files directly for all
images. This eliminates the need to create .png and .eps files via the
imagemagic package. Note that this removes easy PDF output for ODP user
documents, however there is no real demand for such capability.
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>
|
|
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>
|
|
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>
|
|
Test atomic_op bit fields and odp_atomic_lock_free_u64().
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>
|
|
Synchronizers suite was split into atomic, lock and barrier
suites.
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>
|
|
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>
|
|
Added test for memory compare.
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>
|
|
Added poll queue mode (mode == 4), which uses poll type queues
for packet input. Configuration and functionality is very similar
to direct recv mode.
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>
|
|
Re-order functions to get rid off (static) function prototypes
and improve code readability.
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>
|
|
If pktio is in not promisc mode, a packet should contain correct
MAC address.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manohara@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
There is no big difference when to assign default CoS to pktio,
but in usual case it's done before creating any chain, if it's
needed to be checked it can be done in separate test.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manohara@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The classification tests should use supported l3 PMR where it's
not important. For validating concrete PMRs the separate test exists.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manohara@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Fixes:
https://bugs.linaro.org/show_bug.cgi?id=1541
https://bugs.linaro.org/show_bug.cgi?id=1834
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>
|
|
fixes: https://bugs.linaro.org/show_bug.cgi?id=1830
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>
|
|
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>
|
|
Added validation test for all operations with non-relaxed
memory model. Mainly testing that functions are available.
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 validation test for 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>
|
|
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>
|