Age | Commit message (Collapse) | Author |
|
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Conflicts:
platform/linux-generic/odp_system_info.c
|
|
Allways use _GNU_SOURCE instead of various _POSIX_C_SOURCE
defines.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
|
|
This test example uses linux helper functions to schedule worker
threads in order to check global time monotony between the threads.
Each thread receives event from it's own queue, checks global time on
correctness, writes in the buffer new current global time,
chooses randomly next thread queue, sends event and waits on next
event on it's own queue. Using for each thread it's own queue guarantees
that event is read by not the same thread that sends it. When global time
source is correct the time received with event by a thread must be less
than read on the moment of receiving.
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch fixes the following problems:
- checksum computation for LE platforms
- checksum computation for packets having the UDP length not a
multiple of 2
- checksum computation in the test and the example applications
Signed-off-by: Grigore Ion <ion.grigore@freescale.com>
Reviewed-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch fixes the following problems:
- checksum computation for LE platforms
- checksum computation for packets having the UDP length not a
multiple of 2
- checksum computation in the test and the example applications
Signed-off-by: Grigore Ion <ion.grigore@freescale.com>
Reviewed-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Conflicts:
include/odp/api/crypto.h
platform/linux-generic/odp_init.c
|
|
create api
Implements odp_cls_cos_create() and odp_cls_cos_param_init() functions and
replace odp_cos_create() function with odp_cls_cos_create() in validation
and examples.
Class of service create function now takes pool, queue, drop policy and
name as input parameters.
Adds class of service parameter structure odp_cls_cos_param_t and
initialization function odp_cls_cos_param_init()
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-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>
|
|
The local time API is supposed to behave like wall time now,
so correct it in examples and tests.
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Adds packet pool to CoS using odp_cls_cos_pool_set() api.
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-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>
|
|
The exisiting helper routine only create the worker threads.
However there is a need to use the same for creating the control
thread as well. e.g. CLI thread.
Signed-off-by: Hemant Agrawal <Hemant@freescale.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
|
|
Fixes crash caused by queue param not being initialized.
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Fixes ipv4 address input format issue.
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>
|
|
It's required for linux-ks2 implementation.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
|
|
|
|
The period shouldn't be less than timer resolution. If it's less
there is no guarantee about timeout accuracy, it can be executed
right after setting it or after up to timer resolution timeout or
even be set late, in which case application will be stopped with
error. So it's better to warn user that timeout is less then
resolution instead of silence.
Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
format
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
It's more convenient to pass parameters in order, like t2 - t1,
when t2 is supposed to be more.
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>
|
|
Current time API supposes that frequency of counter is equal
to CPU frequency. But that's not always true, for instance,
in case if no access to CPU cycle counter, another hi-resolution
timer can be used, and it`s rate can be different from CPU
rate. There is no big difference in which cycles to measure
time, the better hi-resolution timer the better measurements.
So, unbind CPU cycle counter from time API by eliminating word
"cycle" as it's believed to be used with CPU.
Also add new opaque type for time odp_time_t, as it asks user to use
API and abstracts time from units. New odp_time_t requires several
additional API functions to be added:
odp_time_t odp_time_sum(odp_time_t t1, odp_time_t t2);
int odp_time_cmp(odp_time_t t1, odp_time_t t2);
uint64_t odp_time_to_u64(odp_time_t hdl);
Also added new definition that represents 0 ticks for time -
ODP_TIME_NULL. It can be used instead of odp_time_from_ns(0) for
comparison and initialization.
This patch changes only used time API, it doesn't change used var
names for simplicity.
This time API can be implemented with local timer counter, so
shouldn't be used between threads.
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>
Conflicts:
platform/linux-generic/odp_time.c
|
|
It's more accurate to compare ticks instead of ns in each
iteration, so calculate wait range before entering the loop.
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>
|
|
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Reviewed-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: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
In case of tunnel mode, while moving the ip_data- number
of bytes to be moved should be original ip_data_len plus
ip_header_len. Currently, ip_data pointer is adjusted but
ip_data_len is not updated for tunnel mode.
Also update for encrypt_len also does not need any check for
tunnel mode if we are updating the ip_data_len.
Also ip->tot_len is not used with proper endianness while
calculating encrypt_len.
Signed-off-by: Akhil Goyal <akhil.goyal@freescale.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The counters.seq counter is used to check if the configured number of
packets was processed. There is a race condition between the counter
incrementation time and its value testing time. If code is running on
multiple CPUs it is possible the application send more packets than
expected (with number of CPUs - 1). A separate counter must be used
for the processed packets.
Signed-off-by: Grigore Ion <ion.grigore@freescale.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Fixes build issue on arch where uint32_t != unsigned:
example/classifier/odp_classifier.c:694:8: error:
passing argument 3 of ‘parse_value’ from incompatible
pointer type [-Werror] &stats[policy_count].rule.val_sz);
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>
|
|
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Benoît Ganne <bganne@kalray.eu>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Checks return value of odp_cos_queue_set() and
odp_pktio_default_cos_set() functions.
Fixes: https://bugs.linaro.org/show_bug.cgi?id=1786
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>
|
|
Use full default word in api to make function
name more clear.
https://bugs.linaro.org/show_bug.cgi?id=1745
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
|
|
API name change from odp_cos_set_queue() to odp_cos_queue_set()
Fixes: https://bugs.linaro.org/show_bug.cgi?id=1711
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>
|
|
cos_name will overflow if args->if_name is long, so change the sprintf to
snprintf. For consistency the other uses of sprintf are also removed.
Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Pktio input mode of operation should be derived from
environment variable input instead of compile time flag.
Signed-off-by: Nikhil Agarwal <nikhil.agarwal@freescale.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Added new netmap pktio interface type which operates in the
same manner as the existing socket io interfaces. The code
is based on the odp-netmap branch.
Using netmap io requires netmap headers and loaded netmap
kernel module. Netmap can be installed from
https://github.com/luigirizzo/netmap. ODP netmap support is
enabled using --with-netmap-path=<netmap_dir> configuration
option.
If netmap kernel module is loaded when starting ODP
application netmap io will be used by default. If the module
is not found standard socket io is used. Netmap io can be
disabled with ODP_PKTIO_DISABLE_NETMAP environment variable.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-and-tested by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
The UDP checksum is computed in the CPU endianness. The returned result
must be converted to the BE ordering when it is used to update the UDP
checksum in a packet.
Signed-off-by: Grigore Ion <ion.grigore@freescale.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
default state of pktio interface after odp_pktio_open is
disabled. Need to enable the interface befaore using it.
Seems like it has been missed for burst mode.
Signed-off-by: Nikhil Agarwal <nikhil.agarwal@freescale.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
It's not correct to mix time API time and scheduler wait time,
used timers can have different rates. As in this example scheduler
is used only for polling till event, using wait time for scheduling
can be avoided at all. This patch replaces callback function on
function w/o wait time, and doesn't add any functional changes.
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>
|
|
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>
|