Age | Commit message (Collapse) | Author |
|
The timer API can have nothing common with CPU cycles or time API.
Thus timer test shouldn't print conversion cycles/ns table.
More correct to print conversion table for timer ticks/ns.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
After open pktio remains stopped. Inside worker thread (after all
configuration done it should be started.) In that patch I just start
it everywhere to keep original logic and be easy for review. Putting
it inside worker threads will require thread arguments change and
understanding logic of current app. It's better to do further changes
in separate patches per app.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
|
|
Signed-off-by: Balakrishna.Garapati <balakrishna.garapati@linaro.org>
Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Balakrishna.Garapati <balakrishna.garapati@linaro.org>
Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
|
|
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Reviewed-and-Tested-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
example/timer/odp_timer_test.c
|
|
When the string containing the number of packets processed by one of the
queues gets for be longer than a tab the alignment is messed up and the
fields overlap with part of a previous value.
Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
In case if for some reason one of the TMOs was lost, the test will
be polling forever in order to take it and delete. It can be used to
indicate that event was lost. Just abort the test if it cannot receive
one of the "last" TMOs for some period.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Current implementation has at least two races that lead to several issues:
- gbls->remain can overflow. One thread can decrement remain counter to 0.
While another can decrement it once again and it will be > 0. After
what some thread will loop very long time ...
- Several threads can terminate the same timer and as result the same
event. After out from the main loop a thread terminates a last timer it
used. But a last timer saved in ttp for a thread can be received in
another thread. So after leaving the main loop two threads can hold the
same timer.
- Some timer cannot be freed as several threads try to delete the same
timer, as result one of the timer/tmo stay not freed after termination.
- The test can send more events that requested. The receiving of requested
number of tmos doesn't mean the test sent the same number. It rather sent
more.
This patch is intended to fix above drawbacks.
The termination path must follow the next things:
- An event can be in the following places: in a timer (waiting to be
scheduled), in a queue for a thread to be scheduled, received in the
main loop.
- An event "holds" a timer, so when we receive an event we can delete it's
timer.
- a thread cannot delete timer w/o an event as it doesn't know who is
owner of the event (and obvious the timer).
- a thread shouldn't send events more than requested.
- all threads have to be "held" in the loop till a last received event.
The scheduler can assign event for any of the threads, so one thread can
receive two last events for example.
According to above, added several improvements:
- don't send more timeouts that supposed to receive
- free timer and tmo for a last received tmos = num of threads.
- leave the main loop only if a last tmo/timer is free.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Fixes: https://bugs.linaro.org/show_bug.cgi?id=1722
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Balakrishna.Garapati <balakrishna.garapati@linaro.org>
Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
helper/test/odp_chksum.c
include/odp/api/init.h
platform/linux-generic/include/odp/plat/thrmask_types.h
test/validation/cpumask/cpumask.h
|
|
Instructions should include adding static ARP entry as per the
instructions for the other end of the tunnel on line #138.
Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Fixes: https://bugs.linaro.org/show_bug.cgi?id=1512
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch updates IPSEC application to create proper
Pktin queues in poll mode of operation.
PKTIN queue is created as polled queues if no scheduling
parameters is passed to queue create API.
Signed-off-by: Nikhil Agarwal <nikhil.agarwal@freescale.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The linux specific helper was replaced by default cpumask
calls (odp_cpumask_def_worker()) in the cpumask API.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Christophe Milard <christophe.milard@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
helper/linux.c
|
|
User needs to select the thread type (worker or control) of
the initialized thread. Implementation may reserve HW direct access
only to worker threads, while control threads share HW access, etc.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
helper/linux.c
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch removes the 2nd parameter to odp_pool_create() because it has two
major issues:
1. Applications have no way to know how big a shm area is required for a given
pool since that information is implementation specific. So there's no portable
means of using this parameter.
2. Some implementations (e.g., odp-dpdk) cannot accept an external memory area
for pool creation since they need to control the memory themselves.
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
test/validation/pktio/pktio.c
test/validation/pool/pool.c
helper/test/odp_chksum.c
|
|
|
|
If the packet sumbitted for cyprto operation returns back to
other thread before pre crypto thread has completed
processing, ctx will has old state hence packet will be
re-submitted for crypto operation.
To fix this issue, update the ctx state before packet
submission.
Signed-off-by: Nikhil Agarwal <nikhil.agarwal@freescale.com>
Reviewed-by: Steve Kordus <skordus@cisco.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_pktio_send() can return -1 error and that return code
can be used as array index in code bellow. On error just
increase drop counter and free packets.
https://bugs.linaro.org/show_bug.cgi?id=1688
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofe@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
include/odp/api/packet_io.h
platform/linux-generic/include/odp_packet_io_internal.h
platform/linux-generic/odp_packet_io.c
|
|
Unsent packet has to be released. If the event type is obvious from the
context, use directly the relevant release functions, otherwise
odp_event(free).
Wider error handling is attempted, but this patch can't fix all the flaws
in the many calling functions of odp_queue_enq()
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@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>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Balakrishna.Garapati <balakrishna.garapati@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
platform/linux-generic/Makefile.am
|
|
Remove the need to build helper source files into the linux-generic
library by converting helpers to be their own library.
This removes the need for all other platforms to also build in the
helpers which are optional just to run the tests.
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-by: Christophe Milard <christophe.milard@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
User should care which group of thread will process events
from a queue. Removed default group and use all threads
group instead.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-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: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Unsent packet has to be released. If the event type is obvious from the
context, use directly the relevant release functions, otherwise
odp_event(free).
Wider error handling is attempted, but this patch can't fix all the flaws
in the many calling functions of odp_queue_enq()
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Instead of converting types let odp_event_free() to do the right thing.
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Zoltan Kiss <zoltan.kiss@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>
Conflicts:
helper/linux.c
test/validation/pool/pool.c
|
|
Add $(EXEEXT) to all binary generated so platform can easily configure
the binaries extension and use the LOG_COMPILER features of automake.
This should have no visible effect unless EXEEXT is set by the configure
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Acked-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
test/validation/pktio/pktio.c
|
|
Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
User needs to select the thread type (worker or control) of
the initialized thread. Implementation may reserve HW direct access
only to worker threads, while control threads share HW access, etc.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The linux specific helper was replaced by default cpumask
calls (odp_cpumask_def_worker()) in the cpumask API.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Christophe Milard <christophe.milard@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch removes the 2nd parameter to odp_pool_create() because it has two
major issues:
1. Applications have no way to know how big a shm area is required for a given
pool since that information is implementation specific. So there's no portable
means of using this parameter.
2. Some implementations (e.g., odp-dpdk) cannot accept an external memory area
for pool creation since they need to control the memory themselves.
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
|
|
Tunnel mode is enabled from the command line using -t argument with
the following format: SrcIP:DstIP:TunnelSrcIP:TunnelDstIP.
SrcIP - cleartext packet source IP
DstIP - cleartext packet destination IP
TunnelSrcIP - tunnel source IP
TunnelDstIP - tunnel destination IP
The outbound packets matching SrcIP:DstIP will be encapsulated
in a TunnelSrcIP:TunnelDstIP IPSec tunnel (AH/ESP/AH+ESP)
if a matching outbound SA is determined (as for transport mode).
For inbound packets each entry in the IPSec cache is matched
for the cleartext addresses, as in the transport mode (SrcIP:DstIP)
and then for the tunnel addresses (TunnelSrcIP:TunnelDstIP)
in case cleartext addresses didn't match. After authentication and
decryption tunneled packets are verified against the tunnel entry
(packets came in from the expected tunnel).
Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
Reviewed-by: Steve Kordus <skordus@cisco.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|