This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 9b78da8e2373ab0530cfbbd72b2229059b57ddf1 (commit)
via 689145bcef5ada4304f1d97d6b72e10bf8308ac0 (commit)
from c6a309f00f882fabe70fa535ebe8b765f6e9bd11 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/m4/configure.m4 | 5 +++--
platform/linux-generic/odp_time.c | 4 +---
2 files changed, 4 insertions(+), 5 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, cloud-dev has been updated
via 1ba26aa5650c05718c177842178de6d0f70b7fc1 (commit)
via e2169ff2026af51eec351cd679891c303ab651e0 (commit)
via e3c2e06c4420f41d7053e615ac1cc6c1dc315407 (commit)
via e7e92031e08fe525e421ab30223b7398881ed42e (commit)
via f9dcbcc3f45fcd6d825c087fc55c631d6b30fa8c (commit)
via 845743bd80da73f2a296f24090dfe058d3be7dec (commit)
via bbd08a6c0c31c12275089c3134c9e7e58eb0fafa (commit)
via 0468dc01b3ae1517d57cf960b511ab066a9d5f05 (commit)
via 274a0b016d8c2eed9f065186ad5458c5edb94dad (commit)
via 0ce5d628d817003ca0f96beddece3f618f4593bb (commit)
via 65a46f66bfcb6b2034d4b0563facc36cbac1e286 (commit)
via 441fb964f22b2baaa97641e6f8dda88d32d153f6 (commit)
via d5ff31f14e87c815d3a0e0461206aa2687152dd5 (commit)
via 09a7800c4c4a093fb962e362952f9cf562d2fc98 (commit)
via ddf2ac38b1288283f7b3d7c9e16e36f392685866 (commit)
via 4bcd15e2bfb839ac0ef6419aa9e7b720958638f7 (commit)
via f4337956ee3be1e783e2389eb5a5ceecb4b0b0ca (commit)
via cd1f187d33d65cb54781b5a3c0864229b19c11c3 (commit)
via 58a8ec90b57eae43be6461d1ae407e70a87c65d2 (commit)
via ebbd8301f396e3f2f106ed94ce5c3970ec8bacce (commit)
via 0d24adacfe17c8e0e1348f19cd8b75b64cb13ccf (commit)
via a5ef33a6f2575cd011cb05c3fb1b06d1c017f879 (commit)
via 5dd7d9ed05ee228406cc3c0ae6cd9caa20a71f08 (commit)
via 4bda102286cf55b0bc93fdf8f8f276d5528fdf14 (commit)
via 452c37072103864d7117e31f521b5e620e4937b5 (commit)
via 0b5e8c6870b959ad9db426aa067326f4baad5d58 (commit)
via b5f5510a9751ad60915f5b9fcf8763a97f77b5ab (commit)
via 79ed8c746ba13233c111a61d2d4f17e360dd8023 (commit)
via 11a1d56876d14cd715a1906a95a7c3734999bdc0 (commit)
via 40c06707ed485e5e957a413d697f4f1370f98837 (commit)
via 1b8c663ecd3b8a7c34ae52163961cdb442383d31 (commit)
via e24f6b3d0c130af3838ba49661d4bc9cb83e940f (commit)
via 9815336c6c7c64df3b40a1fb0c1c668a36d5550b (commit)
via e5faf09d8dfa9631caa7ccf1461fd4bc9f69d4c0 (commit)
via e248b708ff31467591fb99f7cc8652ab9e3081b2 (commit)
via ff6d71903cdfdd68246e3daabedd645bf30640cc (commit)
via bddd9fb0a5353c611bb9de78f3355d30147f8efc (commit)
via 2156eaa076fe0ca0aaa910c8902d5b60aa3bbed6 (commit)
via ca1ebaa8319604d4f5fe303be7150b7278fe9d94 (commit)
via 8d4ecf491a0af45c499d38c6e72853e756d69f0e (commit)
via b93c17b30d051b114a099ed5219fb2a82f5a864c (commit)
via fec16fd81d4084340f0f9a6893c9772000608031 (commit)
via 2210dc7d26125ac9b8b51fa4de7b2b72e4e8f13e (commit)
via c3d3787ae527291e969a60bc54dd4e2ab220251d (commit)
via 14df663ba9534101305ea4f5201fc2a5e55a974f (commit)
via dcd53771432aeb838f2584458589b3430104abcf (commit)
via 3362bb0eea7b4cdeb97cd2558e9bc5e4ee176852 (commit)
via 2239b759ad0cb09e3a2ec3d132580123ed92ab03 (commit)
via a28dab7edeeee74db65349231ec400d92d491a22 (commit)
via e3a92c5bf48f2279cd4ef5c8d22eafc523445626 (commit)
via 93e9e20c17426d3262aa96a589106e635b755090 (commit)
via ab3003c87e4cc25e3b26c7bddbfbce61525a94ad (commit)
via 93ee286c21a576c265463ca5dcd17b39ef80962b (commit)
via 1ebbb8f882ae6506fc9fa2cb02dadae3d35eaf58 (commit)
via 1adf94727a92a260f3145c3c777cc8cf3ecb419b (commit)
via ad5d48fe658927a7b946533d50fd907e306ec184 (commit)
via ce8bebad45c590ad5b06d31d8be9fae8182f944a (commit)
via 8e9242391f79ed54430b5fdc37e992addf9a26b8 (commit)
via 0344270a085f78d9f6d4fbef3c497750bbcee071 (commit)
via 697c3be9b2155379dee458d66335442375a9354d (commit)
via 2ffff0bc3e07678214a413b5eb89da13e7624055 (commit)
via dfbab7438c8404d5f4af20086e2100d40a5ffc0c (commit)
via 60150bba495711e6fdfc948ffb4ad405878fbcbc (commit)
via fbe34c754b7abe15100779ce9833a7f200517d9f (commit)
via 62f95a564b7b3e08a32e6e72d234eb86292021d0 (commit)
via 17f4cddfcbf47f73761cb869ace264cc8444dc08 (commit)
via f54860c628c16c4f76d555b9d20c28e04af13751 (commit)
via a5116e42abf0452f5ad9fd1920d5377aa0ef36b6 (commit)
via 73954b9142d1ddc2dde7c0f9b6596e2d8bac3caf (commit)
via 89a00a2ed43a99e0d2d78a5baeff1292e41ecd34 (commit)
via 8f07f3de3da7961cd29046d2107f27a0f7391703 (commit)
via 4bb3025e76a81130e8e80cd582ae2433d3450e2b (commit)
via 629be2dd2d166ed1246b8c1982af3a55a7035657 (commit)
via af05215e26c99693c000981fddfaf3cdd2225e3f (commit)
via b9676fc5ba51d0f26a9c8c40f0b65a003113f1b5 (commit)
via 583dbc9adab460c926339353cc882095594b5b60 (commit)
via 867d8fc93d074005b52375995b9beed4a896c1ed (commit)
via 87b108d54a697b0c3704342ec7b4d484d04dfdbb (commit)
via 20d0d4d1a34725dec053ecd7cd46979345f7d625 (commit)
via 8367530231e7cd4c33c63b789a5ed8322b51e58f (commit)
via 48ad38ac169c48ac67e0758d3d45eb146255ed09 (commit)
via a074bc12f6a960c195daf3ceb28e3f717cfc3aa2 (commit)
via 4418eef8a7b7f621047101f284ce5e5df44f0239 (commit)
via 464fdc4efb4148dd8d1ec1aeaa2a7ffcb58d7faf (commit)
via 7394a5c8dead5edcfa5bda571aceba5945c91d16 (commit)
via 93afeeaf4e3dee3099830fccbb53bb32e64e3090 (commit)
via fdddf685fcad06f05f3788705968622b23a569ac (commit)
via 29b29677ed7d5d396f4aec1d0f3197efbf119113 (commit)
via 8c6ca3886ae4ffb111d3a81d09d21b68e0e11349 (commit)
via 19c488fdd9f9868cbe60f1ff8558f48c7bba6f04 (commit)
via 966c1c956a21f4e70c873a3c3546e65299837457 (commit)
via 99478ee923dfd8279a7a5149769aee49df315dde (commit)
via be9ca86f431d5eaab0702f7d76db60cd75982e15 (commit)
via 2b34cda253fd28f3b373dc3ee66753d47a0c9b33 (commit)
via 166e4e6a7f2e289f305203e75c68cea56d015c08 (commit)
via e149fb058c6ea718e22c77c6fc930141004dcba2 (commit)
via e6e666d533615de703993836b958514208de942a (commit)
via 8184de8ef8492a739d30c354628aada2e2bab366 (commit)
via 0ee227d51cdb1cc29853dac0376e6e02b6e585de (commit)
via 658f6f27ed62c651d8555a4de0ef103191c491b1 (commit)
via b8de7dfbadb10da65a0a675db5f588cc3998508a (commit)
via 361f0fa4addf83ae9b30d5e705e1f86643a45bab (commit)
via cb17e380f1231328cbaaf35635f6db9fb5b99bb8 (commit)
via 244fce69b25af28cbe5c19b11bfc3da5aa8da95d (commit)
via 974e4477a35742b8021e25692a458d16cd2087f1 (commit)
via aadd1d62084191bf2fb909a7dbedee628b197929 (commit)
via 248ebf35eaf51d962e9d14a4e2c541d3cbc96268 (commit)
via 373f97f88d327ca0e211df33d6fcaad0b9188a1c (commit)
via 7cf390d11e69f6b677e6fbfd6414944737406fc3 (commit)
via 61a5edca59780fc2a4a0e656e09738145892a3a0 (commit)
via 8d19f94fd96eb5a411eafb75c487dc3f972297bd (commit)
via 4f97e500a097928e308a415c32a88465adc5f5cc (commit)
via 2ea71a57ae4b6122e3e74782aeea2846a757cb14 (commit)
via 8b30e228ba2c303b3c69ffa4fbb9f138d2523d9a (commit)
via 57783b35f4383bdfdd146f2a3333bbc8bb995896 (commit)
via 904631219eab0af46cb99e8a56742401452ac2c3 (commit)
via f7bd3a7bbb3613260ef2bad1e3ede5145571dd6c (commit)
via d3602cb56413bb31b4535976dfd3dd723a16bfc9 (commit)
via 908e27635dfe08e249407f4c4e53aa2c7ce12ea1 (commit)
via d80e025c8baebed0305648737e528580b84fae2a (commit)
via 33a0dad444fab1c1567083b289eac7727eab3b31 (commit)
via ccb2cd5eb7383f46051dff2b1e7675ed54f635b2 (commit)
via d8e4647baa7b1159480dfde4d5a2143146e8c6cb (commit)
via 20cc38e36a52f70758c3464014f4f00a94d2139d (commit)
via 9bb2a439ae2a8751df5a6007a7e242d7bcb963e5 (commit)
via a6fa9f3e721dbdb99e2a0bac320f988930e5f874 (commit)
via b2261b9485e6993642c5c0c7ea58abb8a2d356a9 (commit)
via c969cc4e6f6e2e0cc5c4e407dd696be069cf4525 (commit)
via 3a1832865c90865de3fd8bd30103995637e7851c (commit)
via ab5a099937bc3d81f610fcfc2a98bfb7e677a06a (commit)
via 9f506fecfcd408a8af0df0e9627795d0b1059730 (commit)
via c184a9c8d35c10b30014e7538a862a7bc42556e7 (commit)
via 9ebcb7c6e2f3226c915c39c81dcd1895dda3639b (commit)
via 2f137b2bc9cb9c03a586d2cb324a6a5659098c39 (commit)
via 2f1a96d47bb2e6c413ed06749633dcfe33f02b97 (commit)
via 4cdaf5527dba63858080c0942ac1c971c615f066 (commit)
via 77dff4e05611bc5b06b4bfb5dd86da6d4c3fffa5 (commit)
via e6be64e01589f1aa335ea178e8314bf35ad34847 (commit)
via 15ea6562d284bd5f2bd20e9b79bd102db106555c (commit)
via a48979af5b36c11fb5c7f8d2c6029c12bb191b51 (commit)
via a9fc17e1bbef1c3585fd5de47e5023e4d66504f5 (commit)
via 7a7e3ff9d50d67b7c79058db98ba27ab5a806437 (commit)
via b67bfce457a7546bbae4dad16b5185629eda77e5 (commit)
via 87bba414b4444d8247adf3411e8bbefd35899f1b (commit)
via 0f47f4c4b48fb08326d6be9c0b1019f738d57911 (commit)
via fc815dec86d080ca7d1b8fadddcab1e7c8e4b11b (commit)
via 472d34cc0fd2b5f96277b1799583ab6c45375d40 (commit)
via 148a700fb9af847a64d732bf7ed9975aa03fefa9 (commit)
via ba6cad6319b917c078dd0c20cd6b011637195898 (commit)
via 552817483e9d4b6a84d49960920f1de50029f111 (commit)
via c5eb1703fe9e7529ae12ecf1799b757e1a992afd (commit)
via 2e36f75db71b230021cd907a5aadf39559683d16 (commit)
via ea134fe159c0d249e4bed12b7269e8236afa0262 (commit)
via 60b9dd435bf1be55794e5be6ee24714d28a5b587 (commit)
via f20dee9db3da9425d8764e414b04cdcbd41bece8 (commit)
via 3faf025987a1640983080a2743e58fbb3cbac55e (commit)
via 599ac6802352c9c56eca33a6004824783becaa6e (commit)
via 0a3e5be140e77167173b9af4b72cdad8451aff71 (commit)
from c460b6fbaeae6c60d75e8e5a60c34a6260b9e4fa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1ba26aa5650c05718c177842178de6d0f70b7fc1
Merge: c460b6fb e2169ff2
Author: Yi He <yi.he(a)linaro.org>
Date: Wed Jun 28 09:51:23 2017 +0800
Merge branch 'api-next' into cloud-dev
-----------------------------------------------------------------------
Summary of changes:
.checkpatch.conf | 2 +
.travis.yml | 149 ++--
CHANGELOG | 267 +++++++
DEPENDENCIES | 5 +-
Makefile.am | 4 +-
configure.ac | 22 +-
doc/application-api-guide/examples.dox | 5 +
doc/users-guide/users-guide.adoc | 36 +-
example/Makefile.am | 1 +
example/generator/odp_generator.c | 89 ++-
example/ipfragreass/.gitignore | 3 +
example/ipfragreass/Makefile.am | 23 +
example/ipfragreass/odp_ipfragreass.c | 376 ++++++++++
example/ipfragreass/odp_ipfragreass_atomics.h | 55 ++
example/ipfragreass/odp_ipfragreass_atomics_arm.h | 120 ++++
example/ipfragreass/odp_ipfragreass_fragment.c | 99 +++
example/ipfragreass/odp_ipfragreass_fragment.h | 28 +
example/ipfragreass/odp_ipfragreass_helpers.c | 124 ++++
example/ipfragreass/odp_ipfragreass_helpers.h | 79 +++
example/ipfragreass/odp_ipfragreass_ip.h | 251 +++++++
example/ipfragreass/odp_ipfragreass_reassemble.c | 771 +++++++++++++++++++++
example/ipfragreass/odp_ipfragreass_reassemble.h | 211 ++++++
example/ipsec/odp_ipsec_cache.c | 1 +
example/m4/configure.m4 | 1 +
include/odp/api/spec/crypto.h | 6 +-
include/odp/api/spec/event.h | 80 ++-
include/odp/api/spec/feature.h | 69 ++
include/odp/api/spec/init.h | 15 +
include/odp/api/spec/ipsec.h | 469 +++++++------
include/odp/arch/default/api/abi/event.h | 9 +-
include/odp_api.h | 1 +
pkgconfig/libodp-linux.pc.in | 2 +-
platform/Makefile.inc | 6 +-
platform/linux-generic/Makefile.am | 43 +-
platform/linux-generic/arch/arm/odp_cpu_arch.c | 38 +-
.../include/odp/{drv/hints.h => api/feature.h} | 10 +-
.../include/odp/api/plat/event_types.h | 8 +-
.../include/odp/api/plat/time_types.h | 1 +
.../include/odp_classification_datamodel.h | 4 +-
.../linux-generic/include/odp_crypto_internal.h | 17 +-
platform/linux-generic/include/odp_internal.h | 2 +-
.../linux-generic/include/odp_packet_internal.h | 16 +
.../linux-generic/include/odp_packet_io_queue.h | 20 +-
platform/linux-generic/include/odp_packet_socket.h | 7 -
platform/linux-generic/include/odp_queue_if.h | 104 +++
.../linux-generic/include/odp_queue_internal.h | 41 +-
platform/linux-generic/include/odp_schedule_if.h | 2 +-
.../linux-generic/include/odp_timer_internal.h | 24 +
.../include/odp_traffic_mngr_internal.h | 4 +-
platform/linux-generic/m4/configure.m4 | 45 ++
platform/linux-generic/odp_classification.c | 10 +-
platform/linux-generic/odp_crypto.c | 628 ++++++++---------
platform/linux-generic/odp_init.c | 24 +-
platform/linux-generic/odp_ipsec.c | 67 +-
platform/linux-generic/odp_packet.c | 64 +-
platform/linux-generic/odp_packet_io.c | 98 +--
platform/linux-generic/odp_queue.c | 342 ++++++---
platform/linux-generic/odp_queue_if.c | 103 +++
platform/linux-generic/odp_schedule.c | 14 +-
platform/linux-generic/odp_schedule_iquery.c | 14 +-
platform/linux-generic/odp_schedule_sp.c | 7 +-
platform/linux-generic/odp_timer.c | 112 ++-
platform/linux-generic/odp_traffic_mngr.c | 21 +-
platform/linux-generic/pktio/loop.c | 17 +-
platform/linux-generic/pktio/socket.c | 183 ++---
scripts/checkpatch.pl | 6 +-
scripts/spelling.txt | 151 +++-
test/common_plat/performance/odp_crypto.c | 58 +-
test/common_plat/performance/odp_l2fwd_run.sh | 3 +
test/common_plat/validation/api/crypto/crypto.h | 8 +-
.../validation/api/crypto/odp_crypto_test_inp.c | 417 +++++++++--
.../validation/api/crypto/test_vectors.h | 181 +++--
.../validation/api/crypto/test_vectors_len.h | 18 +-
test/common_plat/validation/api/init/init.c | 8 +-
test/common_plat/validation/api/pktio/pktio.c | 11 +-
test/common_plat/validation/api/time/Makefile.am | 10 +-
test/common_plat/validation/api/time/time.sh | 42 ++
test/linux-generic/Makefile.am | 2 +-
test/linux-generic/pktio_ipc/pktio_ipc_run.sh | 3 -
79 files changed, 5152 insertions(+), 1235 deletions(-)
create mode 100644 example/ipfragreass/.gitignore
create mode 100644 example/ipfragreass/Makefile.am
create mode 100644 example/ipfragreass/odp_ipfragreass.c
create mode 100644 example/ipfragreass/odp_ipfragreass_atomics.h
create mode 100644 example/ipfragreass/odp_ipfragreass_atomics_arm.h
create mode 100644 example/ipfragreass/odp_ipfragreass_fragment.c
create mode 100644 example/ipfragreass/odp_ipfragreass_fragment.h
create mode 100644 example/ipfragreass/odp_ipfragreass_helpers.c
create mode 100644 example/ipfragreass/odp_ipfragreass_helpers.h
create mode 100644 example/ipfragreass/odp_ipfragreass_ip.h
create mode 100644 example/ipfragreass/odp_ipfragreass_reassemble.c
create mode 100644 example/ipfragreass/odp_ipfragreass_reassemble.h
create mode 100644 include/odp/api/spec/feature.h
copy platform/linux-generic/include/odp/{drv/hints.h => api/feature.h} (61%)
create mode 100644 platform/linux-generic/include/odp_queue_if.h
create mode 100644 platform/linux-generic/odp_queue_if.c
create mode 100755 test/common_plat/validation/api/time/time.sh
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via c6a309f00f882fabe70fa535ebe8b765f6e9bd11 (commit)
from a4add29291572219143dc667db4e8a7832a5692b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c6a309f00f882fabe70fa535ebe8b765f6e9bd11
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Mon Jun 26 18:00:16 2017 +0300
configure: remove dependency of autoconf-archive
autoconf-archive is not available on some build environment
Number of projects simple have local copy of this file.
Do the same thing.
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
diff --git a/.travis.yml b/.travis.yml
index 2cc8caf7..bae23600 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,7 +42,7 @@ addons:
packages:
- gcc
- clang-3.8
- - automake autoconf autoconf-archive libtool libssl-dev graphviz mscgen doxygen
+ - automake autoconf libtool libssl-dev graphviz mscgen doxygen
- libpcap-dev
# coverity_scan:
# project:
diff --git a/DEPENDENCIES b/DEPENDENCIES
index 7bcbd5eb..a194cad1 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -8,14 +8,13 @@ Prerequisites for building the OpenDataPlane (ODP) API
automake
autoconf
- autoconf-archive
libtool
On Debian/Ubuntu systems:
- $ sudo apt-get install automake autoconf autoconf-archive libtool
+ $ sudo apt-get install automake autoconf libtool
On CentOS/RedHat/Fedora systems:
- $ sudo yum install automake autoconf autoconf-archive libtool
+ $ sudo yum install automake autoconf libtool
3. Required libraries
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
new file mode 100644
index 00000000..c3a8d695
--- /dev/null
+++ b/m4/ax_check_compile_flag.m4
@@ -0,0 +1,72 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the current language's compiler
+# or gives an error. (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the current language's default
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
+# force the compiler to issue an error when a bad flag is given.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod(a)gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans(a)gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 2
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
-----------------------------------------------------------------------
Summary of changes:
.travis.yml | 2 +-
DEPENDENCIES | 5 ++--
m4/ax_check_compile_flag.m4 | 72 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 75 insertions(+), 4 deletions(-)
create mode 100644 m4/ax_check_compile_flag.m4
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 497c339f94e35d5fadeff539cebfbf44d698dc7e (commit)
via fdd3df3547c78d81d1244eac3fa65512e9023237 (commit)
via e5b211403233dda67507f18fd91f9826022fd287 (commit)
via d232db102fc77e6cb2fd9d62ba387c22f68c042a (commit)
from e7e92031e08fe525e421ab30223b7398881ed42e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 497c339f94e35d5fadeff539cebfbf44d698dc7e
Author: Yi He <yi.he(a)linaro.org>
Date: Fri Jun 23 11:26:09 2017 +0800
travis: enable all tests when make distcheck
Make distcheck with all test configurations
to confirm test programs installation in odp
distribution package.
Signed-off-by: Yi He <yi.he(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/.travis.yml b/.travis.yml
index 67a2df64..2cc8caf7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -137,7 +137,7 @@ jobs:
compiler: gcc
script:
- ./bootstrap
- - ./configure
+ - ./configure --prefix=$HOME/odp-install --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example
- sudo LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck
- stage: test
env: TEST=doxygen
commit fdd3df3547c78d81d1244eac3fa65512e9023237
Author: Yi He <yi.he(a)linaro.org>
Date: Fri Jun 23 11:21:50 2017 +0800
Makefile.am: update distcheck configuration
Update AM_DISTCHECK_CONFIGURE_FLAGS to enable all tests.
Signed-off-by: Yi He <yi.he(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/Makefile.am b/Makefile.am
index daa49788..fff1276a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,11 @@
ACLOCAL_AMFLAGS=-I m4
AUTOMAKE_OPTIONS = foreign
-AM_DISTCHECK_CONFIGURE_FLAGS = --enable-test-cpp \
- --enable-test-perf \
- --enable-test-vald \
+AM_DISTCHECK_CONFIGURE_FLAGS = --enable-test-cpp \
+ --enable-test-example \
+ --enable-test-helper \
+ --enable-test-perf \
+ --enable-test-perf-proc \
+ --enable-test-vald \
--with-testdir
#@with_platform@ works alone in subdir but not as part of a path???
commit e5b211403233dda67507f18fd91f9826022fd287
Author: Yi He <yi.he(a)linaro.org>
Date: Mon Jun 19 17:13:50 2017 +0800
test: time: fix distcheck failure
When configured odp with --enable-test-vald, make
distcheck will fail by not being able to find the
test script time.sh in the distribution. This patch
installs time test_SCRIPTS in distribution build.
Signed-off-by: Yi He <yi.he(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/common_plat/validation/api/time/Makefile.am b/test/common_plat/validation/api/time/Makefile.am
index 82682dfc..ca9c0562 100644
--- a/test/common_plat/validation/api/time/Makefile.am
+++ b/test/common_plat/validation/api/time/Makefile.am
@@ -16,3 +16,4 @@ time_main_LDADD = libtesttime.la $(LIBCUNIT_COMMON) $(LIBODP)
EXTRA_DIST = time_test.h $(TESTSCRIPTS)
dist_check_SCRIPTS = $(TESTSCRIPTS)
+test_SCRIPTS = $(dist_check_SCRIPTS)
commit d232db102fc77e6cb2fd9d62ba387c22f68c042a
Author: Yi He <yi.he(a)linaro.org>
Date: Tue May 23 15:08:59 2017 +0800
test: traffic_mngr: fix distcheck failure
When configured odp with --enable-test-vald, make
distcheck will fail by not being able to find the
traffic_mngr test binary and script in the distribution.
This patch installs traffic_mngr test_PROGRAMS and
test_SCRIPTS in distribution build.
Signed-off-by: Yi He <yi.he(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/common_plat/validation/api/traffic_mngr/Makefile.am b/test/common_plat/validation/api/traffic_mngr/Makefile.am
index a012c1b3..44d50a91 100644
--- a/test/common_plat/validation/api/traffic_mngr/Makefile.am
+++ b/test/common_plat/validation/api/traffic_mngr/Makefile.am
@@ -10,9 +10,10 @@ TESTS = $(TESTSCRIPTS)
noinst_LTLIBRARIES = libtesttraffic_mngr.la
libtesttraffic_mngr_la_SOURCES = traffic_mngr.c
-bin_PROGRAMS = traffic_mngr_main$(EXEEXT)
+test_PROGRAMS = traffic_mngr_main$(EXEEXT)
dist_traffic_mngr_main_SOURCES = traffic_mngr_main.c
traffic_mngr_main_LDADD = libtesttraffic_mngr.la -lm $(LIBCUNIT_COMMON) $(LIBODP)
EXTRA_DIST = traffic_mngr.h $(TESTSCRIPTS)
dist_check_SCRIPTS = $(TESTSCRIPTS)
+test_SCRIPTS = $(dist_check_SCRIPTS)
-----------------------------------------------------------------------
Summary of changes:
.travis.yml | 2 +-
Makefile.am | 9 ++++++---
test/common_plat/validation/api/time/Makefile.am | 1 +
test/common_plat/validation/api/traffic_mngr/Makefile.am | 3 ++-
4 files changed, 10 insertions(+), 5 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, api-next has been updated
via e3c2e06c4420f41d7053e615ac1cc6c1dc315407 (commit)
via e7e92031e08fe525e421ab30223b7398881ed42e (commit)
from f9dcbcc3f45fcd6d825c087fc55c631d6b30fa8c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e3c2e06c4420f41d7053e615ac1cc6c1dc315407
Merge: f9dcbcc3 e7e92031
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Fri Jun 23 12:36:45 2017 +0300
Merge branch 'master' into api-next
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --cc platform/linux-generic/Makefile.am
index e6ff0033,989a65b6..2293f7f0
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@@ -249,19 -229,24 +261,29 @@@ __LIB__libodp_linux_la_SOURCES =
odp_timer_wheel.c \
odp_traffic_mngr.c \
odp_version.c \
- odp_weak.c
+ odp_weak.c \
+ drv_atomic.c \
+ drv_barrier.c \
+ drv_driver.c \
+ drv_shm.c \
- drv_spinlock.c \
- arch/@ARCH_DIR@/odp_cpu_arch.c \
- arch/@ARCH_DIR@/odp_sysinfo_parse.c
-
- __LIB__libodp_linux_la_LIBADD = $(ATOMIC_LIBS)
++ drv_spinlock.c
+ if ARCH_IS_ARM
+ __LIB__libodp_linux_la_SOURCES += arch/arm/odp_cpu_arch.c \
+ arch/arm/odp_sysinfo_parse.c
+ endif
+ if ARCH_IS_MIPS64
+ __LIB__libodp_linux_la_SOURCES += arch/mips64/odp_cpu_arch.c \
+ arch/mips64/odp_sysinfo_parse.c
+ endif
+ if ARCH_IS_POWERPC
+ __LIB__libodp_linux_la_SOURCES += arch/powerpc/odp_cpu_arch.c \
+ arch/powerpc/odp_sysinfo_parse.c
+ endif
if ARCH_IS_X86
- __LIB__libodp_linux_la_SOURCES += arch/@ARCH_DIR@/cpu_flags.c
+ __LIB__libodp_linux_la_SOURCES += arch/x86/cpu_flags.c \
+ arch/x86/odp_cpu_arch.c \
+ arch/x86/odp_sysinfo_parse.c
endif
if HAVE_PCAP
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 3 +++
platform/linux-generic/Makefile.am | 40 ++++++++++++++++++++++++++++++--------
2 files changed, 35 insertions(+), 8 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via e7e92031e08fe525e421ab30223b7398881ed42e (commit)
from 09a7800c4c4a093fb962e362952f9cf562d2fc98 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 3 +++
platform/linux-generic/Makefile.am | 40 ++++++++++++++++++++++++++++++--------
2 files changed, 35 insertions(+), 8 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, api-next has been updated
via f9dcbcc3f45fcd6d825c087fc55c631d6b30fa8c (commit)
via 845743bd80da73f2a296f24090dfe058d3be7dec (commit)
via bbd08a6c0c31c12275089c3134c9e7e58eb0fafa (commit)
via 0468dc01b3ae1517d57cf960b511ab066a9d5f05 (commit)
via 274a0b016d8c2eed9f065186ad5458c5edb94dad (commit)
via 0ce5d628d817003ca0f96beddece3f618f4593bb (commit)
via 65a46f66bfcb6b2034d4b0563facc36cbac1e286 (commit)
via 441fb964f22b2baaa97641e6f8dda88d32d153f6 (commit)
via d5ff31f14e87c815d3a0e0461206aa2687152dd5 (commit)
via 09a7800c4c4a093fb962e362952f9cf562d2fc98 (commit)
via ddf2ac38b1288283f7b3d7c9e16e36f392685866 (commit)
via f4337956ee3be1e783e2389eb5a5ceecb4b0b0ca (commit)
via cd1f187d33d65cb54781b5a3c0864229b19c11c3 (commit)
via 0d24adacfe17c8e0e1348f19cd8b75b64cb13ccf (commit)
from 4bcd15e2bfb839ac0ef6419aa9e7b720958638f7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f9dcbcc3f45fcd6d825c087fc55c631d6b30fa8c
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Tue Jun 13 07:55:15 2017 -0500
doc: userguide: add odp_init_global() documentation for unused features
Update User Guide startup section to include current parameters for
odp_init_global() and odp_init_local() as well as optimization hints for
unused features.
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc
index ead8da5e..d78e0777 100755
--- a/doc/users-guide/users-guide.adoc
+++ b/doc/users-guide/users-guide.adoc
@@ -530,20 +530,44 @@ calling the terminate functions should only be done when the application is
sure it has closed the ingress and subsequently drained all queues, etc.
=== Startup
-The first API that must be called by an ODP application is 'odp_init_global()'.
+The first API that must be called by an ODP application is `odp_init_global()`:
+[source,c]
+-----
+int odp_init_global(odp_instance_t *instance,
+ const odp_init_t *param,
+ const odp_platform_init_t *platform_param);
+-----
This takes two pointers. The first, `odp_init_t`, contains ODP initialization
data that is platform independent and portable, while the second,
`odp_platform_init_t`, is passed unparsed to the implementation
to be used for platform specific data that is not yet, or may never be
-suitable for the ODP API.
+suitable for the ODP API. Each of these parameters is optional and may be
+specified as NULL to accept the implementation-defined default initialization
+values.
-Calling odp_init_global() establishes the ODP API framework and MUST be
+Calling `odp_init_global()` establishes the ODP API framework and MUST be
called before any other ODP API may be called. Note that it is only called
-once per application. Following global initialization, each thread in turn
+once per application. A successful call to `odp_init_global()` returns rc = 0
+and sets the `instance` variable supplied as input to the call to an handle
+representing this unique ODP instance.
+
+The `odp_init_t` parameter is used to specify various customizations to the
+ODP environment being established by this call. For example, the caller can
+specify the maximum number of worker threads it will use, the thread masks
+associated with these threads, as well as whether the default logging or
+abort functions are to be overridden with an application-supplied handler.
+
+The application may also provide optimization hints to the ODP implementation
+if it knows that it will never use specific ODP feature sets, such as the
+packet classifier or traffic manager. Implementations may use such hints to
+provide optimized behavior to applications that are known not to need these
+features.
+
+Following global initialization, each thread in turn
calls 'odp_init_local()'. This establishes the local ODP thread
context for that thread and MUST be called before other ODP APIs may be
-called by that thread. The sole argument to this call is the _thread type_,
-which is either `ODP_THREAD_WORKER` or `ODP_THREAD_CONTROL`.
+called by that thread. The sole argument to this call is the `instance`
+variable returned by `odp_init_global()`.
=== Shutdown
Shutdown is the logical reverse of the initialization procedure, with
commit 845743bd80da73f2a296f24090dfe058d3be7dec
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Tue Jun 13 07:55:14 2017 -0500
validation: init: use odp_init_param_init() in init tests
Provide test coverage for odp_init_param_init() API.
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/common_plat/validation/api/init/init.c b/test/common_plat/validation/api/init/init.c
index 61055fad..6f9556d7 100644
--- a/test/common_plat/validation/api/init/init.c
+++ b/test/common_plat/validation/api/init/init.c
@@ -24,10 +24,10 @@ static int odp_init_log(odp_log_level_t level, const char *fmt, ...);
void init_test_odp_init_global_replace_abort(void)
{
int status;
- struct odp_init_t init_data;
+ odp_init_t init_data;
odp_instance_t instance;
- memset(&init_data, 0, sizeof(init_data));
+ odp_init_param_init(&init_data);
init_data.abort_fn = &odp_init_abort;
status = odp_init_global(&instance, &init_data, NULL);
@@ -77,10 +77,10 @@ int init_main_abort(int argc, char *argv[])
void init_test_odp_init_global_replace_log(void)
{
int status;
- struct odp_init_t init_data;
+ odp_init_t init_data;
odp_instance_t instance;
- memset(&init_data, 0, sizeof(init_data));
+ odp_init_param_init(&init_data);
init_data.log_fn = &odp_init_log;
replacement_logging_used = 0;
commit bbd08a6c0c31c12275089c3134c9e7e58eb0fafa
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Tue Jun 13 07:55:13 2017 -0500
linux-generic: init: implement odp_init_param_init()
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c
index 31bd7c73..62a1fbc2 100644
--- a/platform/linux-generic/odp_init.c
+++ b/platform/linux-generic/odp_init.c
@@ -147,6 +147,11 @@ static int read_configfile(void)
return 0;
}
+void odp_init_param_init(odp_init_t *param)
+{
+ memset(param, 0, sizeof(odp_init_t));
+}
+
int odp_init_global(odp_instance_t *instance,
const odp_init_t *params,
const odp_platform_init_t *platform_params ODP_UNUSED)
commit 0468dc01b3ae1517d57cf960b511ab066a9d5f05
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Tue Jun 13 07:55:12 2017 -0500
api: init: add support for unused features
Add the not_used field to odp_init_t to permit applications to
specify that they will not use various ODP features. This may
allow implementations to provide optimized behavior.
Also add the odp_init_param_init() API to initialize odp_init_t
to default values.
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/init.h b/include/odp/api/spec/init.h
index 154cdf8f..e8ec4113 100644
--- a/include/odp/api/spec/init.h
+++ b/include/odp/api/spec/init.h
@@ -29,6 +29,7 @@ extern "C" {
#include <odp/api/std_types.h>
#include <odp/api/hints.h>
+#include <odp/api/feature.h>
#include <odp/api/thread.h>
#include <odp/api/cpumask.h>
@@ -153,9 +154,23 @@ typedef struct odp_init_t {
odp_log_func_t log_fn;
/** Replacement for the default abort fn */
odp_abort_func_t abort_fn;
+ /** Unused features. These are hints to the ODP implementation that
+ * the application will not use any APIs associated with these
+ * features. Implementations may use this information to provide
+ * optimized behavior. Results are undefined if applications assert
+ * that a feature will not be used and it is used anyway.
+ */
+ odp_feature_t not_used;
} odp_init_t;
/**
+ * Initialize the odp_init_t to default values for all fields
+ *
+ * @param[out] param Address of the odp_init_t to be initialized
+ */
+void odp_init_param_init(odp_init_t *param);
+
+/**
* @typedef odp_platform_init_t
* ODP platform initialization data
*
commit 274a0b016d8c2eed9f065186ad5458c5edb94dad
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Tue Jun 13 07:55:11 2017 -0500
api: feature: add odp feature bits
Add new odp_feature_t bits that permit other APIs/components to
refer to various ODP features.
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/feature.h b/include/odp/api/spec/feature.h
new file mode 100644
index 00000000..0cfc141d
--- /dev/null
+++ b/include/odp/api/spec/feature.h
@@ -0,0 +1,69 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP features.
+ * Define various ODP feature sets that can be referenced by other
+ * components.
+ */
+
+#ifndef ODP_API_FEATURE_H_
+#define ODP_API_FEATURE_H_
+#include <odp/visibility_begin.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/std_types.h>
+
+/** @defgroup odp_features ODP_FEATURE
+ * ODP feature definitions
+ * @{
+ */
+
+/** Definition of ODP features */
+typedef union odp_feature_t {
+ /** All features */
+ uint32_t all_feat;
+
+ /** Individual feature bits */
+ struct {
+ /** Classifier APIs, e.g., odp_cls_xxx(), odp_cos_xxx() */
+ uint32_t cls:1;
+
+ /** Crypto APIs, e.g., odp_crypto_xxx() */
+ uint32_t crypto:1;
+
+ /** IPsec APIs, e.g., odp_ipsec_xxx() */
+ uint32_t ipsec:1;
+
+ /** Scheduler APIs, e.g., odp_schedule_xxx() */
+ uint32_t schedule:1;
+
+ /** Time APIs are, e.g., odp_time_xxx() */
+ uint32_t time:1;
+
+ /** Timer APIs, e.g., odp_timer_xxx(), odp_timeout_xxx() */
+ uint32_t timer:1;
+
+ /** Traffic Manager APIs, e.g., odp_tm_xxx() */
+ uint32_t tm:1;
+ } feat;
+} odp_feature_t;
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <odp/visibility_end.h>
+#endif
diff --git a/include/odp_api.h b/include/odp_api.h
index 8146e024..86232ee1 100644
--- a/include/odp_api.h
+++ b/include/odp_api.h
@@ -32,6 +32,7 @@ extern "C" {
#include <odp/api/barrier.h>
#include <odp/api/spinlock.h>
#include <odp/api/atomic.h>
+#include <odp/api/feature.h>
#include <odp/api/init.h>
#include <odp/api/system_info.h>
#include <odp/api/thread.h>
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 5343bfe1..24f06914 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -32,6 +32,7 @@ odpapispecinclude_HEADERS = \
$(top_srcdir)/include/odp/api/spec/deprecated.h \
$(top_srcdir)/include/odp/api/spec/errno.h \
$(top_srcdir)/include/odp/api/spec/event.h \
+ $(top_srcdir)/include/odp/api/spec/feature.h \
$(top_srcdir)/include/odp/api/spec/support.h \
$(top_srcdir)/include/odp/api/spec/hash.h \
$(top_srcdir)/include/odp/api/spec/hints.h \
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index ecb581c1..e6ff0033 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -38,7 +38,7 @@ odpapiinclude_HEADERS = \
$(srcdir)/include/odp/api/deprecated.h \
$(srcdir)/include/odp/api/errno.h \
$(srcdir)/include/odp/api/event.h \
- $(srcdir)/include/odp/api/support.h \
+ $(srcdir)/include/odp/api/feature.h \
$(srcdir)/include/odp/api/hash.h \
$(srcdir)/include/odp/api/hints.h \
$(srcdir)/include/odp/api/init.h \
@@ -59,6 +59,7 @@ odpapiinclude_HEADERS = \
$(srcdir)/include/odp/api/spinlock_recursive.h \
$(srcdir)/include/odp/api/std_clib.h \
$(srcdir)/include/odp/api/std_types.h \
+ $(srcdir)/include/odp/api/support.h \
$(srcdir)/include/odp/api/sync.h \
$(srcdir)/include/odp/api/system_info.h \
$(srcdir)/include/odp/api/thread.h \
diff --git a/platform/linux-generic/include/odp/api/feature.h b/platform/linux-generic/include/odp/api/feature.h
new file mode 100644
index 00000000..55a86a83
--- /dev/null
+++ b/platform/linux-generic/include/odp/api/feature.h
@@ -0,0 +1,34 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP features.
+ */
+
+#ifndef ODP_PLAT_FEATURE_H_
+#define ODP_PLAT_FEATURE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @ingroup odp_feature
+ * @{
+ */
+
+/**
+ * @}
+ */
+
+#include <odp/api/spec/feature.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
commit 0ce5d628d817003ca0f96beddece3f618f4593bb
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Fri Jun 16 13:49:40 2017 +0300
api: ipsec: disable event is the last event
Disable event is guaranteed to be the last event for the SA,
so that application can use it for SA destroy synchronization.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Reviewed-by: Nikhil Agarwal <Nikhil.agarwal(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 372ef462..e602e4b8 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -818,7 +818,10 @@ odp_ipsec_sa_t odp_ipsec_sa_create(const odp_ipsec_sa_param_t *param);
*
* When in synchronous operation mode, the call will return when it's possible
* to destroy the SA. In asynchronous mode, the same is indicated by an
- * ODP_EVENT_IPSEC_STATUS event sent to the queue specified for the SA.
+ * ODP_EVENT_IPSEC_STATUS event sent to the queue specified for the SA. The
+ * status event is guaranteed to be the last event for the SA, i.e. all
+ * in-progress operations have completed and resulting events (including status
+ * events) have been enqueued before it.
*
* @param sa IPSEC SA to be disabled
*
commit 65a46f66bfcb6b2034d4b0563facc36cbac1e286
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Fri Jun 16 13:49:39 2017 +0300
api: ipsec: change IPSEC result to packet
Input and output of IPSEC operations are packets. Parameter and
result structures are cleaner when packet arrays are direct
parameters to functions. Also API is more flexible for
application and API pipelining when output is packets with
additional metadata. Application or API pipeline stages which
do not care about IPSEC results may work on basic packet metadata.
IPSEC result event type changes from ODP_EVENT_IPSEC_RESULT to
ODP_EVENT_PACKET. Event subtype (ODP_EVENT_PACKET_IPSEC) can be
used to identify packets with IPSEC metadata.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Reviewed-by: Nikhil Agarwal <Nikhil.agarwal(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 65f0b066..372ef462 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -552,16 +552,18 @@ typedef enum odp_ipsec_frag_mode_t {
/**
* Packet lookup mode
+ *
+ * Lookup mode controls how an SA participates in SA lookup offload.
+ * Inbound operations perform SA lookup if application does not provide a SA as
+ * a parameter. In inline mode, a lookup miss directs the packet back to normal
+ * packet input interface processing. SA lookup failure status (error.sa_lookup)
+ * is reported through odp_ipsec_packet_result_t.
*/
typedef enum odp_ipsec_lookup_mode_t {
- /** Inbound SA lookup is disabled. */
+ /** Inbound SA lookup is disabled for the SA. */
ODP_IPSEC_LOOKUP_DISABLED = 0,
- /** Inbound SA lookup is enabled. Lookup matches only SPI value.
- * In inline mode, a lookup miss directs the packet back to normal
- * packet input interface processing. In other modes, the SA lookup
- * failure status (error.sa_lookup) is reported through
- * odp_ipsec_packet_result_t. */
+ /** Inbound SA lookup is enabled. Lookup matches only SPI value. */
ODP_IPSEC_LOOKUP_SPI,
/** Inbound SA lookup is enabled. Lookup matches both SPI value and
@@ -572,13 +574,13 @@ typedef enum odp_ipsec_lookup_mode_t {
} odp_ipsec_lookup_mode_t;
/**
- * Result event pipeline configuration
+ * IPSEC pipeline configuration
*/
typedef enum odp_ipsec_pipeline_t {
- /** Do not pipeline */
+ /** Do not pipeline. Send all resulting events to the application. */
ODP_IPSEC_PIPELINE_NONE = 0,
- /** Send IPSEC result events to the classifier.
+ /** Send resulting packets to the classifier
*
* IPSEC capability 'pipeline_cls' determines if pipelined
* classification is supported. */
@@ -659,9 +661,9 @@ typedef struct odp_ipsec_sa_param_t {
*/
uint32_t mtu;
- /** Select pipelined destination for IPSEC result events
+ /** Select pipelined destination for resulting events
*
- * Asynchronous and inline modes generate result events. Select where
+ * Asynchronous and inline modes generate events. Select where
* those events are sent. Inbound SAs may choose to use pipelined
* classification. The default value is ODP_IPSEC_PIPELINE_NONE.
*/
@@ -670,18 +672,19 @@ typedef struct odp_ipsec_sa_param_t {
/** Destination queue for IPSEC events
*
* Operations in asynchronous or inline mode enqueue resulting events
- * into this queue.
+ * into this queue. The default queue ('default_queue') is used when
+ * SA is not known.
*/
odp_queue_t dest_queue;
- /** Classifier destination CoS for IPSEC result events
+ /** Classifier destination CoS for resulting packets
*
- * Result events for successfully decapsulated packets are sent to
- * classification through this CoS. Other result events are sent to
- * 'dest_queue'. This field is considered only when 'pipeline' is
+ * Successfully decapsulated packets are sent to classification
+ * through this CoS. Other resulting events are sent to 'dest_queue'.
+ * This field is considered only when 'pipeline' is
* ODP_IPSEC_PIPELINE_CLS. The CoS must not be shared between any pktio
* interface default CoS. The maximum number of different CoS supported
- * is defined by IPsec capability max_cls_cos.
+ * is defined by IPSEC capability max_cls_cos.
*/
odp_cos_t dest_cos;
@@ -850,17 +853,6 @@ int odp_ipsec_sa_destroy(odp_ipsec_sa_t sa);
*/
uint64_t odp_ipsec_sa_to_u64(odp_ipsec_sa_t sa);
-/**
- * IPSEC operation level options
- *
- * These may be used to override some SA level options
- */
-typedef struct odp_ipsec_op_opt_t {
- /** Fragmentation mode */
- odp_ipsec_frag_mode_t mode;
-
-} odp_ipsec_op_opt_t;
-
/** IPSEC operation status has no errors */
#define ODP_IPSEC_OK 0
@@ -870,7 +862,8 @@ typedef struct odp_ipsec_op_status_t {
union {
/** Error flags */
struct {
- /** Protocol error. Not a valid ESP or AH packet. */
+ /** Protocol error. Not a valid ESP or AH packet,
+ * packet data length error, etc. */
uint32_t proto : 1;
/** SA lookup failed */
@@ -934,41 +927,70 @@ typedef struct odp_ipsec_op_status_t {
} odp_ipsec_op_status_t;
/**
- * IPSEC operation input parameters
+ * IPSEC outbound operation options
+ *
+ * These may be used to override some SA level options
*/
-typedef struct odp_ipsec_op_param_t {
- /** Number of packets to be processed */
- int num_pkt;
+typedef struct odp_ipsec_out_opt_t {
+ /** Fragmentation mode */
+ odp_ipsec_frag_mode_t mode;
+
+} odp_ipsec_out_opt_t;
+/**
+ * IPSEC outbound operation parameters
+ */
+typedef struct odp_ipsec_out_param_t {
/** Number of SAs
*
+ * Outbound IPSEC operation needs SA from application. Use either
+ * single SA for all packets, or a SA per packet.
+ *
* Valid values are:
- * * 0: No SAs (default)
- * * 1: Single SA for all packets
- * * num_pkt: SA per packet
+ * - 1: Single SA for all packets
+ * - N: A SA per packet. N must match the number of packets.
*/
int num_sa;
- /** Number of operation options
+ /** Number of outbound operation options
*
* Valid values are:
- * * 0: No options (default)
- * * 1: Single option for all packets
- * * num_pkt: An option per packet
+ * - 0: No options
+ * - 1: Single option for all packets
+ * - N: An option per packet. N must match the number of packets.
*/
int num_opt;
- /** Pointer to an array of packets
+ /** Pointer to an array of IPSEC SAs */
+ odp_ipsec_sa_t *sa;
+
+ /** Pointer to an array of outbound operation options
+ *
+ * May be NULL when num_opt is zero.
+ */
+ odp_ipsec_out_opt_t *opt;
+
+} odp_ipsec_out_param_t;
+
+/**
+ * IPSEC inbound operation parameters
+ */
+typedef struct odp_ipsec_in_param_t {
+ /** Number of SAs
*
- * Each packet must have a valid value for these metadata:
- * * L3 offset: Offset to the first byte of the (outmost) IP header
- * * L4 offset: For inbound direction, when udp_encap is enabled -
- * offset to the first byte of the encapsulating UDP
- * header
+ * Inbound IPSEC operation processes a packet using the SA provided by
+ * the application. If the application does not provide an SA, the
+ * operation searches for the SA by matching the input packet with all
+ * inbound SAs according to the lookup mode (odp_ipsec_lookup_mode_t)
+ * configured in each SA. When passing SAs, use either single SA for
+ * all packets, or a SA per packet.
*
- * @see odp_packet_l3_offset(), odp_packet_l4_offset()
+ * Valid values are:
+ * - 0: No SAs. SA lookup is done for all packets.
+ * - 1: Single SA for all packets
+ * - N: A SA per packet. N must match the number of packets.
*/
- odp_packet_t *pkt;
+ int num_sa;
/** Pointer to an array of IPSEC SAs
*
@@ -976,18 +998,12 @@ typedef struct odp_ipsec_op_param_t {
*/
odp_ipsec_sa_t *sa;
- /** Pointer to an array of operation options
- *
- * May be NULL when num_opt is zero.
- */
- odp_ipsec_op_opt_t *opt;
-
-} odp_ipsec_op_param_t;
+} odp_ipsec_in_param_t;
/**
* Outbound inline IPSEC operation parameters
*/
-typedef struct odp_ipsec_inline_op_param_t {
+typedef struct odp_ipsec_out_inline_param_t {
/** Packet output interface for inline output operation
*
* Outbound inline IPSEC operation uses this packet IO interface to
@@ -1011,7 +1027,7 @@ typedef struct odp_ipsec_inline_op_param_t {
uint32_t len;
} outer_hdr;
-} odp_ipsec_inline_op_param_t;
+} odp_ipsec_out_inline_param_t;
/**
* IPSEC operation result for a packet
@@ -1020,16 +1036,6 @@ typedef struct odp_ipsec_packet_result_t {
/** IPSEC operation status */
odp_ipsec_op_status_t status;
- /** Number of output packets created from the corresponding input packet
- *
- * Without fragmentation offload this is always one. However, if the
- * input packet was fragmented during the operation this is larger than
- * one for the first returned fragment and zero for the rest of the
- * fragments. All the fragments (of the same source packet) are stored
- * consecutively in the 'pkt' array.
- */
- int num_out;
-
/** IPSEC SA that was used to create the packet
*
* Operation updates this SA handle value, when SA look up is performed
@@ -1040,7 +1046,8 @@ typedef struct odp_ipsec_packet_result_t {
odp_ipsec_sa_t sa;
/** Packet outer header status before inbound inline processing.
- * This is valid only when status.flag.inline_mode is set.
+ * This is valid only when outer headers are retained
+ * (see odp_ipsec_inbound_config_t) and status.flag.inline_mode is set.
*/
struct {
/** Points to the first byte of retained outer headers. These
@@ -1048,7 +1055,7 @@ typedef struct odp_ipsec_packet_result_t {
* implementation specific memory space. Since the memory space
* may overlap with e.g. packet head/tailroom, the content
* becomes invalid if packet data storage is modified in
- * anyway. The memory space may not be sharable to other
+ * any way. The memory space may not be shareable to other
* threads. */
uint8_t *ptr;
@@ -1059,51 +1066,6 @@ typedef struct odp_ipsec_packet_result_t {
} odp_ipsec_packet_result_t;
/**
- * IPSEC operation results
- */
-typedef struct odp_ipsec_op_result_t {
- /** Number of packets
- *
- * Application sets this to the maximum number of packets the operation
- * may output (number of elements in 'pkt' and 'res' arrays).
- * The operation updates it with the actual number of packets
- * outputted.
- */
- int num_pkt;
-
- /** Pointer to an array of packets
- *
- * Operation outputs packets into this array. The array must have
- * at least 'num_pkt' elements.
- *
- * Each successfully transformed packet has a valid value for these
- * metadata regardless of the inner packet parse configuration.
- * (odp_ipsec_inbound_config_t):
- * * L3 offset: Offset to the first byte of the (outmost) IP header
- * * pktio: For inbound inline IPSEC processed packets, original
- * packet input interface
- *
- * Other metadata for parse results and error checks depend on
- * configuration (selected parse and error check levels).
- */
- odp_packet_t *pkt;
-
- /** Pointer to an array of per packet operation results
- *
- * Operation outputs results for each outputted packet into this array.
- * The array must have at least 'num_pkt' elements. The results include
- * operation status and packet form information for each outputted
- * packet.
- *
- * For example, some packets may not have been transformed due to
- * an error, but the original packet is returned with appropriate
- * packet result information instead.
- */
- odp_ipsec_packet_result_t *res;
-
-} odp_ipsec_op_result_t;
-
-/**
* IPSEC status ID
*/
typedef enum odp_ipsec_status_id_t {
@@ -1136,20 +1098,33 @@ typedef struct odp_ipsec_status_t {
*
* This operation does inbound IPSEC processing in synchronous mode
* (ODP_IPSEC_OP_MODE_SYNC). A successful operation returns the number of
- * packets consumed and outputs a new packet handle as well as an operation
- * result for each outputted packet. The operation does not modify packets that
- * it does not consume. It cannot consume all input packets if 'output.num_pkt'
- * is smaller than 'input.num_pkt'.
+ * packets consumed and outputs a new packet handle for each outputted packet.
+ * Outputted packets contain IPSEC result metadata (odp_ipsec_packet_result_t),
+ * which should be checked for transformation errors, etc. Outputted packets
+ * with error status have not been transformed but the original packet is
+ * returned. The operation does not modify packets that it does not consume.
+ * It cannot consume all input packets if 'num_out' is smaller than 'num_in'.
*
* Packet context pointer and user area content are copied from input to output
* packets. Output packets are allocated from the same pool(s) as input packets.
*
- * When 'input.num_sa' is zero, this operation performs SA look up for each
+ * When 'param.num_sa' is zero, this operation performs SA look up for each
* packet. Otherwise, application must provide the SA(s) as part of operation
- * input parameters (odp_ipsec_op_param_t). The operation outputs used SA(s) as
- * part of per packet operation results (odp_ipsec_packet_result_t), or an error
+ * input parameters (odp_ipsec_in_param_t). The operation outputs used SA(s) as
+ * part of per packet results (odp_ipsec_packet_result_t), or an error
* status if a SA was not found.
*
+ * Each input packet must have a valid value for these metadata (other metadata
+ * is ignored):
+ * - L3 offset: Offset to the first byte of the (outmost) IP header
+ * - L4 offset: When udp_encap is enabled, offset to the first byte of the
+ * encapsulating UDP header
+ *
+ * Additionally, implementation checks input IP packet length (odp_packet_len()
+ * minus odp_packet_l3_offset()) against protocol headers and reports an error
+ * (status.error.proto) if packet data length is less than protocol headers
+ * indicate.
+ *
* Packets are processed in the input order. Packet order is maintained from
* input 'pkt' array to output 'pkt' array. Packet order is not guaranteed
* between calling threads.
@@ -1162,35 +1137,61 @@ typedef struct odp_ipsec_status_t {
* restored. The amount and content of packet data before the IP header is
* undefined.
*
- * @param input Operation input parameters
- * @param[out] output Operation results
- *
- * @return Number of input packets consumed (0 ... input.num_pkt)
+ * Each successfully transformed packet has a valid value for these metadata
+ * regardless of the inner packet parse configuration
+ * (odp_ipsec_inbound_config_t):
+ * - L3 offset: Offset to the first byte of the (outmost) IP header
+ * - pktio: For inline IPSEC processed packets, original packet input
+ * interface
+ *
+ * Other metadata for parse results and error checks depend on configuration
+ * (selected parse and error check levels).
+ *
+ * @param pkt_in Packets to be processed
+ * @param num_in Number of packets to be processed
+ * @param[out] pkt_out Packet handle array for resulting packets
+ * @param[in, out] num_out Number of resulting packets. Application sets this
+ * to 'pkt_out' array size. A successful operation sets
+ * this to the number of outputted packets
+ * (1 ... num_out).
+ * @param param Inbound operation parameters
+ *
+ * @return Number of input packets consumed (0 ... num_in)
* @retval <0 On failure
*
- * @see odp_packet_user_ptr(), odp_packet_user_area()
+ * @see odp_packet_user_ptr(), odp_packet_user_area(), odp_packet_l3_offset(),
+ * odp_packet_l4_offset()
*/
-int odp_ipsec_in(const odp_ipsec_op_param_t *input,
- odp_ipsec_op_result_t *output);
+int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in,
+ odp_packet_t pkt_out[], int *num_out,
+ const odp_ipsec_in_param_t *param);
/**
* Outbound synchronous IPSEC operation
*
* This operation does outbound IPSEC processing in synchronous mode
* (ODP_IPSEC_OP_MODE_SYNC). A successful operation returns the number of
- * packets consumed and outputs a new packet handle as well as an operation
- * result for each outputted packet. The operation does not modify packets that
- * it does not consume. It cannot consume all input packets if 'output.num_pkt'
- * is smaller than 'input.num_pkt'.
+ * packets consumed and outputs a new packet handle for each outputted packet.
+ * Outputted packets contain IPSEC result metadata (odp_ipsec_packet_result_t),
+ * which should be checked for transformation errors, etc. Outputted packets
+ * with error status have not been transformed but the original packet is
+ * returned. The operation does not modify packets that it does not consume.
+ * It cannot consume all input packets if 'num_out' is smaller than 'num_in'.
*
* Packet context pointer and user area content are copied from input to output
* packets. Output packets are allocated from the same pool(s) as input packets.
*
* When outbound IP fragmentation offload is enabled, the number of outputted
- * packets (and corresponding per packet results) may be greater than
- * the number of input packets. In that case, application may examine 'num_out'
- * of each packet result (odp_ipsec_packet_result_t) to find out which
- * fragments are originated from which input packet.
+ * packets may be greater than the number of input packets.
+ *
+ * Each input packet must have a valid value for these metadata (other metadata
+ * is ignored):
+ * - L3 offset: Offset to the first byte of the (outmost) IP header
+ * - L4 offset: Offset to the L4 header if L4 checksum offload is requested
+ *
+ * Additionally, input IP packet length (odp_packet_len() minus
+ * odp_packet_l3_offset()) must match values in protocol headers. Otherwise
+ * results are undefined.
*
* Packets are processed in the input order. Packet order is maintained from
* input 'pkt' array to output 'pkt' array. Packet order is not guaranteed
@@ -1201,31 +1202,40 @@ int odp_ipsec_in(const odp_ipsec_op_param_t *input,
* with IPSEC, etc headers constructed according to the standards. The amount
* and content of packet data before the IP header is undefined.
*
- * @param input Operation input parameters
- * @param[out] output Operation results
+ * Each successfully transformed packet has a valid value for these metadata:
+ * - L3 offset: Offset to the first byte of the (outmost) IP header
+ *
+ * @param pkt_in Packets to be processed
+ * @param num_in Number of packets to be processed
+ * @param[out] pkt_out Packet handle array for resulting packets
+ * @param[in, out] num_out Number of resulting packets. Application sets this
+ * to 'pkt_out' array size. A successful operation sets
+ * this to the number of outputted packets
+ * (1 ... num_out).
+ * @param param Outbound operation parameters
*
- * @return Number of input packets consumed (0 ... input.num_pkt)
+ * @return Number of input packets consumed (0 ... num_in)
* @retval <0 On failure
*
- * @see odp_packet_user_ptr(), odp_packet_user_area()
+ * @see odp_packet_user_ptr(), odp_packet_user_area(), odp_packet_l3_offset()
*/
-int odp_ipsec_out(const odp_ipsec_op_param_t *input,
- odp_ipsec_op_result_t *output);
+int odp_ipsec_out(const odp_packet_t pkt_in[], int num_in,
+ odp_packet_t pkt_out[], int *num_out,
+ const odp_ipsec_out_param_t *param);
/**
* Inbound asynchronous IPSEC operation
*
* This operation does inbound IPSEC processing in asynchronous mode. It
- * processes packets otherwise identically to odp_ipsec_in(), but outputs all
- * results through one or more ODP_EVENT_IPSEC_RESULT events with the following
- * ordering considerations.
+ * processes packets otherwise identically to odp_ipsec_in(), but outputs
+ * resulting packets as ODP_EVENT_PACKET events (with ODP_EVENT_PACKET_IPSEC
+ * subtype). The following ordering considerations apply to the events.
*
* Asynchronous mode maintains packet order per SA when application calls the
* operation within an ordered or atomic scheduler context of the same queue.
- * Resulting events for the same SA are enqueued in order and packet handles
- * (for the same SA) are stored in order within an event. Packet order per SA at
- * a destination queue is the same as if application would have enqueued packets
- * there with odp_queue_enq_multi().
+ * Resulting events for the same SA are enqueued in order. Packet order per SA
+ * at a destination queue is the same as if application would have enqueued
+ * packets there with odp_queue_enq_multi().
*
* Packet order is also maintained when application otherwise guarantees
* (e.g. using locks) that the operation is not called simultaneously from
@@ -1239,29 +1249,31 @@ int odp_ipsec_out(const odp_ipsec_op_param_t *input,
* may be processed simultaneously in both modes (initiated by this function
* and inline operation).
*
- * @param input Operation input parameters
+ * @param pkt Packets to be processed
+ * @param num Number of packets to be processed
+ * @param param Inbound operation parameters
*
- * @return Number of input packets consumed (0 ... input.num_pkt)
+ * @return Number of input packets consumed (0 ... num)
* @retval <0 On failure
*
* @see odp_ipsec_in(), odp_ipsec_result()
*/
-int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input);
+int odp_ipsec_in_enq(const odp_packet_t pkt[], int num,
+ const odp_ipsec_in_param_t *param);
/**
* Outbound asynchronous IPSEC operation
*
* This operation does outbound IPSEC processing in asynchronous mode. It
- * processes packets otherwise identically to odp_ipsec_out(), but outputs all
- * results through one or more ODP_EVENT_IPSEC_RESULT events with the following
- * ordering considerations.
+ * processes packets otherwise identically to odp_ipsec_out(), but outputs
+ * resulting packets as ODP_EVENT_PACKET events (with ODP_EVENT_PACKET_IPSEC
+ * subtype). The following ordering considerations apply to the events.
*
* Asynchronous mode maintains packet order per SA when application calls the
* operation within an ordered or atomic scheduler context of the same queue.
- * Resulting events for the same SA are enqueued in order and packet handles
- * (for the same SA) are stored in order within an event. Packet order per SA at
- * a destination queue is the same as if application would have enqueued packets
- * there with odp_queue_enq_multi().
+ * Resulting events for the same SA are enqueued in order. Packet order per SA
+ * at a destination queue is the same as if application would have enqueued
+ * packets there with odp_queue_enq_multi().
*
* Packet order is also maintained when application otherwise guarantees
* (e.g. using locks) that the operation is not called simultaneously from
@@ -1273,14 +1285,17 @@ int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input);
* The function may be used also in inline processing mode, e.g. for IPSEC
* packets for which inline processing is not possible.
*
- * @param input Operation input parameters
+ * @param pkt Packets to be processed
+ * @param num Number of packets to be processed
+ * @param param Outbound operation parameters
*
- * @return Number of input packets consumed (0 ... input.num_pkt)
+ * @return Number of input packets consumed (0 ... num)
* @retval <0 On failure
*
* @see odp_ipsec_out(), odp_ipsec_result()
*/
-int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input);
+int odp_ipsec_out_enq(const odp_packet_t pkt[], int num,
+ const odp_ipsec_out_param_t *param);
/**
* Outbound inline IPSEC operation
@@ -1288,42 +1303,75 @@ int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input);
* This operation does outbound inline IPSEC processing for the packets. It's
* otherwise identical to odp_ipsec_out_enq(), but outputs all successfully
* transformed packets to the specified output interface, instead of generating
- * result events for those.
+ * events for those.
*
* Inline operation parameters are defined per packet. The array of parameters
- * must have 'op_param.num_pkt' elements and is pointed to by 'inline_param'.
+ * must have 'num' elements and is pointed to by 'inline_param'.
*
- * @param op_param Operation parameters
- * @param inline_param Outbound inline operation specific parameters
+ * @param pkt Packets to be processed
+ * @param num Number of packets to be processed
+ * @param param Outbound operation parameters
+ * @param inline_param Outbound inline operation specific parameters
*
- * @return Number of packets consumed (0 ... op_param.num_pkt)
+ * @return Number of packets consumed (0 ... num)
* @retval <0 On failure
*
* @see odp_ipsec_out_enq()
*/
-int odp_ipsec_out_inline(const odp_ipsec_op_param_t *op_param,
- const odp_ipsec_inline_op_param_t *inline_param);
+int odp_ipsec_out_inline(const odp_packet_t pkt[], int num,
+ const odp_ipsec_out_param_t *param,
+ const odp_ipsec_out_inline_param_t *inline_param);
+
+/**
+ * Convert IPSEC processed packet event to packet handle
+ *
+ * Get packet handle to an IPSEC processed packet event. Event subtype must be
+ * ODP_EVENT_IPSEC_PACKET. IPSEC operation results can be examined with
+ * odp_ipsec_result().
+ *
+ * @param ev Event handle
+ *
+ * @return Packet handle
+ *
+ * @see odp_event_subtype(), odp_ipsec_result()
+ */
+odp_packet_t odp_ipsec_packet_from_event(odp_event_t ev);
/**
- * Get IPSEC results from an ODP_EVENT_IPSEC_RESULT event
+ * Convert IPSEC processed packet handle to event
+ *
+ * The packet handle must be an output of an IPSEC operation.
*
- * Copies IPSEC operation results from an event. The event must be of
- * type ODP_EVENT_IPSEC_RESULT. It must be freed before the application passes
- * any resulting packet handles to other ODP calls.
+ * @param pkt Packet handle from IPSEC operation
*
- * @param[out] result Pointer to operation result for output. Maybe NULL, if
- * application is interested only on the number of
- * packets.
- * @param event An ODP_EVENT_IPSEC_RESULT event
+ * @return Event handle
+ */
+odp_event_t odp_ipsec_packet_to_event(odp_packet_t pkt);
+
+/**
+ * Get IPSEC operation results from an IPSEC processed packet
*
- * @return Number of packets in the event. If this is larger than
- * 'result.num_pkt', all packets did not fit into result struct and
- * application must call the function again with a larger result struct.
+ * Successful IPSEC operations of all types (SYNC, ASYNC and INLINE) produce
+ * packets which contain IPSEC result metadata. This function copies the
+ * operation results from an IPSEC processed packet. Event subtype of this kind
+ * of packet is ODP_EVENT_PACKET_IPSEC. Results are undefined if a non-IPSEC
+ * processed packet is passed as input.
+ *
+ * Some packet API operations output a new packet handle
+ * (e.g. odp_packet_concat()). IPSEC metadata remain valid as long as the packet
+ * handle is not changed from the original (output of e.g. odp_ipsec_in() or
+ * odp_ipsec_packet_from_event() call) IPSEC processed packet handle.
+ *
+ * @param[out] result Pointer to operation result for output
+ * @param packet An IPSEC processed packet (ODP_EVENT_PACKET_IPSEC)
+ *
+ * @retval 0 On success
* @retval <0 On failure
*
- * @see odp_ipsec_in_enq(), odp_ipsec_out_enq()
+ * @see odp_ipsec_in(), odp_ipsec_in_enq(), odp_ipsec_out(),
+ * odp_ipsec_out_enq(), odp_ipsec_packet_from_event()
*/
-int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event);
+int odp_ipsec_result(odp_ipsec_packet_result_t *result, odp_packet_t packet);
/**
* Get IPSEC status information from an ODP_EVENT_IPSEC_STATUS event
diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c
index 10918dfb..c7eeb4ec 100644
--- a/platform/linux-generic/odp_ipsec.c
+++ b/platform/linux-generic/odp_ipsec.c
@@ -73,51 +73,68 @@ int odp_ipsec_sa_destroy(odp_ipsec_sa_t sa)
return -1;
}
-int odp_ipsec_in(const odp_ipsec_op_param_t *input,
- odp_ipsec_op_result_t *output)
-{
- (void)input;
- (void)output;
+int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in,
+ odp_packet_t pkt_out[], int *num_out,
+ const odp_ipsec_in_param_t *param)
+{
+ (void)pkt_in;
+ (void)num_in;
+ (void)pkt_out;
+ (void)num_out;
+ (void)param;
return -1;
}
-int odp_ipsec_out(const odp_ipsec_op_param_t *input,
- odp_ipsec_op_result_t *output)
+int odp_ipsec_out(const odp_packet_t pkt_in[], int num_in,
+ odp_packet_t pkt_out[], int *num_out,
+ const odp_ipsec_out_param_t *param)
{
- (void)input;
- (void)output;
+ (void)pkt_in;
+ (void)num_in;
+ (void)pkt_out;
+ (void)num_out;
+ (void)param;
return -1;
}
-int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input)
+int odp_ipsec_in_enq(const odp_packet_t pkt[], int num,
+ const odp_ipsec_in_param_t *param)
{
- (void)input;
+ (void)pkt;
+ (void)num;
+ (void)param;
return -1;
}
-int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input)
+int odp_ipsec_out_enq(const odp_packet_t pkt[], int num,
+ const odp_ipsec_out_param_t *param)
{
- (void)input;
+ (void)pkt;
+ (void)num;
+ (void)param;
return -1;
}
-int odp_ipsec_out_inline(const odp_ipsec_op_param_t *op_param,
- const odp_ipsec_inline_op_param_t *inline_param)
+int odp_ipsec_out_inline(const odp_packet_t pkt[], int num,
+ const odp_ipsec_out_param_t *param,
+ const odp_ipsec_out_inline_param_t *inline_param)
{
- (void)op_param;
+ (void)pkt;
+ (void)num;
+ (void)param;
(void)inline_param;
return -1;
}
-int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event)
+int odp_ipsec_result(odp_ipsec_packet_result_t *result, odp_packet_t packet)
{
(void)result;
- (void)event;
+ (void)packet;
return -1;
}
@@ -145,6 +162,20 @@ void *odp_ipsec_sa_context(odp_ipsec_sa_t sa)
return NULL;
}
+odp_packet_t odp_ipsec_packet_from_event(odp_event_t ev)
+{
+ (void)ev;
+
+ return ODP_PACKET_INVALID;
+}
+
+odp_event_t odp_ipsec_packet_to_event(odp_packet_t pkt)
+{
+ (void)pkt;
+
+ return ODP_EVENT_INVALID;
+}
+
uint64_t odp_ipsec_sa_to_u64(odp_ipsec_sa_t sa)
{
return _odp_pri(sa);
commit 441fb964f22b2baaa97641e6f8dda88d32d153f6
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Fri Jun 16 13:49:38 2017 +0300
api: event: add subtype to expand event type
Event subtype gives more detailed information about the event.
Two subtypes (basic and IPSEC packet) are introduced initially.
Later on, other packet producing APIs (crypto, comp, etc) may
also produce packet events with additional subtypes.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Reviewed-by: Nikhil Agarwal <Nikhil.agarwal(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/event.h b/include/odp/api/spec/event.h
index f22efce5..2ad3ce84 100644
--- a/include/odp/api/spec/event.h
+++ b/include/odp/api/spec/event.h
@@ -37,21 +37,91 @@ extern "C" {
/**
* @typedef odp_event_type_t
- * ODP event types:
- * ODP_EVENT_BUFFER, ODP_EVENT_PACKET, ODP_EVENT_TIMEOUT,
- * ODP_EVENT_CRYPTO_COMPL, ODP_EVENT_IPSEC_RESULT, ODP_EVENT_IPSEC_STATUS
+ * Event type
+ *
+ * Event type specifies purpose and general format of an event. It can be
+ * checked with odp_event_type() or odp_event_types(). Each event type has
+ * functions (e.g. odp_buffer_from_event()) to convert between the generic event
+ * handle (odp_event_t) and the type specific handle (e.g. odp_buffer_t).
+ * Results are undefined, if conversion function of a wrong event type is used.
+ * Application cannot change event type by chaining conversion functions.
+ *
+ * List of event types:
+ * - ODP_EVENT_BUFFER
+ * - Buffer event (odp_buffer_t) for simple data storage and message passing
+ * - ODP_EVENT_PACKET
+ * - Packet event (odp_packet_t) containing packet data and plenty of
+ * packet processing related metadata
+ * - ODP_EVENT_TIMEOUT
+ * - Timeout event (odp_timeout_t) from a timer
+ * - ODP_EVENT_CRYPTO_COMPL
+ * - Crypto completion event (odp_crypto_compl_t)
+ * - ODP_EVENT_IPSEC_STATUS
+ * - IPSEC status update event (odp_ipsec_status_t)
*/
/**
- * Get event type
+ * @typedef odp_event_subtype_t
+ * Event subtype
*
- * @param event Event handle
+ * Event subtype expands event type specification by providing more detailed
+ * purpose and format of an event. It can be checked with odp_event_subtype() or
+ * odp_event_types(). Each event subtype may define specific functions
+ * (e.g. odp_ipsec_packet_from_event()) to convert between the generic event
+ * handle (odp_event_t) and event type specific handle (e.g. odp_packet_t). When
+ * subtype is known, these subtype specific functions should be preferred over
+ * the event type general function (e.g. odp_packet_from_event()). Results are
+ * undefined, if conversion function of a wrong event subtype is used.
+ * Application cannot change event subtype by chaining conversion functions.
+ *
+ * List of event subtypes:
+ * - ODP_EVENT_PACKET_BASIC
+ * - Packet event (odp_packet_t) with basic packet metadata
+ * - ODP_EVENT_PACKET_IPSEC
+ * - Packet event (odp_packet_t) generated as a result of an IPsec
+ * operation. It contains IPSEC specific metadata in addition to the basic
+ * packet metadata.
+ * - ODP_EVENT_NO_SUBTYPE
+ * - An event type does not have any subtypes defined
+ */
+
+/**
+ * Event type of an event
+ *
+ * Event type specifies purpose and general format of an event.
+ *
+ * @param event Event handle
*
* @return Event type
*/
odp_event_type_t odp_event_type(odp_event_t event);
/**
+ * Event subtype of an event
+ *
+ * Event subtype expands event type specification by providing more detailed
+ * purpose and format of an event.
+ *
+ * @param event Event handle
+ *
+ * @return Event subtype
+ */
+odp_event_subtype_t odp_event_subtype(odp_event_t event);
+
+/**
+ * Event type and subtype of an event
+ *
+ * Returns event type and outputs event subtype.
+ *
+ * @param event Event handle
+ * @param[out] subtype Pointer to event subtype for output
+ *
+ * @return Event type
+ */
+odp_event_type_t odp_event_types(odp_event_t event,
+ odp_event_subtype_t *subtype);
+
+/**
* Get printable value for an odp_event_t
*
* @param hdl odp_event_t handle to be printed
diff --git a/include/odp/arch/default/api/abi/event.h b/include/odp/arch/default/api/abi/event.h
index 87220d63..ab3c0f75 100644
--- a/include/odp/arch/default/api/abi/event.h
+++ b/include/odp/arch/default/api/abi/event.h
@@ -29,10 +29,15 @@ typedef enum odp_event_type_t {
ODP_EVENT_PACKET = 2,
ODP_EVENT_TIMEOUT = 3,
ODP_EVENT_CRYPTO_COMPL = 4,
- ODP_EVENT_IPSEC_RESULT = 5,
- ODP_EVENT_IPSEC_STATUS = 6
+ ODP_EVENT_IPSEC_STATUS = 5
} odp_event_type_t;
+typedef enum odp_event_subtype_t {
+ ODP_EVENT_NO_SUBTYPE = 0,
+ ODP_EVENT_PACKET_BASIC = 1,
+ ODP_EVENT_PACKET_IPSEC = 2
+} odp_event_subtype_t;
+
/**
* @}
*/
diff --git a/platform/linux-generic/include/odp/api/plat/event_types.h b/platform/linux-generic/include/odp/api/plat/event_types.h
index 0f517834..5b3a07e3 100644
--- a/platform/linux-generic/include/odp/api/plat/event_types.h
+++ b/platform/linux-generic/include/odp/api/plat/event_types.h
@@ -39,9 +39,15 @@ typedef enum odp_event_type_t {
ODP_EVENT_PACKET = 2,
ODP_EVENT_TIMEOUT = 3,
ODP_EVENT_CRYPTO_COMPL = 4,
- ODP_EVENT_IPSEC_RESULT = 5
+ ODP_EVENT_IPSEC_STATUS = 5
} odp_event_type_t;
+typedef enum odp_event_subtype_t {
+ ODP_EVENT_NO_SUBTYPE = 0,
+ ODP_EVENT_PACKET_BASIC = 1,
+ ODP_EVENT_PACKET_IPSEC = 2
+} odp_event_subtype_t;
+
/**
* @}
*/
commit d5ff31f14e87c815d3a0e0461206aa2687152dd5
Merge: 4bcd15e2 09a7800c
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Thu Jun 22 18:41:49 2017 +0300
Merge branch 'master' into api-next
diff --cc platform/linux-generic/odp_packet_io.c
index 8fb5b5ee,e5436a90..4dd28549
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@@ -564,15 -563,14 +563,14 @@@ static inline int pktin_recv_buf(odp_pk
for (i = 0; i < pkts; i++) {
pkt = packets[i];
pkt_hdr = odp_packet_hdr(pkt);
- buf = _odp_packet_to_buffer(pkt);
- buf_hdr = buf_hdl_to_hdr(buf);
+ buf_hdr = packet_to_buf_hdr(pkt);
if (pkt_hdr->p.input_flags.dst_queue) {
- queue_entry_t *dst_queue;
+ queue_t dst_queue;
int ret;
- dst_queue = queue_to_qentry(pkt_hdr->dst_queue);
- ret = queue_enq(dst_queue, buf_hdr);
+ dst_queue = queue_fn->from_ext(pkt_hdr->dst_queue);
+ ret = queue_fn->enq(dst_queue, buf_hdr);
if (ret < 0)
odp_packet_free(pkt);
continue;
@@@ -582,9 -580,9 +580,9 @@@
return num_rx;
}
-int pktout_enqueue(queue_entry_t *qentry, odp_buffer_hdr_t *buf_hdr)
+int pktout_enqueue(queue_t qentry, odp_buffer_hdr_t *buf_hdr)
{
- odp_packet_t pkt = _odp_packet_from_buffer(buf_hdr->handle.handle);
+ odp_packet_t pkt = packet_from_buf_hdr(buf_hdr);
int len = 1;
int nbr;
@@@ -611,9 -612,9 +609,9 @@@ int pktout_enq_multi(queue_t qentry, od
return nbr;
for (i = 0; i < num; ++i)
- pkt_tbl[i] = _odp_packet_from_buffer(buf_hdr[i]->handle.handle);
+ pkt_tbl[i] = packet_from_buf_hdr(buf_hdr[i]);
- nbr = odp_pktout_send(qentry->s.pktout, pkt_tbl, num);
+ nbr = odp_pktout_send(queue_fn->get_pktout(qentry), pkt_tbl, num);
return nbr;
}
-----------------------------------------------------------------------
Summary of changes:
.travis.yml | 1 +
doc/application-api-guide/examples.dox | 5 +
doc/users-guide/users-guide.adoc | 36 +-
example/Makefile.am | 1 +
example/ipfragreass/.gitignore | 3 +
example/ipfragreass/Makefile.am | 23 +
example/ipfragreass/odp_ipfragreass.c | 376 ++++++++++
example/ipfragreass/odp_ipfragreass_atomics.h | 55 ++
example/ipfragreass/odp_ipfragreass_atomics_arm.h | 120 ++++
example/ipfragreass/odp_ipfragreass_fragment.c | 99 +++
example/ipfragreass/odp_ipfragreass_fragment.h | 28 +
example/ipfragreass/odp_ipfragreass_helpers.c | 124 ++++
example/ipfragreass/odp_ipfragreass_helpers.h | 79 +++
example/ipfragreass/odp_ipfragreass_ip.h | 251 +++++++
example/ipfragreass/odp_ipfragreass_reassemble.c | 771 +++++++++++++++++++++
example/ipfragreass/odp_ipfragreass_reassemble.h | 211 ++++++
example/m4/configure.m4 | 1 +
include/odp/api/spec/event.h | 80 ++-
include/odp/api/spec/feature.h | 69 ++
include/odp/api/spec/init.h | 15 +
include/odp/api/spec/ipsec.h | 417 ++++++-----
include/odp/arch/default/api/abi/event.h | 9 +-
include/odp_api.h | 1 +
platform/Makefile.inc | 1 +
platform/linux-generic/Makefile.am | 3 +-
platform/linux-generic/arch/arm/odp_cpu_arch.c | 38 +-
.../include/odp/api/{support.h => feature.h} | 10 +-
.../include/odp/api/plat/event_types.h | 8 +-
.../linux-generic/include/odp_packet_internal.h | 10 +
platform/linux-generic/odp_init.c | 5 +
platform/linux-generic/odp_ipsec.c | 67 +-
platform/linux-generic/odp_packet_io.c | 8 +-
platform/linux-generic/pktio/loop.c | 4 +-
test/common_plat/validation/api/init/init.c | 8 +-
34 files changed, 2704 insertions(+), 233 deletions(-)
create mode 100644 example/ipfragreass/.gitignore
create mode 100644 example/ipfragreass/Makefile.am
create mode 100644 example/ipfragreass/odp_ipfragreass.c
create mode 100644 example/ipfragreass/odp_ipfragreass_atomics.h
create mode 100644 example/ipfragreass/odp_ipfragreass_atomics_arm.h
create mode 100644 example/ipfragreass/odp_ipfragreass_fragment.c
create mode 100644 example/ipfragreass/odp_ipfragreass_fragment.h
create mode 100644 example/ipfragreass/odp_ipfragreass_helpers.c
create mode 100644 example/ipfragreass/odp_ipfragreass_helpers.h
create mode 100644 example/ipfragreass/odp_ipfragreass_ip.h
create mode 100644 example/ipfragreass/odp_ipfragreass_reassemble.c
create mode 100644 example/ipfragreass/odp_ipfragreass_reassemble.h
create mode 100644 include/odp/api/spec/feature.h
copy platform/linux-generic/include/odp/api/{support.h => feature.h} (59%)
hooks/post-receive
--