aboutsummaryrefslogtreecommitdiff
path: root/platform
AgeCommit message (Collapse)Author
2016-01-25Port "9766969f linux-generic: define posix extension level once"v1.6.0.0_DPDK_2.2.0Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-25Port "67260075 linux-generic: init: handle local/global init/term cleanly"Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-25linux-dpdk: packet_io: delete file with old pktio implementationZoltan Kiss
The previous patch made this unused. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-25linux-dpdk: packet_io: reuse linux-generic code and enable classificationZoltan Kiss
This patch reuses odp_packet_io.c and pktio/loop.c from linux-generic's codebase, and plugs the DPDK specific pieces from odp_packet_dpdk.c into that framework. In order to do that the following steps were taken: - sync up odp_packet_io_internal.h: this file is nearly the same, except we use only loop and our DPDK specific parts - move DPDK specific functionality to odp_packet_dpdk.c, and use those functions in dpdk_pktio_ops. The old pktio code will be deleted in a separate patch - enable classification in Makefiles and init: linux-generic code refers to that, that's why we can't do this in separate patches Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-25Port "e6216bc6 linux-generic: pktio: fill in L2 parse results by default"Zoltan Kiss
But don't parse L2 header by default, only on demand. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-25linux-dpdk: packet: remove frame_offset from packet header structZoltan Kiss
It's an obsolete garbage. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-25Merge branch 'master' of https://git.linaro.org/lng/odpZoltan Kiss
Conflicts: example/Makefile.am
2016-01-25linux-generic: timer: limit notification about resolution incorrectnessIvan Khoronzhuk
https://bugs.linaro.org/show_bug.cgi?id=1992 Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-and-tested-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-01-25linux-generic: packet_io: expose pktio_tbl and is_free()Zoltan Kiss
The table and the accessor would be used by ODP-DPDK, when it scans through all the pktio interfaces to flush out TX completed buffers. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-01-25linux-generic: pktio: remove unwanted initialisationStuart Haslam
Remove an unwanted initialisation and fix a bad indentation which crept in during a merge. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-01-25linux-generic: pool: accelerate buffer allocation markingBill Fischofer
Since we're now caching the local thread ID for cache management, use this copy for buffer allocation marking as well to avoid unneeded calls to odp_thread_id() Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-01-25linux-generic: pool: catch duplicate free errors in debug buildsBill Fischofer
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-01-22linux-generic: packet: hide frame_len behind accessorZoltan Kiss
The classification code accesses this variable directly, which prevents reusing that code e.g. in ODP-DPDK. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-01-22linux-generic: packet_io: separate locks for RX/TXZoltan Kiss
It's possible that two threads want to use the same packet IO in the same time, but one wants RX while the other wants TX. In this case they would block each other unnecessary on the same lock. This could be seen e.g. with odp_l2fwd. Replace that lock with two new ones for each direction. Most callers need both, but send and receive can work with only one. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-01-20linux-generic: define posix extension level oncePetri Savolainen
Use only one definition for posix extension level. _GNU_SOURCE defines _POSIX_C_SOURCE based on glibc version, and is the only definition needed under Linux. 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>
2016-01-18linux-generic: init: handle local/global init/term cleanlyBill Fischofer
Restructure odp_init_global() and odp_init_local() so that they recover cleanly if initialization fails. At exit any partial initialization is reversed so that system is in the same state as before the failing call was made. This includes adding dummy termination calls for functions that do not require explicit cleanup for symmetry and future-proofing. Note: This patch partially addresses the issues identified by Bug https://bugs.linaro.org/show_bug.cgi?id=1706 Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-01-14linux-dpdk: init: fix return value checkingZoltan Kiss
rte_eal_init() returns the consumed arguments, but it doesn't count the first one, which is used only as a logging prefix. Count this when checking return value. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-14linux-dpdk: init: don't save optindZoltan Kiss
DPDK now takes care of this global variable, no need to save and reset here as well. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-14linux-dpdk: init: fix command line argumentsZoltan Kiss
rte_eal_init() expects the first argument is the "program name", it is used for logging purposes. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-07linux-dpdk: init: remove getopt library resetZoltan Kiss
This is now taken care by DPDK itself. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-06linux-dpdk: upgrade to DPDK 2.2.0Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-06linux-dpdk: README: testing moved to newer kernelv1.6.0.0_DPDK_2.2.0-rc1Zoltan Kiss
Quite a while ago, but the README referred to old data. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-06doc: release-guide: add deprecated api sectionMike Holmes
Describe how changes to the public api are handled from release to release. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-and-Tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
2016-01-05linux-dpdk: remove pktio_tap testZoltan Kiss
This platform doesn't support that, therefore we have to create a local copy of this Makefile.am Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-05Port "41e79bb2 api: pktio: add odp_pktio_print() API"Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-05Port "6a598853 api: clib: added standard c library api"Zoltan Kiss
The DPDK memcpy version is also exposed through function pointer. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-05Port "10042384 api: rwlock_recursive: added recursive rwlock"Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-05Port "a0b30a27 api: spinlock_recursive: added recursive spinlock"Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-05Port "da9cde9a api: thread: added THREAD_COUNT_MAX define"Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-05Port "bbf9c099 api: hash: Added crc32 and crc32c hash functions"Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-05Port "linux-generic: thread: removed internal max threads define"Zoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2016-01-05Merge branch 'master' of https://git.linaro.org/lng/odpZoltan Kiss
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
2015-12-31Merge branch 'next'v1.6.0.0Maxim Uvarov
2015-12-30linux-generic: validation: pktio: disable netmapStuart Haslam
Explicitly disable the netmap pktio type when attempting to test the socket based types. Without this on systems with netmap support enabled (the modules loaded) the socket interfaces may not be tested. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29api: sync: removed odp_sync_storesPetri Savolainen
Removed odp_sync_stores() implementation and replaced usage with odp_mb_full(), to minimize functional changes. Added minimal validation test function for the new memory barriers. 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>
2015-12-29api: barrier: added memory barriersPetri Savolainen
Added new memory barriers. These follow C11 release / acquire specification and replaces odp_sync_stores(). Used GCC __atomic_thread_fence to implement all three barriers. 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>
2015-12-29linux-generic: time: remove posix bleed through on odp_time_tBill Fischofer
The linux-generic implementation of odp_time_t makes use of POSIX APIs that are sensitive to the _POSIX_C_SOURCE level. Use an indirection mechanism so that these dependencies do not "bleed through" the ODP API. This means that ODP applications can be independent of _POSIX_C_SOURCE level. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: platform/linux-generic/odp_time.c
2015-12-29validation: std_clib: added validation testsPetri Savolainen
Added validation tests for ODP std C library API. 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>
2015-12-29api: clib: added standard c library apiPetri Savolainen
Some C library calls are often used in data plane code. This API enables possibility to HW optimized implementation of those. Added first memcpy and memset. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: platform/linux-generic/Makefile.am
2015-12-29api: hash: Added crc32 and crc32c hash functionsPeng
Signed-off-by: Peng <hepeng@ict.ac.cn> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: platform/linux-generic/Makefile.am test/validation/hash/hash.c test/validation/hash/hash.h
2015-12-29api/linux-generic: classification: rename odp_drop_e to odp_cls_drop_tBalasubramanian Manoharan
Changes drop policy enum name from odp_drop_e to odp_cls_drop_t 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>
2015-12-29api/validation/linux-generic: classification: implement class of service ↵Balasubramanian Manoharan
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>
2015-12-29api: time: add global time APIIvan Khoronzhuk
This patch adds global time API and implements it in linux-generic. 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>
2015-12-29api: time: add resolution and wait API callsIvan Khoronzhuk
This patch adds odp_time_local_res() and odp_time_wait_until(), odp_time_wait_ns() APIs. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: platform/linux-generic/odp_time.c
2015-12-29linux-generic: align with new wall time APIIvan Khoronzhuk
The local time API supposes the time source is wall time. So correct linux-generic implementation. 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> Conflicts: platform/linux-generic/include/odp_internal.h
2015-12-29linux-generic: odp_time: don't use cpu cycle API to get timeIvan Khoronzhuk
The linux-generic time API implementation shouldn't depend on cpu cycle API wich is not stable enough to measure time period due to dynamic frequency scaling. 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> Conflicts: platform/linux-generic/Makefile.am platform/linux-generic/odp_time.c
2015-12-29linux-generic: schedule: use schedule time in nsIvan Khoronzhuk
In the schedule_loop the wait time is passed in units of scheduler time. At this moment there is no difference between wait time and odp_time, but in case if odp_time is smth different from uint64_t, it cannot be directly passed as uint64_t. So better to pass scheduler time as ns and convert them before entering a loop. 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>
2015-12-29fix: classification: add null check for pool assigned to CoSBalasubramanian Manoharan
Fixes a crash caused by pool not assigned to CoS. Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-and-Tested-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29linux-generic: classification: define pkt_addr as constMatias Elo
Fixes netmap "cast discards '__attribute__((const))'" build error. Define pkt_addr as const as classifier operations should be read-only to packet data. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2015-12-29linux-generic: packet: _odp_parse_common: arm build fixBalasubramanian Manoharan
Fixes arm build failure due to wrong typecast of 'const' variable Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>