Age | Commit message (Collapse) | Author |
|
Chksum routines updated to serarch l4 and udp flags
set in the packets. Because there is syntetic allocated
packet we need also set required bits.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
|
|
This patch adds a file called chksum.c which implements a complete
TCP/UDP over either IPv4 or IPV6 checksum generation / verification
capability. In addition it can deal with any form of packet segmentation
including tiny segments, segments not aligned to a 2 byte boundary, etc.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
This patch fixes a bug in parse_ipv6 caused because the IPv6 payload
length does not include the IPv6 header and a bug in parse_udp where
l4_offset was subtracted from l3_offset instead of the other way around.
Also fixed some bugs related to incorrect vlan_hdr_t. The corrected
vlan header then required some fixes to odp_classification.c and the
classifier validation test code. Also added ODPH_IPV6ADDR_LEN.
Finally made a number of cosmetic changes to satisfy checkpatch.
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Removed pool configuration API from config.h and moved to
use pool capability API instead.
Removed entire all config validation tests, since all config APIs
will move to various capability APIs.
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 packet copy functions:
* partial packet copy
* data copy data from another packet
* data copy within packet
* data move within packet (allow overlap)
Renamed copydata_in and _out functions, so that "to/from memory"
functions are clearly distinctive from the new packet copy
functions.
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>
|
|
Signed-off-by: Barry Spinney <spinney@mellanox.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Convert the formerly internal _ODP_STATIC_ASSERT() macro to be
a full ODP API named ODP_STATIC_ASSERT(). This provides
a wrapper around any platform-specific compile-time assertion
macro.
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>
|
|
Added opaque odp_instance_t handle for storing ODP
instance ID. Global init generates instance ID which
is used to identify an ODP instance in the system.
Instance ID allows to launch multiple separate ODP
applications (without name space clash). Application
threads define in odp_init_local() call which instance
they join. Simultaneously, a thread may belong to only
single instance and thus odp_term_local() call does not
need instance handle parameter. Currently, linux-generic
implementation supports only single instance.
Linux helper pthread and process create APIs were updated
with instance handle through a new type (odph_linux_thr_param_t).
Process API calls were missing thread type selection. A params
type decreases number of parameters needed (from 6 to 3 for
pthreads) and reduces need for future function prototype changes
(if e.g. new parameters need to be added).
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>
|
|
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Tested-and-reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Packaging require a shared object version number.
For now make it the same as libodp.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Rename to unify the library names for different implementations.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Rename to unify the library names for different implementations.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Prefixed were removed for validation test suite and to
be consistent we need to do the same for helpers.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odp.h actually describes the applicatiion interface of ODP and is
logicaly moved to odp_api.h.
Applications now includes <odp_api.h>.
This simplifies the addition of other ODP interfaces (e.g. drivers may
include odp_drv.h in the future.)
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Convert some of the examples and tests to use MAC and IPv4
address parse functions instead of implementing those multiple
times. There are still some examples to convert, but those would
require a bit more effort.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Juha-Matti Tilli <juha-matti.tilli@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Many helper files included ODP internal headers and defined
types or functions with odp_ prefix. A helper can be consider
as part of application - from ODP headers it may include only
odp.h and it must not define anything with odp_ prefix.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Juha-Matti Tilli <juha-matti.tilli@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
IPv4 address parse function is commonly needed by
test applications. A common parse function harmonizes the
definition IPv4 address as a command line parameter.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Juha-Matti Tilli <juha-matti.tilli@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Ethernet MAC address parse function is commonly needed by
test applications. A common parse function harmonizes the
definition of MAC address as a command line parameter.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Juha-Matti Tilli <juha-matti.tilli@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Remove ring and dead api-next code. In api-next pktio ipc patches
moved ring code to linux-generic and updated that test case to
the latest odp api. If we ipc pktio will be accepted to master
than current api-next ring test will be used.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by Mike Holmes <mike.holmes@linaro.org>
|
|
Copies are redundant since cpumask APIs are defined with
const specifier.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Use Linux cpu_set_t instead of odp_cpumask_t when passing cpus
to Linux system calls.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
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>
|
|
Deleted odph_pause() and replaced usage with odp_cpu_pause()
calls.
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>
|
|
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
|
|
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>
|
|
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>
|
|
This reverts commit 0043ff8f7dd86a0c1e143412ceb5a14c8ae9c727.
Validation helper test fails. Revert root cause commit.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Fixes Bug 1905 - CID 154167:
Calling strncpy with a maximum size argument of ODP_TABLE_NAME_LEN
bytes on destination array tbl->name of size ODP_TABLE_NAME_LEN bytes
might leave the destination string unterminated if the copied string is
also of the maximum size ODP_TABLE_NAME_LEN.
Make the copy leave one char for the null terminator.
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>
|
|
This patch fixes the following problems:
- checksum computation for LE platforms
- 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.
- checksum computation for packets having the UDP length not a
multiple of 2.
Signed-off-by: Grigore Ion <ion.grigore@freescale.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Tested-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
|
|
Add strong types support for helpers the same as we have for
linux-generic. That should be useful for complex algorithms
where type check is needed.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Tested-by: Ivan Khoronzhuk <ivan.khoronzhuk@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: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
lineartable.c: In function 'odph_linear_table_lookup':
lineartable.c:128:6: warning: unused variable 'idx' [-Wunused-variable]
int idx;
^
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
hashtable.c: In function 'odph_hash_table_create':
hashtable.c:68:6: warning: unused variable 'idx' [-Wunused-variable]
int idx, i;
^
hashtable.c: In function 'odph_hash_table_lookup':
hashtable.c:151:6: warning: unused variable 'idx' [-Wunused-variable]
int idx;
^
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: huanggaoyang <huanggaoyang1@huawei.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: huanggaoyang <huanggaoyang1@huawei.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: huanggaoyang <huanggaoyang1@huawei.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: huanggaoyang <huanggaoyang1@huawei.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: huanggaoyang <huanggaoyang1@huawei.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: huanggaoyang <huanggaoyang1@huawei.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Signed-off-by: huanggaoyang <huanggaoyang1@huawei.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Cleaned helper/linux.c from any further old checkpatch errors.
Signed-off-by: Carl Wallen <carl.wallen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
odph_linux_process_wait_n():
This patch helps catch child abnormal termination by breaking out
of the wait()-loop on error.
Examine what caused a forked child process to terminate. Do not wait()
for other children if the termination status indicates error in the
child, return -1 instead. Children that are not waited for will be
terminated by the SIGTERM signal once the parent exits (requested by
the prctl(PR_SET_PDEATHSIG, SIGTERM) call after child fork) even if the
parent does not perform any explicit clean-up actions.
Signed-off-by: Carl Wallen <carl.wallen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Request SIGTERM be sent to forked child processes if the parent
process dies.
Signed-off-by: Carl Wallen <carl.wallen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
Additional test suite is added to classification validation suite to test
individual PMRs. This suite will test the defined PMRs by configuring
pktio separately for every test case.
Fixes:
https://bugs.linaro.org/show_bug.cgi?id=1542
https://bugs.linaro.org/show_bug.cgi?id=1544
https://bugs.linaro.org/show_bug.cgi?id=1545
https://bugs.linaro.org/show_bug.cgi?id=1546
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>
Conflicts:
test/validation/classification/odp_classification_testsuites.h
|
|
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>
|
|
Install path was broken when helper installation moved out of the platform
side as they were install in the top includedir and
not $(includedir)/odp/helper
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
|
|
It is possible for scan_ip to return an error leaving the buf variable
pointed to undefined. Check scan_ips return code.
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>
|
|
It is possible that wait will return a valid pid but have failed to have
set a status. Set a default status so that if this occurs the value will
be known and not garbage.
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>
|