Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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: Balakrishna.Garapati <balakrishna.garapati@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
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>
|
|
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: 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>
|
|
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>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Worker threads are created with odph_linux_pthread_create()
which calls odp_local_init() before entering the function.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
|
|
fixes https://bugs.linaro.org/show_bug.cgi?id=1534
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
use the odp_shared_memory allocater instead of global variables to enable
the timer example to run on baremetal/linux process execution environments
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
definition
This is combined commit of 4 following mailing list patches:
linux-generic: classification: remove odp_pmr_create_range() function implementation.
This patch removes the implementation of odp_pmr_create_range() function.
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>
api: classification: remove odp_pmr_create_range() function definition.
The support for a range based packet matching rule is not available in most of
the hardwares and hence this API is removed.
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>
validation: remove test case for odp_pmr_create_range() function
This patch removes the validation suite test case for odp_pmr_create_range() function.
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>
example: classifier: remove odp_pmr_create_range() support
This patch removes support for odp_pmr_create_range() function
in the classifier example application.
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
ODP Classifier example
This programs gets pmr rules as command-line parameter and configures the classification engine
in the system.
This initial version supports the following
* ODP_PMR_SIP_ADDR pmr term
* PMR term MATCH and RANGE type
* Multiple PMR rule can be set on a single pktio interface with different queues associated to each PMR rule
* Automatically configures a default queue and provides statistics for the same
* Prints statistics interms of the number of packets dispatched to each queue
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Fixes https://bugs.linaro.org/show_bug.cgi?id=1450
Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
If the examples are on the src path they pollute the documentation
with their own declarations.
The correct mechanism is to declare the examples to be seen in the
documentation in one location that is on the .dox path, and have the
EXAMPLE_PATH locate the actual example code.
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>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-and-tested-by: Mike Holmes <Mike.holmes@linaro.org>
|
|
Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
Reviewed-by: Robbie King <robking@cisco.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
Reviewed-by: Robbie King <robking@cisco.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Application should continue in case a packet context cannot be
allocated.
Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org>
Reviewed-by: Robbie King <robking@cisco.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Use ODP timer facility instead of POSIX sleep/nanosleep.
https://bugs.linaro.org/show_bug.cgi?id=1025
Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The odp_ipsec example leaks some strings allocated during parse_args.
https://bugs.linaro.org/show_bug.cgi?id=1117
CID 56899: Resource leak (RESOURCE_LEAK)
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The odp_ipsec example leaks some strings allocated during parse_args.
https://bugs.linaro.org/show_bug.cgi?id=1117
CID 56899: Resource leak (RESOURCE_LEAK)
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The odp_l2fwd example leaks some strings allocated during parse_args.
https://bugs.linaro.org/show_bug.cgi?id=1117
CID 56899: Resource leak (RESOURCE_LEAK)
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Current print in l2fwd is not useful with slow links and
also it's hard to say how fast does it work. Print pps
and packets drops.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-and-tested-by: Ciprian Barbu <ciprian.barbu@linaro.org>
|
|
Remove the old hack and switch to using the provided API
This also fixes https://bugs.linaro.org/show_bug.cgi?id=1330
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_packet examples has polling queues commented out with if 1.
Input queue (ODP_QUEUE_TYPE_PKTIN) is not attached to scheduler
but it make sense in example show that packets can be accessed
with polling queues also.
https://bugs.linaro.org/show_bug.cgi?id=301
Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Compilation of ODP v1.0 on OpenEmbedded failed due to
the following warning being treated as an error:
| In file included from /usr/include/stdlib.h:24:0,
| from odp/example/ipsec/odp_ipsec.c:16:
| /usr/include/features.h:148:3:
| error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated,
| use _DEFAULT_SOURCE" [-Werror=cpp]
| # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated,
| use _DEFAULT_SOURCE"
| ^
Modified the source 'example/ipsec/odp_ipsec.c' as recommended.
Change-Id: I3b8fb392611ea3ad35d17a9492637f44d7ca5d2c
Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_ipsec_stream.c:190:2: error: unknown type name ‘uint’
uint i;
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-and-tested-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-and-tested-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp_ipsec.c:233:15: error: storage size of ‘ifr’ isn’t known
struct ifreq ifr;
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-and-tested-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
./odp_ipsec_stream.h:27:2: error: unknown type name ‘uint’
uint length; /**< Packet payload length */
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-and-tested-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-and-tested-by: Maxim Uvarov <maxim.uvarov@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>
|