aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2017-08-10 16:35:10 +0300
committerYi He <yi.he@linaro.org>2017-08-15 09:52:41 +0800
commit4e11ef454d383b9637541c53ad4eeda65751742b (patch)
tree37c73efa6985b7c27fd659b56bb88fe815d060cb
parent7dce7af2c3a936f711e845ffcf765bfb1cc3c95a (diff)
merge: squashed commit: odp-dpdk to odp cloudcloud-before-modular-pool
commit d8533b4e575d62c9f6f2caedd38d98a1a56fb8d3 Merge: 716fed67 107b9411 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 26 11:22:25 2017 +0200 Sync odp-dpdk with v1.15 release from odp commit 107b9411e85aad0a48d759fbf0572a631e189a02 Author: Matias Elo <matias.elo@nokia.com> Date: Wed Jul 19 12:29:48 2017 +0300 linux-dpdk: porting "linux-gen: packet: remove lazy parsing" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Kevin Wang <kevin.wang@arm.com> commit 923550217b3800b2826965b1e7e964d799af7d94 Author: Matias Elo <matias.elo@nokia.com> Date: Mon Jul 17 15:31:18 2017 +0300 linux-dpdk: port time implementation changes dfbab74 linux-gen: time: store timespec as nsec fbe34c7 linux-gen: time: use hw time counter when available 08fe6f0 fix invalid casting on a 32-bit host Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Kevin Wang <kevin.wang@arm.com> commit 27cfa741e4d80919fd352f3660351ac4fb631031 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Jul 13 14:18:25 2017 +0200 linux-dpdk:porting "crypto: add HMAC-SHA-512 authentication support" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 48ad99f7b4acca7577a17e259f1489cf4c7816d9 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Jul 13 14:13:28 2017 +0200 linux-dpdk:porting "crypto: add SHA-1 authentication support" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit c2c3ed55057e1a8032da4cff3ef0b61d38b33d58 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Jul 13 07:55:57 2017 +0200 linux-dpdk:porting "update AES-GCM support to reflect aad and auth_digest_len" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit d0eb8f2e9610cd61131f9e2e9e3f78ca68c8706f Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 17:35:03 2017 +0200 linux-dpdk:porting "cpu_flags: added x86 cpu flag read functions" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 2f144ba129628bd0e38b9804f9f7326380d70b2b Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 17:31:25 2017 +0200 linux-dpdk:porting "time: remove odp_time_to_u64 from API" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit df1b969c806659be3c37ee16d58325f54ee8c6f7 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 17:28:49 2017 +0200 linux-dpdk:porting "types: add additional doxygen documentation" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 773ff75a304bbdd4362a8a8064be84e9d76d1a46 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 17:24:46 2017 +0200 linux-dpdk:porting "packet: recognize ICMPv6 packets" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 4e1a38d1f75dac1fefd255083a605952c211a4df Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 17:17:45 2017 +0200 linux-dpdk: porting "deprecated: add configure option and macros" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 165f61d03a751374f55729257560e1435c34eb0d Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 17:10:19 2017 +0200 linux-dpdk: porting "crypto: enforce deprecated API status" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 22187ee507099a0b7c03e9f96b6399dc6a43eb68 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 16:42:39 2017 +0200 linux-dpdk: porting "do not trap if libatomic is not found" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 3d30a4d26953f3823588a0443226651b745b119c Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 16:39:53 2017 +0200 linux-dpdk: porting "build: GCC 7 fixes" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit c62c615e3358c4f7018788af1e88bbda38db2d36 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 16:05:33 2017 +0200 linux-dpdk: porting "makefile: fix staged install support" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 5ca377b73201924be54b748e52f56aee94ee564c Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 15:57:41 2017 +0200 linux-dpdk: porting "crypto: properly handle errors in packet copy" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit e8926e29cb4c66b76bf171d404ed1ed9246374a4 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 15:45:32 2017 +0200 linux-dpdk: porting "add syntax to allow newer clang to compile odp" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 7783e68c8c72c75ce331ed06cedc2f2a8e1674a1 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 15:36:12 2017 +0200 linux-dpdk: porting "pool: don't allocate buffers from invalid pool" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit a29e079bb362a84e3c821dfef1cb60b2eb1a758d Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 15:30:58 2017 +0200 linux-dpdk: porting "packet: make inline table visible" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 03d11d06e8329f5e5575a50fb9e6b22e280e8396 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 15:28:02 2017 +0200 linux-dpdk: port "abi: fix include/odp/api/abi symlink creation" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit fac3d65908a081764413656bfc7f2bc7bfb5a648 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 15:24:48 2017 +0200 linux-dpdk: port "pool: add odp_pool_capability() rc check" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 8ce393f99837119cd47b68e54de5171fc4acbda2 Merge: 716fed67 5dd7d9ed Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Jul 12 15:08:17 2017 +0200 Merge tag 'v1.15.0.0' into odp_dpdk commit 716fed6776977db67a0c498b0c3990887903f08d Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Nov 7 13:39:41 2016 +0100 linux-dpdk: crypto accelaration support Running odp-dpdk with dpdk sw/hw crypto support Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 263f18fbc1cfb37d513d48fe99a82f8a7a74c3a9 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Fri Jun 30 09:44:36 2017 +0200 Revert "linux-dpdk: crypto accelaration support" This reverts commit 9a842d413264bbd12c17d25640056e331e3b7f29. Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit fba1d3ab00e529670840749a9ea18542eca16792 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Nov 7 13:39:41 2016 +0100 linux-dpdk: crypto accelaration support Running odp-dpdk with dpdk sw/hw crypto support Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 55c3a23f6cfedb678dca8891499f1af3caa065fd Author: Matias Elo <matias.elo@nokia.com> Date: Tue May 16 16:48:08 2017 +0300 Port bd9f5847 "linux-gen: packet: inline flag functions" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit fd145cc6837b269e680878870b80f0b4d5260eb2 Author: Matias Elo <matias.elo@nokia.com> Date: Tue May 16 13:31:40 2017 +0300 linux-dpdk: fix doxygen warnings Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 923bb32980273abcc387f0e94f46136ca39eca6c Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Fri May 12 00:46:18 2017 +0200 linux-dpdk: fix build when running with --disable-abi-compat Suggested-by: Matias Elo <matias.elo@nokia.com> Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 5f16f4cdd606fe3873c4be4492effef47f508d25 Author: Matias Elo <matias.elo@nokia.com> Date: Wed Apr 26 17:10:59 2017 +0300 linux-dpdk: pktio: reset packet parser metadata in receive Previously parser metadata was not properly cleared leading to errors when calling packet member functions. Suggested-by: Nubin Stanley <nubin.stanley@nokia.com> Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit f624a092961ba6565d28396b947e93a5e8b5ff7d Author: Matias Elo <matias.elo@nokia.com> Date: Wed Apr 26 16:32:04 2017 +0300 linux-dpdk: pool: free allocated shm The shared memory allocated for storing pool entries needs to be freed in odp_pool_term_global(). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit e223bd473bfa16b74592cba0047d1328e0a196a8 Author: Matias Elo <matias.elo@nokia.com> Date: Wed Apr 26 16:36:27 2017 +0300 linux-dpdk: pool: set mbuf private area size in pool create The rte_pktmbuf_pool_private.mbuf_priv_size is used internally by DPDK, so it has to be initialized to a valid value. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 6f8ff0b8951903a2aab6983d61e51d3392708c17 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Apr 28 11:13:50 2017 +0300 linux-dpdk: packet: implement zero-copy concat Implement zero-copy packet concat using dpdk mbuf chaining. After reaching maximum segment chain length (256) the implementation falls back to packet copy. Signed-off-by: Matias Elo <matias.elo@nokia.com> Suggested-by: Nubin Stanley <nubin.stanley@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> commit 631112f91d50401b5224cf48ab3c8ccd2ca01f15 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Apr 28 17:03:47 2017 +0300 linux-dpdk: pool: fix packet pool parameter check Packet pool max packet length is not limited but the maximum number of packets is. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> commit 8f882efc2e27c19c6e7886d9c7cf9b36ab30360f Author: Matias Elo <matias.elo@nokia.com> Date: Fri Apr 28 17:03:46 2017 +0300 Port 7c84f7e7 "linux-gen: packet: clean and pack packet header struct" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> commit 89513787494341897fc4c6ae0d594f9425faf2a5 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Apr 28 17:03:45 2017 +0300 linux-dpdk: sync internal config definition naming with linux-generic Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> commit 8c11d5d8931722616ae1bc5fd89a821a66ec3634 Merge: 7f5fa185 ee1bee68 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Fri Apr 21 12:52:04 2017 +0200 Uplift of odp-dpdk to v1.14 after merge from ODP commit ee1bee68a90283a68f09982820f877ae658febe2 Author: Matias Elo <matias.elo@nokia.com> Date: Thu Mar 30 10:41:02 2017 +0300 test: bench_packet: fix headroom/tailroom test return values Zero is a valid return value from the packet headroom/tailroom functions. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit b8fe0ae5d5dcb3b3db2c7b2ded953da21772bdbc Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu Apr 13 06:48:33 2017 -0500 abi: packet: restore abi compatibility for odp_packet_seg_t type When running in --enable-abi-compat=yes mode, all ODP types need to be of pointer width in the default ABI definition. The optimization of the odp_packet_seg_t type to uint8_t can only be supported when running in --enable-abi-compate=no mode. Change the ODP packet routines to use type converter routines that have varying definitions based on whether we're running in ABI compatibility mode and provide these variant definitions to enable proper ABI compatibility while still supporting an optimized typedef for non-ABI mode. This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=2940 Reported-by: Krishna Garapati <balakrishna.garapati@linaro.org> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 30701b84e576d589a415b1246f67e8355eafb368 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Mar 30 15:19:26 2017 +0200 linux-generic: decouple odp_errno define from odp-linux makes it easy to define odp_errno to dpdk rteerrno and fixes linking issues. Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> commit dfc735cec013302be5993dec51af6d3ce59d45dd Author: Matias Elo <matias.elo@nokia.com> Date: Fri Mar 31 15:18:49 2017 +0300 validation: packet: use common define for test pool sizes Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 08c759b713329962a1fe69b6fbf4132071bdb645 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Mar 31 15:18:47 2017 +0300 validation: packet: increase test pool size Previously packet_test_concatsplit() could fail on some pool implementations as the pool ran out of buffers. Increase default pools size and use capability to make sure the value is valid. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 87c47f82095f709841f7f2c4f1106343e2fb6534 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu Mar 23 16:56:50 2017 -0500 validation: packet: do not require a max packet length Address bug https://bugs.linaro.org/show_bug.cgi?id=2908 by adding appropriate pool capability checks to the packet, pktio, and crypto tests to account for pkt.max_len, pkt.max_seg_len, or pkt.max_segs_per_pkt being zero, indicating these limits are bound only by available memory. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit e545c9a057162dbf0b3e98ff872850325bfabf8f Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Mar 29 10:15:17 2017 +0200 validation: packet: do assert on newly created pkt reference Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit 50dadb4517ae0fef3ad90c4cdb010d7c28996b11 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Apr 20 14:04:00 2017 +0200 linux-dpdk: porting "timer: correct definition of ODP_TIMEOUT_INVALID" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 539c694ed114c4c55410d83d07348babeba122e5 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Apr 6 08:59:22 2017 +0200 linux-dpdk: fix build by making odp_errno visible to platform Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit baf7a6b4b2397d8287ca3a22c9608986111b757a Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Mar 30 10:25:13 2017 +0200 linux-dpdk: fixing visiblity and abi compatibility with respect to the commit: "packet: inline functions" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 479d0a84a59ff1b8ea35d1aaca884107c1dc0270 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Mar 30 10:19:34 2017 +0200 linux-dpdk: Correcting the vlan header parsing order validation fails after the commit: 6c01f54700e5776d1f1b59517d053f0d9b62a10c Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit d7da01aa82d4638d99cdf7b47426c92a7593d83d Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Mar 30 10:16:05 2017 +0200 linux-dpdk: fix build after porting "packet: inline functions" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 47e316bd0b8842db4371119892071c2b24ff691a Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Mar 30 09:57:14 2017 +0200 linux-dpdk: reset the max packet len to zero Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit cc931255c6ec0f7ceb2987b3202889c62a2c6786 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Mar 9 15:44:22 2017 +0100 linux-dpdk: porting "packet: inline functions" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit efbfdf1672040b40b35185ec273c1f52f3dfbbd1 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Mar 8 16:25:01 2017 +0100 linux-dpdk: porting "add interests query (iquery) scheduler" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit c038004f3e3de9c960e967175d7f8b9347121d6a Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Mar 8 16:22:15 2017 +0100 linux-dpdk: porting "add generic bitmaps and iterators" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 2c5f021cd4944ee093be908420dadd80af070863 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Mar 8 16:18:07 2017 +0100 linux-dpdk: porting "packet: implement references as copy" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit e8678c3865d46a4b150eadab1124f97fbebcf77c Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Tue Mar 7 14:53:58 2017 +0100 linux-dpdk: fixing inlines and macros renaming Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit bd97bfc9674505fa027950ce32f4b4b6e462eb79 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Tue Mar 7 14:52:17 2017 +0100 libodphelper: name correction from v1.14 merge conflict Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit b0ea58df23e53063ab567056e9385e3e92536b70 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Tue Mar 7 14:50:04 2017 +0100 linux-dpdk: porting "packet: packet handle is hdr pointer" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 847f86377cbd875a93ae8ab8aae5f68d1a74a415 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 14:28:20 2017 +0100 linux-dpdk: porting "ticketlock: inline also in application" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 46d950b3baa3542e45f2e4aa0dcc351b68997cd3 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 13:01:20 2017 +0100 linux-dpdk: porting "inline: rename _STATIC to _ODP_INLINE" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 872eae5243f0854be12f3e41b7b8cb84e88461fc Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 12:57:01 2017 +0100 linux-dpdk: porting "makefile: remove pass command" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit dc99064673d1ce7e3361db77aad9b2e0e0cdb2b7 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 12:55:24 2017 +0100 linux-dpdk: porting "do not do double symlinks on make distcheck" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 2a981a9f67422773b47a5e18f139df8abcbcc499 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 12:54:12 2017 +0100 linux-dpdk: porting "abi: add symlink to arch specific dir" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit da401643e4975231f9e3fef2df067d3634882890 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 12:52:02 2017 +0100 linux-dpdk: porting "classification: implement ipv6 packet matching rule" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 524213c30fe562834dbdb5480494395b7590a17a Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 12:45:08 2017 +0100 linux-dpdk: porting "abi: shm: added initial definitions" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 3b722d0426d08fcb3f169367a11f14ee84fec8d4 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 12:41:27 2017 +0100 linux-dpdk: porting "abi: packet: added initial definitions" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 53ff93fd0a75167a5608cf37bb15be5a3f87144b Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 12:37:36 2017 +0100 linux-dpdk: porting "abi: buffer: added initial definitions" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 17d9a587364dd76f5a00d8c60f18ab3e6ed01175 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 12:24:11 2017 +0100 linux-dpdk: porting "abi: event: added the first ABI spec file" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 0b0ff8e9792b04e2bdc3f0e8ef26083ad5df1a8e Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Mar 6 11:55:52 2017 +0100 linux-dpdk: clean up macros porting "commit-ID: c15da68b8dc3187c1929ff7d7705a0958856cbad" from odp. Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Yi He <yi.he@linaro.org> commit 4478de9683f9fc875d75220550e7e38f1e4e8224 Merge: 7f5fa185 a652887c Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Fri Mar 3 15:13:43 2017 +0100 Merge tag 'v1.14.0.0' into odp_dpdk_v1.14.0.0 commit 7f5fa185004547dd74304c8c33ebab485891682e Author: Matias Elo <matias.elo@nokia.com> Date: Fri Mar 3 13:53:16 2017 +0200 linux-dpdk: pktio: return 0 on odp_pktio_mtu() failure Follow the ODP API definion and return 0 on odp_pktio_mtu() failure. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 3ed5cffff2dffdb8ada42353729bb16741a2985d Author: Matias Elo <matias.elo@nokia.com> Date: Fri Mar 3 13:53:15 2017 +0200 linux-dpdk: pktio: fix send_pkt_dpdk() return value Fix send_pkt_dpdk() return value in mtu error case to make the pktio validation suite pass. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 052a759357c7af9e0bf8445da6c99a3de2cf86fa Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Mar 1 16:34:30 2017 +0100 test: linux-dpdk: increase number of huge pages Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 12e24df40af8165c90ce4708af60301e76eb9d08 Author: Christophe Milard <christophe.milard@linaro.org> Date: Mon Jan 23 09:47:57 2017 +0100 linux-gen: _ishm: fix normal page fallback Fixing failure due to lack of huge pages. Fixes: https://bugs.linaro.org/show_bug.cgi?id=2842 Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 898430fb805520a7f0d6ae66108d29343074d319 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:45:02 2017 +0200 validation: packet: remove invalid check from packet_test_alloc_segmented() One can't assume that the packet should be segmented as this test is using a different pool with parameters than the default test pool. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit b44942d2117e0780ad250d5a57ff82e0fa551d74 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:45:01 2017 +0200 validation: packet: increase test pool size Previously packet_test_concatsplit() could fail on some pool implementations as the pool ran out of buffers. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 0dfb4cec8ee0c3fde223be34a365313d543c0951 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:45:44 2017 +0200 linux-dpdk: pool: fix crash when calling odp_pool_create() with no name Fix segfault when calling odp_pool_create() with NULL as name argument. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 3951b22ad53bf0067acf24cb52b53d490b7e2209 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:45:43 2017 +0200 linux-dpdk: pool: fix pool create Choose pool element size so that a single element can always store params.pkt.seg_len/params.pkt.len (whichever is larger) of packet data. Also make sure that the pool is able to store at least one params.pkt.max_len sized packet. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 9b961ecffde7512c7d7ba55bb1e46a0ee0baf90f Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:14 2017 +0200 Port d8216bf7 "linux-gen: init: avoiding segfault if cleaning files" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit bc1a701fafb8dd8e0151cf3b7dafcddc2b9e2c82 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:13 2017 +0200 Port accfec64 "api: move ODP_*_NAME_LEN definitions from API to implementation" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit d27d5f2d3a9bc3500a841ab73f94123512bc95d6 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:12 2017 +0200 Port 4a03ef38 "linux-gen: packet: improve packet print" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 06c849a1ec6ce6f10bcfc03e0cb51e56562d1bf9 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:11 2017 +0200 Port 3d23743f "linux-gen: use ishm as north API mem allocator" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit c2352595114e40df4bfa2bdcc716a9ad6ad219c5 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:10 2017 +0200 Port 5fbfb9b0 "linux-gen: ishm: internal shared memory allocator (ishm) added" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 64a982d48a6bf4178434ef1a47f4d9e20649850c Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:09 2017 +0200 Port e384fb78 "linux-gen: pktio ipc: make it work again" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 5a95a500650893c780f1f13e059a87c3d0415121 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:08 2017 +0200 Port 39acf771 "linux-gen: sched: add internal API for max number of ordered locks per queue" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit f9d0e9eb5583a05331b7c92ec267f13b4d650d92 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:07 2017 +0200 Port 0d6d0923 "linux-gen: sched: remove old ordered queue implementation" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 0331a17069916a54f9894c45ea3c0dc1f3d90cba Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:06 2017 +0200 Port 67abee1a "linux-gen: init: removing possible obsolete ODP files at startup" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 2d0c0827f5f74e4984a9711f13a50bbc7ce11077 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:05 2017 +0200 Port e28f851c "linux-gen: pool: check pool parameters" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 80d9fa87c2f9650fec7c39248d2a4954f59c2be3 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:04 2017 +0200 Port 0e67e186 "linux-gen: pool: clean up pool inlines functions" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 638ccf7328fae7048e96ecf136e0d88a7722ca5b Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:03 2017 +0200 Port 1220a970 "linux-gen: pool: reimplement pool with ring" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 9c21607912aa2192df81cdb95950ba7f9f132bc4 Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:02 2017 +0200 Port 936ce9f3 "linux-gen: ring: created common ring implementation" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 1185b56142d5a2a933b5031d09b877b9fd95781b Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:01 2017 +0200 Port 1e1312c1 "linux-gen: fdserver: new fdserver added" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 102f246a7a38e79e3b33240210f77e3ce22f2ebb Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:43:00 2017 +0200 Port 474dac39 "linux-generic: moving the visibility files one step up" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 553a112b23f8bb5d476d69d1da9a15e9c72a07ed Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 24 17:42:59 2017 +0200 Port b8c6689e "linux-generic: Makefile: reintroducing lost change for drv" Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 20d380845223b4a255bf4de253561bf7f246adc5 Author: Matias Elo <matias.elo@nokia.com> Date: Tue Feb 21 10:34:22 2017 +0200 linux-dpdk: README: update to match dpdk v17.02 Update the README file to match DPDK v17.02. Includes also other minor cleanups. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 9f35cc909331f806d35ef84f26f7c80f379f6f6d Author: Matias Elo <matias.elo@nokia.com> Date: Tue Feb 21 10:34:21 2017 +0200 linux-dpdk: improve pmd driver linking Previously each dpdk pmd driver had to be individually referred in the odp code to ensure proper gcc constructor linking. Using the -—whole-archive option when linking the drivers removes this need. After this patch new dpdk pmd drivers are automatically linked. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit aef88a42b1ed72629c3606d09ded2da2dc383a73 Author: Matias Elo <matias.elo@nokia.com> Date: Tue Feb 21 10:34:20 2017 +0200 linux-dpdk: disable pci devices when running make check Disable pci devices during validation test. If the system has pci devices mapped to DPDK pmd drivers they may overlap with the test vdev device indices, which will cause the validation test to fail. Signed-off-by: Matias Elo <matias.elo@nokia.com> commit 7b4fe6c0dc575483b200ddeb1499acc300dc1bad Merge: 3115baf4 3875d6eb Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Fri Feb 17 16:33:37 2017 +0100 Merge tag 'v1.13.0.0' of odp into odp_dpdk commit 3115baf4aa1ffa87978c40ea8e9727f0946d359d Author: Matias Elo <matias.elo@nokia.com> Date: Fri Feb 10 15:27:19 2017 +0200 linux-dpdk: include missing *_inlines headers Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 0c2e789e03a15a7e443896fe335e9e5142468e4e Merge: 5e370e11 6104182f Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Tue Dec 20 15:07:54 2016 +0100 Merge 'odp/master' into odp-dpdk/master commit 5e370e1113973feafb43a8e57d4c59be40e9aeab Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Dec 14 14:13:15 2016 +0100 linux-dpdk: porting commits from ODP for v1.12.0.0 e72f532 linux-generic: packet: add fall through comments to parser c710eb3 linux-generic: config: add missing doxygen documentation for abi macros b35abec fix out of tree build 5fff93c linux-gen: packet: identify sctp packets f73efb1 linux-gen: packet: parse only required packet header layers 144a1d8 linux-gen: packet: enable parsing only selected packet header layers Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 13f93292274b8123f3bbed54ddf84cf304909db4 Merge: 3385e3e1 4cfe988c Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Wed Dec 14 12:55:15 2016 +0100 Merge tag 'v1.12.0.0' into dpdk_v1.12.0.0 Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Conflicts: configure.ac commit 3385e3e1a36dbb37c6b121ef3162f94d1cc21ac5 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Tue Aug 30 09:18:46 2016 -0500 linux-dpdk: time: harmonize odp_time_t definition with linux-generic odp-dpdk used a slightly different internal representation of odp_time_t than odp-linux. For ABI compatibility, change to use the odp-linux representation. This has no functional or performance difference but keeps the ABI tool compatibility checker happy. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit f6f1dac75dade441eef7c7289782dbcefba565c5 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Nov 10 06:40:38 2016 +0100 linux-dpdk: Build fix for --disable-abi-compat make variable visibility global when building shared library not abi compatible. Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 92de3423117cffe90b20cbfd0945eada88edfeed Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Tue Nov 1 13:34:41 2016 +0100 linux-dpdk: doc: defining the ODP thread porting linux-gen: doc: defining the ODP thread Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit fddc98f84e9aa44bc43d3797c24868d58d1de715 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Oct 31 13:29:09 2016 +0100 test: linux-dpdk: fix the distbuild looking into builddir This change referes to the odp git commit: "linux-generic: make: fix distribution build for inlines.h" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 48e83dc753ee05b3407dd90f81e44ed3b5e1e0ed Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Oct 31 13:21:14 2016 +0100 linux-generic: remove unused instances and sync with odp git Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit db7b6a6447c432b1fb62d99565bbb9afb9fa04f5 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Oct 31 13:17:43 2016 +0100 linux-dpdk: remove ODP_INLINES flag support remove all instances of ODP_INLINES flag and replace it with ODP_ABI_COMPAT Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com> commit 8a738bb590e06f39c92bc33386d1b2795df29a7d Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Oct 24 16:16:10 2016 +0200 linux-dpdk: porting "linux-gen: using ODP instantiation pid as odp instance" porting "09abf90268a0a5a2daf7c7e0ae37a2d7c35e87c5" Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 8b6d19a39c233f0f464f7cdc61acce9c73b85392 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Oct 24 16:15:16 2016 +0200 linux-dpdk: porting "linux-gen: config: increase burst sizes" porting e858d688c3ad3ce0d0b3ea22539cac8e6ec844b7 Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 4d2e47d0ed40c9ccd72fe891498ed0342056303d Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Mon Oct 24 16:04:14 2016 +0200 linux-dpdk: porting "de-couple abi compatibility from shared lib" porting f83b71e6a9c685227615455df1f9e4fefeff19ae Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit ce3b66bfea4caa2549b9d37e71895e67e4adef84 Merge: df328ba2 aaca222d Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Tue Oct 25 10:55:25 2016 +0200 Merge remote-tracking branch 'upstream/master' into dpdk_master_upstream Conflicts: platform/linux-generic/.gitignore platform/linux-generic/Makefile.am platform/linux-generic/include/odp/api/atomic.h platform/linux-generic/include/odp/api/byteorder.h platform/linux-generic/include/odp/api/std_clib.h platform/linux-generic/include/odp/api/sync.h platform/linux-generic/m4/configure.m4 platform/linux-generic/odp_atomic.c platform/linux-generic/odp_byteorder.c platform/linux-generic/odp_std_clib.c platform/linux-generic/odp_sync.c test/Makefile.inc commit df328ba23119d5c1fff18baad65b94792f24b32a Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Tue Aug 30 21:08:49 2016 -0500 linux-dpdk: configure: harmonize inline support with linux-generic Merge the linux-generic changes from patch http://patches.opendataplane.org/patch/6909/ into odp-dpdk and harmonize the inline support for the --enable-shared=[yes|no] option between the two implementations to enhance ABI compatibility. Note that the odp-linux patch cannot be applied directly to odp-dpdk due to bisectability issues. Suggested-by: Zoltan Kiss <zoltan.kiss@schaman.hu> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit e10ea1da2c1d4d5285b0087f1cd43a01bc7d20f4 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Tue Aug 30 21:08:48 2016 -0500 linux-dpdk: configure: move inline files to plat subdirectory To facilitate integration with odp-linux, move the conditional inline files associated with ABI support from include/odp/api to include/odp/api/plat since these are platform-specific optimizations. Note that this also moves the .gitignore into the platform/linux-dpdk directory to avoid conflicts with other platforms sharing the main .gitignore file. Suggested by: Zoltan Kiss <zoltan.kiss@schaman.hu> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-and-tested-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> commit 6f4a531a40429a8ba01dcc192a713cbfd288c120 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Thu Sep 15 13:26:17 2016 +0200 test/linux-dpdk: find pktio binary location Fixes: https://bugs.linaro.org/show_bug.cgi?id=2472 Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 7068593f600e2b5a23ee1780d5c722c54e966df1 Author: Balakrishna Garapati <balakrishna.garapati@linaro.org> Date: Tue Aug 16 15:18:37 2016 +0200 platform/linux-dpdk: fix for 32-bit build Fixes: https://bugs.linaro.org/show_bug.cgi?id=2453 Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> commit 593db241c782ef5e597eed63dd9236fa1bb964a8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Aug 5 12:37:23 2016 +0100 linux-dpdk: git-transplant.py: handle exception when there is no match with grep Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e83dcad9fc2c45ded1389278d8ce77357bf6a3fb Merge: b0396c25 c05c1c60 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Aug 5 12:28:12 2016 +0100 Merge branch 'master' of https://git.linaro.org/lng/odp Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b0396c25816d3a761b050b3abb85745bf83c4c09 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Aug 5 12:23:59 2016 +0100 linux-dpdk: devbuild.sh: fix doxygen target Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ebc0b0c3470e2b183ac4bcf362a95f9dc643b777 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Aug 4 16:19:42 2016 +0100 linux-dpdk: configure: replace AC_CHECK_LIB with AC_SEARCH_LIBS The latter makes it possible to work with both static and shared libraries. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b53cf30e9266d7ee5e7df39d3c7a7107d70388dd Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Aug 4 16:17:50 2016 +0100 linux-dpdk: init: refer to missing constructors These PMDs were missed during the recent updates. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6edcfb7790e1d5fc3cbac7cfba03ab6f18c0207c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jul 18 15:24:04 2016 +0100 linux-dpdk: document support for DPDK 16.07 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit cc9802df5842ba85d83c32a9d3337cc49044fede Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jul 18 14:49:47 2016 +0100 linux-dpdk: pool: implement odp_pool_destroy() Finally DPDK support this, so remove this dirty workaround. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit aa0cda520c6823b0ea99dc3295db40b5655529e5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jul 14 18:26:49 2016 +0100 linux-dpdk: init: refer to new constructors Apart from new PMD's the mempool handlers are also using the GCC constructor facility, so we need to refer them in order to make sure proper static linking. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7210354a45df32dae27b6aa16b5a8f737e57994e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jul 14 17:23:38 2016 +0100 linux-dpdk: pool: use new external mempool handlers This commit introduced a new way of handling mempools: http://dpdk.org/browse/dpdk/commit/?id=449c49b9 mempool: support handler operations Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 32ee6577f7c31ed3ac9721c15daa17dd1421c77c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jul 14 17:19:25 2016 +0100 linux-dpdk: pool: use new assert function This commit introduced a new assert macro: http://dpdk.org/browse/dpdk/commit/?id=50705e8e eal: add assert macro for debug Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit eaa5e887731be7a4e2ab40aabbd421e9bdbe0291 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jul 18 14:56:13 2016 +0100 linux-dpdk: pool: check pool name length DPDK only supports RTE_MEMPOOL_NAMESIZE, this patch trims the name, and warns about name collision. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 49f2d7589ba3a6e76b47078c2f13b0b5da5594fe Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 26 15:51:44 2016 +0100 linux-dpdk: timer: fix ODP_TIMEOUT_INVALID definition The following commit fixed this as a bug in linux-generic, but ODP-DPDK needs the original value: 4cf18bb4 linux-generic: timer: correct definition of ODP_TIMEOUT_INVALID Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4da1d6734ab6162206a0a02d5159fa91b5480898 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 26 15:50:01 2016 +0100 linux-dpdk: timer: make local copy of timer_types.h Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9ec013337d88c85d30dffc7f8b6948b46a47c979 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 26 15:44:19 2016 +0100 linux-dpdk: devbuild: allow running gdb with unit tests ODP_GDB=gdb env variable could be the magic for it. Document it as well. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ed2db4144f580c2e14263321e6e969532c14418f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 26 14:07:29 2016 +0100 linux-dpdk: devbuild: fix path for individual test running As wrapper script moved, the path should be updated. Also fix line wrap. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 70078c5c31187b942e6aa60914d17af8fdf99433 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 26 14:04:50 2016 +0100 linux-dpdk: refer to all DPDK libraries in the shared library Otherwise we won't load the PMD's, which breaks every packet operation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e7a3114f048af76c047fe44b2b2e15440264fde6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 26 14:02:41 2016 +0100 linux-dpdk: std_clib: make sure dpdk_memcpy is global symbol Without this visibility setting it ends up being a local symbol in the shared library. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0968be36721ae922e61da1684dd141ba4890ea04 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 26 13:58:00 2016 +0100 linux-dpdk: don't build static library with shared DPDK It wouldn't have any practical use, and it cause a lot of linking issues. Also make shared build the default in devbuild, it will also test whether this thing works. As shared build is more fragile, it's a good canary for linking issues. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c364143945eb10ba7065f46a670626342f6cf0c4 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 17:15:56 2016 +0100 Port 2fc98f7b "linux-gen: sched: add pktio_stop_finalize to scheduler interface" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d2cd17907bc9ca29fd6c6a98610e17abaf1d34e8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 17:10:11 2016 +0100 Port 41ab23c8 "linux-gen: pktio: simplify state handling" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5ded0b8443bf2e5b6f710b8ad5c2b1d8b3c0abb1 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 16:16:49 2016 +0100 linux-dpdk: test: adjust file contents after the move Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a0c8d5795baa7268f6316ea152f1a1fe2c46abb1 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 16:11:48 2016 +0100 linux-dpdk: move platform/linux-dpdk/test to test/linux-dpdk And inside that, pktio to validation/api subdir. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4daba785f2b3dca1ba13841773285f0933dcd136 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 15:19:20 2016 +0100 Port 3e95604 "linux-gen: remove all dependencies to helper" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 018121622f6d3102e9bf180a3f28c8bcbf3972ce Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 15:10:34 2016 +0100 Port d1d06aa "linux-gen: std_types: remove extra c headers" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d8d067529d2305b621dad481f3e3b786d8578cd8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 15:07:15 2016 +0100 Port 9f0f2b8 "linux-gen: cpumask: remove dependency to sched.h" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8e1ebcc9badcaf5f5ceb3764208c85a30729ba9e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 15:03:58 2016 +0100 Port f9baafc "linux-generic: packet: copy user area as part of odp_packet_copy()" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0e642ce9b2ac0a26198ef8d6e0c9cb0dbb549d99 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 14:56:51 2016 +0100 Port 072b5ca "linux-gen: packet: use packet_parser_t type argument with parser functions" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 05eca183585c77fa7546a4f654cea0f7a7f7b876 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 14:23:17 2016 +0100 Port aa7a182 "linux-gen: packet: add packet parser structure" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3549864cc186c61e468b9efbe19baa18ec75f410 Merge: eb6929d8 20f14c1e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 22 13:49:12 2016 +0100 Merge branch 'master' of https://git.linaro.org/lng/odp Conflicts: configure.ac commit eb6929d8bb3124c8165b5da477f0f10c903b8095 Author: Anders Roxell <anders.roxell@linaro.org> Date: Fri Jul 22 11:35:08 2016 +0100 linux-dpdk: m4: move m4_include above ac_check_* Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 76fdb23e160a76fbb69eba3d59a11cf3c8e76d60 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jul 18 14:57:19 2016 +0100 linux-dpdk: pool: increase maximum number of pools In reality it depends on the amount of available memory. Application shouldn't expect that it can always allocate this much. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e884f5f70f745770083e5b57d8a6e982bb2ea1a5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jul 6 16:17:04 2016 +0100 linux-dpdk: scripts: add git-transplant script This script helps pulling new commit from odp.git by building a list of patches (probably) needed to be ported. There is also a short howto about the usage. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit bfdc4b98885bbe429db5589ed77da869620df6a8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 5 15:12:35 2016 +0100 Port 6e00ca5e "autotools: define test extensions to skip on valgrind test" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8f75fc9f66064efb059ce02fe81989d107e8addb Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 1 17:55:16 2016 +0100 linux-dpdk: fix relocated build It fails in CI because it couldn't find inlines.h. It is generated by configure script in actual directory, so the include paths should have that too. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> commit 0ed1ced007d98980f90604675083bf30c354e867 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 15 11:55:03 2016 +0100 Port 165897bf "linux-generic: classification: use proper accessor to set packet length" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9555c17ac533b86851ecaa8c25997868a5a4b5f7 Merge: 6298b9ab 793c4b15 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 15 11:53:18 2016 +0100 Merge branch 'master' of https://git.linaro.org/lng/odp commit 6298b9abf1ae88a089a76485092fc1f5699c073c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jun 13 17:31:40 2016 +0100 Port 11d993c4 "linux-gen: pktio: remove old single queue recv and send functions" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0fcb1a61506c128de598618f2d4d57eb8b8daa2b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jun 13 17:17:30 2016 +0100 Port bd18047a "linux-gen: pktio: don't allocate new packets in classifier" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9aaebc97af0aff04617128b89e223674862980cd Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jun 13 17:14:31 2016 +0100 Port 6c1acab3 "linux-gen: packet: increase input flags bit field size to 64 bits" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 1716d1f96d7665a67a44c31b8f6b4fcb91a1f050 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jun 13 15:45:59 2016 +0100 Port 7737982f "linux-generic: sched: add init functions to interface" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 07ea2fc78caa0724b0e35f402eb3baef7bcac5ca Merge: 78f58d72 5567e30f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jun 13 15:39:03 2016 +0100 Merge branch 'master' of https://git.linaro.org/lng/odp Conflicts: configure.ac commit 78f58d7277be3b044553242cee9cee79e3571cc6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 9 16:59:36 2016 +0100 linux-dpdk: simplify inline handling macroes _STATIC can be defined only once. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0344addff23a8027445331bc0484bb041caeafe3 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 9 16:26:59 2016 +0100 linux-dpdk: test: use ARCH_DIR This was missing from this patch: Port ac9f523f "linux-generic: correctly set arch as undefined" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9e5ccba8998e8cf028611a74622ce9e30cc4f527 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 9 16:24:32 2016 +0100 Port 8dd89614 "linux-generic: test: add tm unit test to list of tests to run" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5cc1ba9b61b60ce315a42db94f3acea195b4213b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 9 16:10:57 2016 +0100 linux-dpdk: packet_dpdk: add debug logging Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 1d4e4be670e09f38c2f934232d221a8dd04e2fe6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 9 15:46:17 2016 +0100 linux-dpdk: test: sync up pktio_run to linux-generic Among other smaller ones, port this patch: f7b9dd8f validation: pktio: adding command line argument parsing Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e7aa846454f92b8b720f31a23e2a3e000c432d59 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 9 13:25:22 2016 +0100 Port c67bdfaa "linux-generic: validation: add run-test script for post install testing" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6e20b254031bf3464b0bf5de0e09d4cb057e06d6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 9 13:23:02 2016 +0100 linux-dpdk: test: adding missing .gitignore file Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4836e53ef5f3f1cbec1650588158680e99c32644 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 9 13:14:42 2016 +0100 linux-dpdk: drv: create symlink for this include directory commit 190ae8446e49bf4aa2b848dd3ef42a4f855a28f1 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 9 13:10:39 2016 +0100 linux-dpdk: Makefile.am: unify brackets Use {} all through noinst_HEADERS. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 257861448e4ce11eeb012a7159307acc95a98c22 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 8 16:06:22 2016 +0100 linux-dpdk: time: fix indentation Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d23e510d16e9478aa23ba540486fc0ec1eb049de Author: Anders Roxell <anders.roxell@linaro.org> Date: Wed Jun 8 16:02:08 2016 +0100 rename libodphelper-dpdk to libodphelper-linux Signed-off-by: Anders Roxell <anders.roxell@linaro.org> commit 3570a34c7d467f312c509a242aa94e9ec1a9b581 Author: Anders Roxell <anders.roxell@linaro.org> Date: Wed Jun 8 12:07:36 2016 +0100 linux-dpdk: Makefile: add missing noinst_HEADERS Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ebb00a1982041fb66a95439abedff978454f2324 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jun 7 17:21:59 2016 +0100 linux-dpdk: test: fix hugetlbfs mounting in wrapper Make it a separate function, and handle every failure so we can fall back as much as we can. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 968237b592a8162041a4edf0091575fd1390d647 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jun 7 14:24:36 2016 +0100 linux-dpdk: enable inlines if dynamic library is not used In order to have proper packaging and dynamic linking we need a fixed ABI. For that, each function has to be in the library file. But that hurts performance a bit, as small accessor functions couldn't be inlined, despite it's a viable option with static linking. This patch lets the platform automatically decide what should be done. ./configure generates inlines.h based on whether --enable-shared=yes was added or not. If yes, it enables the _ODP_INLINES macro. The accessors are moved to a packet_[flags_]inlines.h file, by default it is included from odp_packet[_flags].c, and they appear as fully fledged functions. If _ODP_INLINES defined, the accessors appear as static inline functions in the header, and the application can directly inline them. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 293a6a77afc4b71912c4f44f352975239bbdc1b5 Author: Anders Roxell <anders.roxell@linaro.org> Date: Thu Apr 21 19:25:28 2016 +0200 linux-dpdk: Makefile: missing noinst_HEADERS In file included from ../linux-generic/odp_classification.c:13:0: ./include/odp_packet_internal.h:30:33: fatal error: odp_crypto_internal.h: No such file or directory compilation terminated. Makefile:881: recipe for target '../linux-generic/odp_classification.lo' failed make[2]: *** [../linux-generic/odp_classification.lo] Error 1 make[2]: Leaving directory '/odp-packaging/opendataplane-1.8.0.0.git670.g962cc13/platform/linux-dpdk' Makefile:467: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/odp-packaging/opendataplane-1.8.0.0.git670.g962cc13' Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 030e5501b93a448c332627ca5fac65136b207672 Author: Anders Roxell <anders.roxell@linaro.org> Date: Thu Apr 21 19:15:13 2016 +0200 linux-dpdk: fix out of tree build make[1]: Entering directory '/odp-packaging/opendataplane-1.8.0.0.git668.g48df9fc' Making all in platform/linux-dpdk make[2]: Entering directory '/odp-packaging/opendataplane-1.8.0.0.git668.g48df9fc/platform/linux-dpdk' Makefile:1239: ../../platform/linux-dpdk/Makefile.inc: No such file or directory make[2]: *** No rule to make target '../../platform/linux-dpdk/Makefile.inc'. Stop. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 29fff90e5d5858bbc91edd3ccaade9de4e2c53bb Author: Anders Roxell <anders.roxell@linaro.org> Date: Thu Apr 21 19:40:52 2016 +0200 configure: change project name to OpenDataPlane-DPDK Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d4baf905b440f8417965f56387b2629dab1796c2 Author: Anders Roxell <anders.roxell@linaro.org> Date: Thu Apr 21 16:53:31 2016 +0200 configure: fix project mailinglist Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2ff09a9d997651d32cef4c0a2ddd5eff670ad288 Author: Anders Roxell <anders.roxell@linaro.org> Date: Thu Apr 21 16:34:51 2016 +0200 linux-dpdk/test/pktio: remove pktio_run_pcap fix make distcheck. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 58f5ab70e61bf28ab9cdf09f4786965cffabc4da Author: Anders Roxell <anders.roxell@linaro.org> Date: Thu Apr 21 16:26:23 2016 +0200 linux-dpdk/test: add dist_check_SCRIPTS add LOG_COMPILER to dist_check_SCRIPTS Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 10f4ec924c145e3a85a56321add0b4a044b0f9a2 Author: Ricardo Salveti <ricardo.salveti@linaro.org> Date: Wed Apr 20 15:37:17 2016 -0300 linux-dpdk: odp_init: don't force static linking by default So we can at least build odp-dpdk against a shared dpdk library version. Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7585d11acfd9c91fb78c2347c2557c4da695d497 Author: Ricardo Salveti <ricardo.salveti@linaro.org> Date: Wed Apr 20 17:21:03 2016 -0300 Make static or shared DPDK linking optional Keeping static as the default option. Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 75eba7937410284a3b35ee3412ab132177c1811c Author: Anders Roxell <anders.roxell@linaro.org> Date: Wed Apr 20 14:26:15 2016 +0200 configure: make use of AC_CHECK_* Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9e0f0c11abfbf9fd87e89a4fb84bc1e711ec8bd6 Author: Anders Roxell <anders.roxell@linaro.org> Date: Wed Apr 20 14:25:18 2016 +0200 configure: use an install dpdk package Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2861ed817565e54b6bbbeb7b1f723147725608ad Author: Anders Roxell <anders.roxell@linaro.org> Date: Tue Apr 19 17:55:57 2016 +0200 linux-dpdk: Makefile: remove unneeded includes Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit cbd21c3bfa6aac6614121fb822f65c97976ef2b2 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jun 6 15:43:05 2016 +0100 linux-dpdk: packet: fix _odp_packet_copy_md_to_packet() Some fields are copied twice, some are not copied at all. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit cc8cbb3e772fff59ca7fc86ba80c769beae669ec Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jun 3 12:46:20 2016 +0100 linux-dpdk: packet: copy new parsing code from linux-generic Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ca00408f7d2893629793d86a89c125ca8294cc1a Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jun 3 12:45:13 2016 +0100 linux-dpdk: packet: simplify offset handling Also taken from linux-generic Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit bca1d9c9e69cfa81696a900b8e5363463ad62628 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jun 3 12:41:41 2016 +0100 linux-dpdk: packet: fix odp_packet_reset() init code To ramp up with linux-generic conventions. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 325d77564348416379876922c36e34314cba03d0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jun 3 12:25:01 2016 +0100 linux-dpdk: packet: remove unused fields Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7a71ce211d4ec0e307268807b3d654f5d319ea12 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 2 23:12:27 2016 +0100 linux-dpdk: packet: sync up code to linux-generic Non-functional and output formatting changes. Plus remove the inlined packet_parse_full() Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 58a06dabe599c08fad8a47fd1069b8c4bcead8b0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 2 22:49:25 2016 +0100 linux-dpdk: packet: move function definitions around To the same ordering as linux-generic has, making code comparison much easier. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4390888eb2e8df0281d6afd789dfbf12305a3e84 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 2 10:58:04 2016 +0100 linux-dpdk: init: fix init order Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c08fb04d8458a0f06528132bb1fc12b8422429fd Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jun 2 10:32:45 2016 +0100 linux-dpdk: helper: fix reference to linux-generic Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7345b76e9d31eb6bde1957c5e3790968508c7f51 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 21:02:06 2016 +0100 Port 004334a8 "linux-generic: packet: implement odp_packet_prefetch()" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f5fedf57e370eb5312408e03a67e213ce7f5681e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 20:47:20 2016 +0100 Port 842e89 "linux-generic: packet: implement odp_packet_input_index()" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3f62e23c8365e6bb546449a816a768987d2e5a1b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 20:40:32 2016 +0100 Port d02f6958 "linux-generic: packet: implement packet extend/trunc apis" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8190546d913ac7b82359ec4ea07ae35ea5c667b9 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 16:43:05 2016 +0100 Port dfaf545c "api: pktio: include correct header files" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7b056f06011e814fec904b09d99a0ca303102691 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 16:39:14 2016 +0100 Port c917fb80 "api: make only the API visible" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit db9790c49ee553bce2b8766f4bcb3f949eb05b9a Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 16:32:25 2016 +0100 linux-dpdk: loop: fix missing include Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 55f352976562b8d79f618748376c17cd6d2dcb95 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 16:22:47 2016 +0100 linux-dpdk: thread: remove stale code and sync format with linux-generic Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 611c34d13fa88389fe0f399f4d959f87235cbbb4 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 16:21:12 2016 +0100 Port b17dd754 "linux-generic: schedule: move local struct into internal header" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a28d3e3e08bc597a0f443e1c0aebf339ccb1bef6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 16:15:36 2016 +0100 Port 763b4a48 "linux-generic: schedule: rename schedule interface header" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d479cfaf5eaeba1943c89503eb3a7fac40bbacab Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 16:12:11 2016 +0100 Port 3c902e5f "linux-generic: schedule: move ordered queue code to a new file" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 49ed28d0a3d4c9b54b31350a2be490ea3a45eb5b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 27 13:15:47 2016 +0100 Port 7eefb33e "linux-generic: schedule: clean up dependency to config interface" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 06b7cfbcbfbcb79623a3765488d1930fc13cffac Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 16:04:34 2016 +0100 Port 072d2252 "linux-generic: schedule: move schedule group mask into scheduler" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4c45fabb9885db21514f814b239fd6c0fdfff381 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 15:08:12 2016 +0100 Port 637a4826 "linux-generic: schedule: clean interface towards pktio" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5f170855410e6a664abe4e4f565c4551570c4c9a Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 15:56:29 2016 +0100 Port b233bbd0 "linux-generic: schedule: introduce scheduler interfaces" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit dd7eb726c4b05efd29ddf2538a76e4d6a1967b64 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 1 14:30:49 2016 +0100 Port 2d0b42ca "api: pktio: define input array as const" The const qualifier have to be removed because DPDK doesn't have that, but we can't afford a copy of the array on the fast path. Ideally DPDK should not modify it anyway. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 45349d6a65c562647bdf33fc24b80c995c68c8e9 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 16:23:22 2016 +0100 Port fad5fec3 "linux-generic: pktio: add pktio type specific print function" Plus remove a stale include Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a2a6271e290c7b7fd50808791f6725e9756559b6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 16:09:56 2016 +0100 Port 31462eea "linux-generic: pktio: implement odp_pktio_config()" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 85ee38976a5716210b27b279407e55563b1beb35 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 15:56:29 2016 +0100 linux-dpdk: packet: implement classification and fix discard stats This is largely based on these patches: 9f4672bd linux-generic: classification: release the packet as soon as an error happens 12558212 linux-generic: pktio: classification error handling fixes for loop And it records discarded packets when min > len. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ff36bf558ed63d0d80b1022ce0709564ae35493c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 15:53:37 2016 +0100 linux-dpdk: packet: implement timestamp support Port of these patches: 6f18981a linux-generic: packet: implement timestamp support f6226cb7 linux-generic: packet: add inline helper function for setting packet timestamp 5406686c linux-generic: pktio: implement odp_pktin_ts_res() 689c1238 linux-generic: pktio: implement odp_pktin_ts_from_ns() Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ac071fdb94d9fbce420ca3e8a62a152cdec1c94f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 14:59:51 2016 +0100 Port 8b87bcf3 "linux-generic: packet_io: fix state handling" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ef949d307d8816c48903612104c4e4a09cca76b1 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 14:45:07 2016 +0100 Port 7a589e48 "linux-generic: packet: implement new packet APIs" The previous patch copied the bulk of the code. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 047eac18b0e7f8fafbf3cbd79a98a581da76804f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 14:40:59 2016 +0100 linux-dpdk: packet: copy code from linux-generic Mostly form this commit: 7a589e48 linux-generic: packet: implement new packet APIs Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0adb02202924d2136b1bf6ce27c88abb7e3a1796 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 14:37:17 2016 +0100 Port e2a7ee21 "linux-generic: packet: implement odp_packet_copy_from_pkt api" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 888d48cb0b2cc47304bb25a8a203b1a646a073c1 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 14:26:47 2016 +0100 Port 9c0916aa "api: packet: rename and add copy functions" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 598c5971944ac6446b9d61bada85c631f15a943d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 13:19:00 2016 +0100 Port 05a38e81 "api: packet: update add_data and rem_data definition" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 00bce01f163755b5475cc2b02e0e1e785c1f1209 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 13:06:43 2016 +0100 Port f8e5f978 "api: packet: remove seg_buf_addr and seg_buf_len" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 1de18ca372abf67233e1258f8cd0f39a47456ed6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 13:03:55 2016 +0100 linux-dpdk: remove unnecessary includes Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2f52b5150ad3d39575c641eb9bd14e5acfd6bcc1 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 12:57:17 2016 +0100 linux-dpdk: init: fix typo Originally fixed in this, but it was missed during porting: 464579c6 "linux-generic: tm: Add missing name table initialization call." Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e6e2f4e80b6c5b03aacc68205c444d56beca8e16 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 12:49:48 2016 +0100 Port 79085b18 "linux-generic: init: comment out last local stage to avoid scan issues" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d5c831e933d53b267dd8a783f4bc0585a4851edc Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 12:47:20 2016 +0100 Port 8683ff2b "linux-generic: repair ipc_pktio work after ipc ns changes" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 09218d1debba3eea842c17beba3c90510c696578 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 12:45:42 2016 +0100 Port 90d70625 "linux-generic: shmem: odp scope in /dev/shmem" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 636686ca7d686d03dc653ae0bdca49688a26ccca Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue May 31 12:24:59 2016 +0100 Port 93f0362c "linux-generic: Make cpu detection work with NO_HZ_FULL" Also includes this one: fe27e186 "linux-generic: add support for initial cpumasks" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d359f84a6b7a25a4d6ec89ae30d8ddd65371adc5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 27 13:33:30 2016 +0100 Port 4e2b9c19 "api: init: add instance handle" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d74b5095d8c54dd68ec9f5d5ebcaed921730c591 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 27 13:27:44 2016 +0100 Port e1595360 "linux-generic: packet: remove l3_protocol and l4_protocol members from odp_packet_hdr_t" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 82a2b43e6e5d9e077023b851e012816f2c00f308 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 27 13:04:43 2016 +0100 Port e9013f8b "api: debug: promote ODP_STATIC_ASSERT() to be an ODP API" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9f8380e59ad2522f106ab41f422e26b523fd167e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 26 20:11:31 2016 +0100 linux-dpdk: config: salvage old config settings after creating new header file Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b97b756c4502acb632096dc0ea43a53e96de8dda Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 26 19:03:30 2016 +0100 Port "api: pool: add pool capability" series The following patches were ported: 9ca19730 api: config: replace pool config with pool capability 64f8fa21 api: queue: replaced config api with capability structure 7a56ae3e api: config: removed config.h Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5646d6e0504713328ad610dde751eaac074da353 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 26 18:38:03 2016 +0100 Port ac9f523f "linux-generic: correctly set arch as undefined" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8be97efc503c6b1389dbc364c3fee0752c568ccd Merge: 438a207a f2b728a6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 26 18:04:13 2016 +0100 Merge branch 'master' of https://git.linaro.org/lng/odp Conflicts: configure.ac pkg/debian/control pkg/debian/libodp-dpdk-dev.dirs pkg/debian/libodp-dpdk.dirs pkg/debian/libodphelper-dpdk-dev.dirs pkg/debian/libodphelper-dpdk.dirs pkg/debian/odp-dpdk-bin.dirs pkg/debian/odp-dpdk-bin.install pkg/debian/rules platform/Makefile.inc scripts/builddeb Upgrading to latest 1.10 code Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 438a207a39bad213cdc03929452a8199caef5d8c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 26 17:36:02 2016 +0100 linux-dpdk: claim support for 16.04 Fortunately there is no need for any changes. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit bd6e1c5c4d25ddbe0394ae7a1ee4201751e46085 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed May 25 18:28:44 2016 +0100 linux-dpdk: packet_dpdk: check rte_eth_dev_info_get() return This function doesn't really handle if the port doesn't exist. In that case there won't be a driver name string, check for that. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reported-by: Dominic Pigott <dom@intelligentcompute.com> commit 0d2a6b1b8342d39031a9994c9dd089fed75989bf Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed May 25 18:14:46 2016 +0100 linux-dpdk: time: fix conversion accuracy for big values During the conversion between ticks and ns the multiplication with time_local_res_dpdk() or ODP_TIME_SEC_IN_NS can easily overflow the variable, as they are big values themselves as well. This patch avoids this overflow by using floating point calculations. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9361c608a2497724114fe0f2ad4d380fcb8a0137 Author: Wenxian Li <wenxian.li@linaro.org> Date: Wed May 25 16:16:44 2016 +0100 linux-dpdk: optimize odp_time_local/odp_time_global related api leveraging DPDK api to avoid system call overhead. Current odp-dpdk uses the same code as odp-generic in time related api implementation. I try to optimize this api leveraging DPDK. Signed-off-by: Wenxian Li <wenxian.li@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d4ed94b99074657d64884a2c15920df286020222 Author: Wenxian Li <wenxian.li@linaro.org> Date: Wed May 25 15:55:05 2016 +0100 linux-dpdk: copy odp_time.c/time_types.h from linux-generic to linux-dpdk folder and update the Makefile Signed-off-by: Wenxian Li <wenxian.li@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 753dba7e00187d30202657d85baf2d55c34cd048 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed May 25 15:38:47 2016 +0100 linux-dpdk: devbuild: enable both static and dynamic version of library Developers must make sure both build works. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 111f18c8deae6e2b9b2bb0eb5ca9d7e0e1855c17 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Apr 6 14:00:43 2016 +0100 configure: remove option to build linux-generic This causes this warning: platform/linux-generic/Makefile.am:121: warning: variable '__LIB__libodp_linux_la_SOURCES' is defined but no program or platform/linux-generic/Makefile.am:121: library has '__LIB__libodp_linux_la' as canonical name (possible typo) Because automake process this file, and since 886acdfc "rename libodp to libodp-linux" the target names have changed. Since aforementioned patch we can't build linux-generic anyway, and merge will break here anyway, let's get rid of this. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit 337a22cea73df01f8df95d0583597f5da983e4c4 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Apr 5 16:39:49 2016 +0100 linux-dpdk: packet: fix function declaration The defintion calls the first parameter 'pkt' instead of 'pkt_src'. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit a876bad9bc6f6603777f37bcececec170a760e03 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Apr 5 12:48:41 2016 +0100 linux-dpdk: packet: use odp_packet_len() internally as well Make sure a consistent way is used to get the length. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4ab9089ce1d9bea35f90867a74c29d3c64475cbf Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Apr 5 12:13:06 2016 +0100 linux-dpdk: packet: fix L2 parsing This is an extension of this patch: https://lists.linaro.org/pipermail/lng-odp-dpdk/2016-February/001292.html But it also executes the L2 parsing when received from a pktio interface, and remove the parse check for l2 and jumbo flags, as well as from handling L2 offset. When DPDK finally fixes its issues around packet parsing we can start using that. Original-by: Bill Fischofer <bill.fischofer at linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3f38a4296272029fa7d348350b16c66b4d8c7eab Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Apr 4 16:54:13 2016 +0100 Revert "Reapply "linux-dpdk: packet_flags: use rte_mbuf's l2_type for flags"" This reverts commit f2265da8a13fea67217956cb7a29b097628e2c3b. Except packet_hdr_has_eth(), we need it since classification started to use it. Revert the second time, as it turns out there are DPDK bugs around this feature. Hope to bring it back when those are fixed. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Conflicts: platform/linux-dpdk/include/odp_packet_internal.h commit c04c08c1b27c5cc5705e7b8f5f34e288109784c5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Mar 31 20:12:42 2016 +0100 Port "7c3df2a6 api: move include/odp.h to include/odp_api.h" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a944261929caf1530b922933037cffbae39f1d01 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Mar 31 20:04:12 2016 +0100 Port "711bb4fb linux-generic: dpdk: remove old recv/send functions" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 141280409e37af53c4d3058cd292cc3be80f20dd Merge: bd0ca4bc 425ea3f0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Mar 31 19:54:47 2016 +0100 Merge branch 'master' of https://git.linaro.org/lng/odp is necessary, commit bd0ca4bc851e1abb026353f880f7f773878e472e Merge: e1132306 eebc2a48 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Mar 31 19:53:17 2016 +0100 Merge branch 'master' of https://git.linaro.org/lng/odp Conflicts: configure.ac pkgconfig/libodp-dpdk.pc.in pkgconfig/libodphelper-dpdk.pc.in scripts/builddeb Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e1132306f6ca075ec0c1046d75903c307ba53678 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 19:48:19 2016 +0100 Port "e856337d linux-generic: packet: implement broadcast and multicast metadata flags" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 66844a35e22d84ceb73b27140b1d3803ccfc14ca Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 19:42:50 2016 +0100 Port "23cdfbd1 api: packet: add detailed packet error flags" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 55458bbdf4ca7a5cdb06859f6555521f37e08763 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 19:39:18 2016 +0100 Port "38de6769 helper: convert to a library" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit fae63f4f10b21bafd471b219184001259ee10e47 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 19:22:14 2016 +0100 Port "1db8328b linux-generic: pktio: simplify callback interface" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 35e1cefdf7aa750609d52e0751def2f8c93c4810 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 19:19:08 2016 +0100 Port "60b570d6 api: queue: remove queue type pktin and pktout" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d7396e5b19f940838da819286e281221538e024b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 19:17:41 2016 +0100 Port "4a47f53b api: pktio: changed odp_pktio_mtu() return value to uint32_t" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 68a78de3af9f763d78f0787171ac768f7dbf5cd9 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 19:15:03 2016 +0100 Port "2dae4b1b api: pktio: added pktio info structure" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b708a27b084ac499694ba3ee85b183afd928340b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 19:02:48 2016 +0100 Port "e4ac2e3a linux-generic: pktio: pktout event queues" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 318e41848d1af7453f19466779a1a12913367754 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 18:58:22 2016 +0100 Port "608c2404 linux-generic: pktio: add separate functions for global and local init" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 57e80531f6e355a594e24999df404de9acf9e0b0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 17:20:37 2016 +0100 Port "e6adb814 linux-generic: tm: fix numerous bugs in timer wheel and main tm implementation" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 49c828151dc96186bf894cc59c920de379151950 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 17:19:20 2016 +0100 Port "464579c6 linux-generic: tm: Add missing name table initialization call." Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 90c2744054e93e4dea9d65209d46ed459c16a5b2 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 17:15:53 2016 +0100 Port "2f3f19e0 linux-generic: tm: implement traffic manager" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e06c66fe7a0d82e4e6c8158c0a1a4a5d1270d65e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 17:04:17 2016 +0100 Port "90a32ca4 api: tm: add tm API definitions" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ed23ff6612c37aa6b218f52ceafc932f2f858189 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 15:54:54 2016 +0100 Port "98e20f0a api and linux-generic: make room for new api" The following command were run: git grep -l "#include <odp/[a-z_]*.h" platform/linux-dpdk | xargs sed -i s/"#include <odp\/\([a-z_]*\).h"/"#include <odp\/api\/\1.h"/g git grep -l "#include <odp\/plat\/[a-z_]*.h" platform/linux-dpdk | xargs sed -i s/"#include <odp\/plat\/\([a-z_]*\).h"/"#include <odp\/api\/plat\/\1.h"/g A few references to the new spec directory fixed, and a bunch of symlinks edited. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 269df889a9b2ff6e4a8a1b4e9c2b2e11787eb786 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 15:13:39 2016 +0100 Port "baef4a6b rename libodphelper to libodphelper-linux" The following commands were run: git grep -l odphelper-linux . | xargs sed -i s/odphelper-linux/odphelper-dpdk/g git checkout -- platform/linux-generic/ rename s/odphelper-linux/odphelper-dpdk/g pkg/debian/* rename s/odphelper-linux/odphelper-dpdk/g pkgconfig/* git add -A Plus scripts/builddeb and Makefile.am's in platform/linux-dpdk were edited as well. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8e34a1aa7f8c3b08a732508754fdc731f9c6d3cb Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 14:54:44 2016 +0100 Port "886acdfc rename libodp to libodp-linux" The following commands were run: git grep -l odp-linux . | xargs sed -i s/odp-linux/odp-dpdk/g git checkout -- doc platform/linux-generic/ rename s/odp-linux/odp-dpdk/g pkg/debian/* rename s/odp-linux/odp-dpdk/g pkgconfig/* git add -A Plus scripts/builddeb and Makefile.am's in platform/linux-dpdk were edited as well. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 623b5a34aac975e979038d01d9c4ee87963684e1 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 30 14:57:50 2016 +0100 Port "d533b645 linux-generic: test: adding odp includes" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f2265da8a13fea67217956cb7a29b097628e2c3b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 29 19:50:07 2016 +0100 Reapply "linux-dpdk: packet_flags: use rte_mbuf's l2_type for flags" Now the preprequisites are here. Original commit message: Store the L2 and Ethernet flag in this variable, as this platform only supports Ethernet on Layer 2. See RTE_PTYPE_L2_* defines in rte_mbuf.h for more information. Note, it seems nothing guarantees that a DPDK poll mode driver necessarily set these flags on incoming packets. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 520b4f009faa9525e53aec565b1f4b464e8dfea7 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 29 19:47:53 2016 +0100 linux-dpdk: packet: rename internal functions Having the odp_ prefix suggests they are part of the API. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 754165b6b87e37ff77b3503122fe75e6855c820b Merge: 16fe86ae 599bd486 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 29 19:42:18 2016 +0100 Merge branch 'master' of https://git.linaro.org/lng/odp Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 16fe86ae0d3b3f4011ab24f0666256ee7a7cb802 Author: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Date: Fri Mar 18 18:23:56 2016 +0000 linux-dpdk: std_lib: dpdk_memcpy definition for arm/arm64 DPDK for arm/arm64 uses a #define for the rte_memcpy, which is not suitable to get as a function pointer. For those platforms, wrap it in a static function and pass its address as dpdk_memcpy. Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ca6fd4f063ce02945ba2283bc753465524b898a2 Author: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Date: Fri Mar 18 18:22:43 2016 +0000 configure: use ARCH_X86 conditional and decide when to use sse4.2 In order to allow build on non-x86 systems add ARCH_X86 conditional and use it when deciding on the -msse4.2 flag. Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit fdc4c0b40f0b4c856524e86d38a7ffefbb8cd8e5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Sun Mar 13 00:31:31 2016 +0700 Revert "linux-dpdk: packet_flags: use rte_mbuf's l2_type for flags" This reverts commit 59b025b38a81470ab6f67c160c179f9711dff747. Only temporarily, until its prerequisites can be merged from odp.git. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 59b025b38a81470ab6f67c160c179f9711dff747 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 2 16:47:51 2016 +0000 linux-dpdk: packet_flags: use rte_mbuf's l2_type for flags Store the L2 and Ethernet flag in this variable, as this platform only supports Ethernet on Layer 2. See RTE_PTYPE_L2_* defines in rte_mbuf.h for more information. Note, it seems nothing guarantees that a DPDK poll mode driver necessarily set these flags on incoming packets. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit bbf64e48855861197ebcb83e91516560b46f0162 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 2 16:28:42 2016 +0000 linux-dpdk: packet: don't look for L2 header if there isn't any The L2 offset functions should consider the L2 flag: return negative answer if there isn't any, and implicitly set it when offset is set. E.g. user created packets don't have L2 headers immediately. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a6f859de54659035305b4ad39e074ea531f75473 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 2 16:22:08 2016 +0000 linux-dpdk: pool: set priv_size correctly Indirect mbuf's are not used at the moment directly by us, it doesn't hurt to fix this issue before it causes problem. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b56d8b7405a059b9d4bd4388f0cae774a64f45dc Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Feb 29 19:29:38 2016 +0000 linux-dpdk: pool: fix buffer size calculation Some cards round down the buffers (without the headroom) to the nearest multiple of 1024. When enabling jumbo frame the max buffer size is checked, and if it doesn't fit into a single segment it enables scatter-gather on RX side, but not on TX. To avoid complications, make sure every pool segment size aligns to n * 1024 + headroom, and that the RX configuration uses jumbo frame size adequate for that pool's segment size. I've also added a comment to "struct mbuf_pool_ctor_arg" to remind that 'pkt' has to be the first. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit 34ef02199fdec3a47a86df78a7bbe032be44f83e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Feb 29 19:23:43 2016 +0000 linux-dpdk: pool: use the right headroom value We can't use the RTE_PKTMBUF_HEADROOM define in the config header as DPDK headers are not accessible there, but the static assertion will warn if there is any difference. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8e00aa1f8f17c2662f9193d68b0c337ec4b5263c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Feb 29 17:17:13 2016 +0000 linux-dpdk: config: create local copy of config.h Some values have to be changed in this file. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8556e01cd7c5e8f9399260c677175a5872b59da8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 25 17:11:34 2016 +0000 linux-dpdk: remove stale code Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f1bc069ec4d39c0d5951d95b2524820f85428a98 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 25 17:07:59 2016 +0000 linux-dpdk: packet_io: call rte_eth_dev_close() only when safe When the port has never been started, calling close might crash. To work around this bug this patch maintains the state. Reported-by: Matias Elo <matias.elo@nokia.com> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3e7ff600195b7dfc08c89562e4ba332ce9f4d22b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Feb 19 19:00:24 2016 +0000 linux-dpdk: packet_io: implement multiqueue support A lot of code comes from linux-generic's DPDK implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8a66f2074be5254f9911d189829823f4af98e0b7 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 18 18:34:53 2016 +0000 linux-dpdk: packet_io: move configuration to pktio start This will be necessary for changing queue numbers. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 18edf494f30236b8b561269cc31499b34506d7f5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Feb 16 16:38:31 2016 +0000 linux-dpdk: test: fix error handling There are several changes in this patch: - print clearly what page size we try with - exit immediately if we can't reserve at least one huge page - if the test binary fails, don't try to print logs to tty Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0d3e55704877e74c6c9b42982bb0c7fc1dbca261 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 19:05:49 2016 +0000 linux-dpdk: pool: remove cache overhead Since "8d784418 api: pool: allow per-thread caching" it is clear we don't need this, and the timer test is also upgraded now. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 09c4ba9249754bcc6abcc39607f4f04879cd4e3d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 17:44:06 2016 +0000 Port "bd4a85e validation: removing synchronizers tests" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4743add489f2bf7ac831f08087a573c85bc59b99 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 17:43:12 2016 +0000 Port "dbac888 validation: synchro tests split into 3 groups" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 62363415d21c0e77595b48eabd30cb7f69de2b62 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 17:37:05 2016 +0000 Port "c2bc6cb api: stdlib: added odp_memcmp" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit fed8690a8c1b260acb60247e01222de2efe4cdef Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 17:34:02 2016 +0000 Port "2a823dd api: atomic: added atomic_lock_free_u64" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c5cc8f18b97ae2eca535a29fbf54facea80558a9 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 17:30:38 2016 +0000 Port "59128f5 linux-generic: cpu: implemented pause" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e96cfa3e7370b5f8f68e943e2438d9bf9ccc2626 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 17:09:26 2016 +0000 Port "1600aac linux-generic: sysinfo: move x86 system info codes to its plarform file" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 1a1ce749fa95b5da3033711a746edc5fe0878ed0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 16:59:20 2016 +0000 Port "03bd111 linux-generic: arch: renamed cpu arch files" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2ed486bacf7ba5250a6e84407a795662a3709289 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 16:37:11 2016 +0000 Port "ce81936 api: init: removed platform_init struct definition" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7de4d59328b62ff038d72c13fbd0365eefb71f0c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 15:53:20 2016 +0000 Port "6538ae6 linux-generic: pktio: print out the name of pktio used" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e8ef75750f3e414a483605bfda56c85f9030ca24 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Feb 10 15:47:07 2016 +0000 Port "dd3b06b linux-generic: sockets: implement pktio statistics" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b38c33e4ccb028fd1415d5b09dfc98c12dbec98a Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Feb 9 19:35:59 2016 +0000 Port "009899e linux-generic: pktio: implement odp_pktio_link_status()" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e2329bbdb8021e4be571abdeba1e40e7ef4ede42 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Feb 9 19:27:24 2016 +0000 Port "4eb6dea linux-generic: pktio: added scheduler multi-queue support" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 11a118bff195bdc86d147f2a52c2b270cb2ad72c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Feb 9 19:23:27 2016 +0000 Port "20c77dc linux-generic: pktio: enable using PKTIO_MAX_QUEUES in pktio implementations" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3bcf0780ec937373d327a4bb651d3512567f4ba5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Feb 9 19:19:01 2016 +0000 Port "5d290d2 linux-generic: pktio: dummy multi-queue pktio" And fold "04152dd api: pktio: renames for compact type and func names" into this. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 508803806a66efe5525c644a36b2e33e0e5cecc9 Merge: 2bc611a5 bbd5ac81 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Feb 9 17:17:18 2016 +0000 Merge branch 'master' of https://git.linaro.org/lng/odp Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2bc611a580fe02b655d9de5156d7ed0444888f37 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jan 25 15:50:47 2016 +0000 Port "9766969f linux-generic: define posix extension level once" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 805f353637f2757857b2278e2c86682c356bde17 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jan 25 15:31:06 2016 +0000 Port "67260075 linux-generic: init: handle local/global init/term cleanly" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 543d3052e12757ffcc2f3bd29967d0856731932f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jan 20 17:57:54 2016 +0000 linux-dpdk: packet_io: delete file with old pktio implementation The previous patch made this unused. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c6aee2829bc5badf05ba6074f496a3b92bbd52f7 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jan 20 17:15:18 2016 +0000 linux-dpdk: packet_io: reuse linux-generic code and enable classification 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> commit c986883f6184aa3f22ae28e0b7419ce751fd7bfc Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jan 20 16:55:07 2016 +0000 Port "e6216bc6 linux-generic: pktio: fill in L2 parse results by default" But don't parse L2 header by default, only on demand. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 70d52b245128205c5df28209c4fa7b5fb2d7ad18 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jan 20 16:49:18 2016 +0000 linux-dpdk: packet: remove frame_offset from packet header struct It's an obsolete garbage. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit dedb18376bafb329b9ff8b5a56c0c3798af316ea Merge: c67e7869 f4016bd8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jan 25 14:32:25 2016 +0000 Merge branch 'master' of https://git.linaro.org/lng/odp Conflicts: example/Makefile.am commit c67e7869ee82f6bbfbba82988d8f128d2598f1bd Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jan 14 17:33:13 2016 +0000 linux-dpdk: init: fix return value checking 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> commit d1e6e2c9fde01a0be11712656c44fe095c02cb75 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jan 14 17:32:04 2016 +0000 linux-dpdk: init: don't save optind 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> commit 4c8fb99fc92b9b766751278c5626bd9f072b9656 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jan 14 17:27:26 2016 +0000 linux-dpdk: init: fix command line arguments 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> commit 07d1ab36c92d601a40400cc89b690f56d0d87ec8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jan 7 14:01:20 2016 +0000 linux-dpdk: init: remove getopt library reset This is now taken care by DPDK itself. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9b89bd6a5d3eb262a2f1f28135fe68cd4f3d8126 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jan 6 16:28:45 2016 +0000 scripts: compile documentation for devbuild So developers get warned if it fails. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e8c2edbf636795fa36757f96709d3769d81a2d54 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jan 6 18:08:36 2016 +0000 linux-dpdk: upgrade to DPDK 2.2.0 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e6fa7e457faee625943e7175c71e39dd23305cd5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jan 6 16:35:05 2016 +0000 linux-dpdk: README: testing moved to newer kernel Quite a while ago, but the README referred to old data. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 60e0608ce4dcbba83e9fed7f733cf3c094c6fc55 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jan 5 17:16:30 2016 +0000 linux-dpdk: remove pktio_tap test 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> commit 290342cff5d0e2bb954f9eaf148bfdbf8c14c829 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jan 5 16:59:04 2016 +0000 Port "41e79bb2 api: pktio: add odp_pktio_print() API" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4b01c311a5f6b8be6a837d1fc8c4dcc592685420 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jan 4 19:24:04 2016 +0000 Port "6a598853 api: clib: added standard c library api" The DPDK memcpy version is also exposed through function pointer. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit bb552a40c63560b5b734e80204b716bf16975f48 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jan 4 19:11:03 2016 +0000 Port "10042384 api: rwlock_recursive: added recursive rwlock" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5c95b45a8fa481067a0ab3a47fb7df8b0861dcfc Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jan 4 19:02:07 2016 +0000 Port "a0b30a27 api: spinlock_recursive: added recursive spinlock" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 30c69e14b1d2af1f59b0b0350187711d91724645 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jan 4 18:54:13 2016 +0000 Port "da9cde9a api: thread: added THREAD_COUNT_MAX define" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit acfc9500048d075a59fc1ce1205a13575fcaec0c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jan 4 18:44:18 2016 +0000 Port "bbf9c099 api: hash: Added crc32 and crc32c hash functions" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5b91afe772557a1f0cc91620afcccd72af25eab8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jan 4 18:37:46 2016 +0000 Port "linux-generic: thread: removed internal max threads define" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8f85d4cfbc70e381ab1798c849b9e59bd3730d0c Merge: 84fa3e7a 4320d765 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jan 5 17:30:24 2016 +0000 Merge branch 'master' of https://git.linaro.org/lng/odp Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 84fa3e7a760bd5757aa7611e475fbbaff04c67a6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Dec 21 18:32:49 2015 +0000 linux-dpdk: remove clang warnings There is a type compatibility issue in recv_pkt_dpdk(), although it doesn't have an effect as both of them are pointers. The rte_mbuf accessor functions are bringing up alignment change warnings, which are false-positives in this case. These fields are defined with their appropriate type in the original structure, so their alignment is guaranteed, but the reason for these functions is to hide that structure. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 878e720b8d20ce954513e3338cf9dcd7d89cb3b5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Dec 21 17:33:28 2015 +0000 linux-dpdk: define test wrapper script in Makefile.inc That way the helper tests can pick it up too. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9eca3dd5deab6805b2d1989c71e09d37a431a47c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Dec 16 16:49:51 2015 +0000 linux-dpdk: cpumask: go back to linux-generic cpumask implementation The only reason for a separate one is because odp_cpumask_default_worker() goes through the lcore list to get this data for us. But with the master thread's affinity fixed there is no need for that, the linux-generic way of using the thread affinity is good for linux-dpdk as well. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 44ca0a666b77db5f863a2a9d27b33c74f30e6912 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Dec 16 13:00:17 2015 +0000 linux-dpdk: init: pass only one core through -c parameter The others would be used for DPDK lcore threads, which are not accessible for an ODP application. It requires ODP thread init to set up lcore_role, though it's not widely used in other DPDK libs. Also reset the original affinity of the calling thread, as DPDK limits it down to one core. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit cd7e8754a547d6d165b74d5258ce6b4dd60e653d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Dec 15 19:11:22 2015 +0000 linux-dpdk: pool: check returned number of workers Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e886513b57fca4c00f4c8774cc93efb8d99b5101 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Dec 15 19:10:08 2015 +0000 linux-dpdk: remove unused source file helper/linux.c is used instead of this. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 33aa8daccc20e2594d1d8037b2c14cc317bbc676 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Dec 2 16:55:57 2015 +0000 linux-dpdk: test: fix huge page info print Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 279fdce26c3dbd063f9e86d3c90663937d521703 Merge: 33f940ae 433f1cd8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Dec 10 18:15:28 2015 +0000 Merge branch 'master' of https://git.linaro.org/lng/odp commit 33f940aeb3b979d7aa07c99b1e6fc4977eab37d9 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Dec 10 14:58:25 2015 +0000 Port "8ecc8fa9 linux-generic: schedule pktin_poll: account pktio stop state" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 805a999685d154bbdcced4d055d8ea4a6cbb8288 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Dec 10 14:55:45 2015 +0000 Port "10b79440 linux-generic: pktio: configuration functions check that interface is stopped" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 412a8da2ae1ccf9b596ae2eed84ae1d2f3ba4010 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Dec 10 14:45:35 2015 +0000 Port "ed10cea1 linux-generic: pktio: check interface mode is compatible before receiving or sending" And "45259bf4 linux-generic: pktio: factor state management into packet_io", plus add some extra logging. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4c13c58dc2df1ff86d15697139ec4225899e8fea Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Dec 10 14:30:40 2015 +0000 Port "7c7c3b8c api: packet_io: added odp_pktio_param_t" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 05f880c9f71e617bdf8fe91b9caa8c08d8918f39 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Dec 9 18:24:08 2015 +0000 linux-dpdk: pktio: check for pktio_start when started and pktio_stop when stopped DPDK checks that too but it doesn't return an error, so we should maintain the status too. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b0c8cca3ddfe1c63d6e450580955764f7fc122ac Merge: 92936b6a d4505f1b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Dec 9 17:50:14 2015 +0000 Merge branch 'master' of https://git.linaro.org/lng/odp To get some fixes for queue implementation. commit 92936b6a85e89407073bd2d3dc86cb3c52d692fe Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Dec 3 16:00:41 2015 +0000 linux-dpdk: packet: implement odp_packet_alloc/free_multi() functions Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a2d9f584381cb0053f9b7796c4a7b6783d7ed6b3 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Dec 3 14:04:49 2015 +0000 linux-dpdk: buffer: implement odp_buffer_alloc/free_multi() functions Plus set the errno as well, and codify further that odp_buffer_t == (struct rte_mbuf *) . Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit cbfc8265a29a6c82155c533d0e7bda063e14ff13 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Dec 3 13:40:27 2015 +0000 linux-dpdk: buffer: enforce pool type in odp_buffer_alloc() It doesn't make any sense to allow this function allocate from non-buffer pools. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 383a091bd622a568b6bb91eb7b8ab59cefe8179d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Dec 3 13:19:01 2015 +0000 Port "44dde8a5 api: time: unbind CPU cycles from time API" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 61594a656bb9af173c070531cd5cc4ddf893c819 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Dec 2 17:49:45 2015 +0000 Port "d7049e08 platform: move list of API files to Makefile.inc so it is common to all platforms" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6468c67fdae476fa1547127107eae1a3f69f0e23 Merge: 2a3b50c2 8ba26d75 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Dec 2 17:44:19 2015 +0000 Merge branch 'master' of https://git.linaro.org/lng/odp to 1.5.0.0 commit 2a3b50c210b3efa75bbbfbe5b55367031c1563e4 Author: Miroslav Kiradzhiyski <miroslav@virtualopensystems.com> Date: Tue Dec 1 16:36:05 2015 +0000 linux-dpdk: init: parse command line options using rte_strsplit() DPDK already implements rte_strsplit() which can be used instead of the parse_dpdk_args() function. This saves some dynamic memory allocation and simplifies the code. Signed-off-by: Miroslav Kiradzhiyski <miroslav@virtualopensystems.com> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d0fe316d5404b84212978931faa7d53c64a4efcc Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Nov 24 18:13:40 2015 +0000 linux-dpdk: init: fix cpumask string allocation The calloc() has several issues in calculating the string size: - doesn't account for the "0x" prefix - nor the space after the core mask - sizeof(core_mask) should be doubled, as each byte can be represented as two hex characters But also the width of coremask cause a limitation. This patch uses the odp_cpumask_*() functions to create a proper mask. Reported-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e2e0a537c2953d8e67b45ac5fb4f66157e28378b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Nov 20 16:32:51 2015 +0000 linux-dpdk: scripts: remove old references to ODP_BUILDDIR Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 14ae91fae0a1293aa079e4fec5cd50db2ffb34ef Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Nov 20 16:30:38 2015 +0000 linux-dpdk: init: allow passing DPDK cmd line through odp_global_init() The platform_params parameter will convey that through. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f5a441303606b2f0ad06a657af2bbd958c648197 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Nov 16 18:16:22 2015 +0000 linux-dpdk: devbuild: follow up with check-odp changes This variable were renamed to GENERIC_BUILDDIR. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> commit 627b59fe2c80f8c031eb5b32b2f1e3a4fba2a896 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Nov 11 18:04:53 2015 +0000 scripts: don't disable perf tests It is already disabled by check-odp. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a39cd9b1584a8075cfdb2cee4b5019ded516af6a Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Nov 6 19:05:26 2015 +0000 linux-dpdk: move support target to DPDK 2.2.0-rc1 - ixgbe vPMD now has lower requirement for recv burst - mlx5 supported Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2696c1fdb1fa9e7a0f59ca42f83dfb0b91c00a50 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Nov 6 18:28:18 2015 +0000 linux-dpdk: devbuild: follow up on check-odp changes Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8cc2fe669adc2a5a2f39f44aea91ec0fd8091a03 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Nov 6 18:24:59 2015 +0000 linux-dpdk: test: detect hugepages mount error and prefer 1G pages Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f19b00bdcfe3099d602941e7378c75c184782ce8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Nov 6 18:15:56 2015 +0000 linux-dpdk: README: fix compile instructions Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reported-by: P D, Arun <arun.p_d@nokia.com> commit 760ea9eb4a59fd2b541c6c13ad3a57513587b8d4 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Nov 6 18:14:35 2015 +0000 linux-dpdk: buffer: remove limitations due to DPDK 1.7.1 bugs It was forgotten at the time of upgrade to 2.1.0. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit fd553bd19e82f680d2b7996ae1adffb7e4e6e840 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Nov 4 17:11:03 2015 +0000 linux-dpdk: errno: use rte_errno instead of __odp_errno It is DPDK's errno variable. odp_pktio_send() also makes sure that it is set even if the PMD doesn't do that. The macro in odp_buffer_inlines.h is a workaround to make sure linux-generic timer implementation doesn't have a linking issue. It would be slightly better to have it in a local copy of odp_internal.h, but having it in sync with linux-generic is more important. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f0ca6415e7d438a0707e1f065e24751b10679e44 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Nov 4 16:42:15 2015 +0000 linux-dpdk: errno: create localy copy of linux-generic implementation Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit fc8047efd8045d763ce241175930443879c686ed Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Nov 4 15:36:23 2015 +0000 Port 52ca6f65 "linux-generic: cpu: implementation for cycle count API" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8ec1dafd4bea92b1ea1718d0ebae61153107c03b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Nov 4 15:33:30 2015 +0000 Port a4903e1f "api: thread: added thread count max" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 16213a2830d74383bff78beee34eb36745705388 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Nov 4 15:28:08 2015 +0000 Port 4e0c9052 "linux-generic: pktio: implement odp_pktio_param_init() API" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit bd5339d6dc62f5b53ca515b9962a7d2adc05194e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Nov 4 15:27:36 2015 +0000 Port 5126cc51 "linux-generic: cpu: created arch depedent cpu_cycles files" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 52d79a73a9472b50ee3c3e4b133fa095fa154b73 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Nov 4 14:48:33 2015 +0000 Port e51f4f01 "api: config: removed ODP_CONFIG_MAX_THREADS" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b29e5df8df2d08e51542a39da27e58bb03ecbf8e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Nov 4 14:34:39 2015 +0000 Port 8f07daf0 "api: schedule: revise definition of ordered locks" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a2b9496cd96c78dbbd6f0201c081b393ee2388f0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Nov 4 14:24:38 2015 +0000 Revert e6216bc6 "linux-generic: pktio: fill in L2 parse results by default" This change brings a lot of overhead for applications which doesn't need parsing at all. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8ee9ac3f32a16f6e5dd2a0df9b56c455ce2dfc8a Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Nov 3 16:02:56 2015 +0000 linux-generic: packet_flags: remove linux-generic flow hash implementation Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d4674e89875b3cac884dd4ad494fd1de5ac77e7b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Nov 3 16:00:36 2015 +0000 linux-dpdk: packet_flags: create local copy of linux-generic implementation odp_packet_has_flow_hash*() functions are now defined by both platform. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f1b21e8e06e7ab991d2d274d6eaa5ebe7ee54364 Merge: 1efc16f9 d2a49c73 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Nov 3 15:52:04 2015 +0000 Merge branch 'api-next' with RSS support Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 1efc16f96f150f54b002cbe64f28b9e55d814672 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Nov 3 15:38:57 2015 +0000 Port 357e236c "api: rename odp_cpumask_def to _default" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ec236c7d70ca1434ff2074563b5881a86116ffcb Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Nov 3 15:29:54 2015 +0000 linux-dpdk: m4: disable linux-generic PCAP support linux-generic PCAP support is not relevant as the code doesn't use linux-generic pktio at all. And DPDK has its own PCAP support anyway Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f8c6fcc8e510f1ba7c0c258e13a994dc5836933e Merge: d8bceaec fdcd79c0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Nov 3 15:26:06 2015 +0000 Merge branch 'master' of https://git.linaro.org/lng/odp to 1.4.0.0 Merging commits from mainline odp.git master branch, up until fdcd79c0 "test: l2fwd: separate rx and tx drop counters" Conflicts: configure.ac test/validation/Makefile.am Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d8bceaec15a1ca37cd23d420b1f285c94e5736fc Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Nov 3 14:41:14 2015 +0000 linux-dpdk: packet_io: implement start and stop for pktio The original implementation in 51226cbd 'Port 5176d3 "linux-generic: add pktio_start and pktio_stop"' was only an empty one, this patch use the relevant DPDK functions. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d2a49c73b8765a6afb86058f25c5ad829d1c49ef Merge: 54def443 f855321e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Oct 20 18:41:17 2015 +0100 Merge branch 'master' into api-next Conflicts: platform/linux-dpdk/Makefile.am platform/linux-dpdk/include/odp/packet_flags.h commit f855321e3f7c242cb017bdcdd2d38e58aedc82a5 Author: Anders Roxell <anders.roxell@linaro.org> Date: Tue Oct 20 18:33:12 2015 +0100 dpdk: Makefile: reuse header files via symlinks By adding symlinks doxygen will present the correct information. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit aa5ae5f905f95eb815b0758e635a50418e0ee323 Author: Anders Roxell <anders.roxell@linaro.org> Date: Tue Oct 20 18:22:41 2015 +0100 dpdk/m4: fix bootstrap warning + aclocal -I config -I m4 ./platform/linux-dpdk/m4/configure.m4:42: warning: file `platform/linux-generic/m4/odp_pthread.m4' included several times ./platform/linux-dpdk/m4/configure.m4:43: warning: file `platform/linux-generic/m4/odp_openssl.m4' included several times ./platform/linux-dpdk/m4/configure.m4:42: warning: file `platform/linux-generic/m4/odp_pthread.m4' included several times ./platform/linux-dpdk/m4/configure.m4:43: warning: file `platform/linux-generic/m4/odp_openssl.m4' included several times Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0db9aaeb97c309371b03f6166a763787b4a20aa5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Oct 20 18:13:17 2015 +0100 linux-dpdk: packet_io: merge received packet handling loops These two loops are going through the same set of packets, it's better to have them in one. Also move those two struct members adjacent to help optimization. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 54def4432829350e863e647c74162e50431c4f20 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 2 18:58:26 2015 +0100 linux-dpdk: packet: implement flow hash support Using the RSS hash for that purpose. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4243fdb11ea1dedb6c13a47b38a9c74010106738 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 9 18:46:12 2015 +0100 Port e3cd1e "api: sched: moved scheduler types into new file" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e43c8ac9c61791c3044afddbbdcd26e2d429a281 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 2 17:40:12 2015 +0100 validation: packet: test flow hash Set the max value, check if it is maintained, then clear the flag. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ff4ac5e0ad320a83c4a7f1314a150e9b9113062f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 9 18:12:24 2015 +0100 linux-dpdk: packet_io: fix max_rx_pkt_len seg_len might be 0, new unit tests are failing due to this issue. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7c98682102698f613e41384808d012bdda7f31cf Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 2 17:39:21 2015 +0100 api: packet: allow access to packet flow hash values Applications can read the computed hash (if any) and set it if they want to store any extra information in it. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> commit 51226cbd0a4f44476cbec9eabe2c47d014465137 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 9 12:34:02 2015 +0100 Port 5176d3 "linux-generic: add pktio_start and pktio_stop" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 82c9457b398905edb926fa49a7aba8f7fe0cecb5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 9 12:20:27 2015 +0100 Port 26722c "linux-generic: schedule: implement scheduler groups" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 588e52ba02550fd7b3afa4407c57237f95250acb Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 9 11:28:23 2015 +0100 Port 839354 "linux-generic: pool: implement odp_pool_param_init" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b18d0bcbcffc1d4988d1a95c86811556c8a80bb6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 9 11:21:40 2015 +0100 Port 4450e0 "linux-generic: move openssl checks inside linux-generic" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d828b68e9d6e7887be5d933a8d0e1857ec7da8ce Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 9 11:19:13 2015 +0100 Port a2d4eb "linux-generic: move pthread checks inside linux-generic" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 71546b2b365d81d7852e496645f6d21d6bd7bbaa Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Sep 8 18:27:14 2015 +0100 Port bb00e7 "linux-generic: Makefile.am: fix basename conflicts" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6b6b6fb015a8620698b303ef7be3f183af8d35a6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Sep 8 18:05:54 2015 +0100 Port 7c7c3b "api: packet_io: added odp_pktio_param_t Don't do anything with this value right now. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3bfd9e3b1144003b09f12a385465bba3b006827b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Sep 8 17:46:58 2015 +0100 Port 3afd41 "linux-generic: general: add odp_forward_typedefs to resolve clang issue" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b24a7384e0fedfef26d2a3554289fabb537fdac5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Sep 8 17:37:44 2015 +0100 Port a4d3bc "linux-generic: queue: implement ordered queues" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f1e57f44a853c7c61bde41e343ab9fac52c4afef Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Sep 8 17:04:19 2015 +0100 Port fbac05 "api: init: use const pointer types" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 14ab21f86c007c12a311dfc67b93ce6bad9f40ad Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Sep 8 16:47:47 2015 +0100 Port 51bff8 "api: event: change to odp_event_type_t" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3d153ce120f85775d0b2b3fcf7ccfbdd85ef45d2 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Sep 8 16:38:10 2015 +0100 Port 7fff60 "linux-generic: remove linux-generic makefile generation from common configure.ac" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6d5e99291a6e62bae7dc8154077ec7bbe98ad4fb Merge: 48c8a714 45259bf4 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Sep 8 16:23:35 2015 +0100 Merge odp.git's master to update to 1.3.0.0 commit 48c8a71416f0112a4c075e948efa3092b9fe4dcd Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Tue Sep 8 16:10:00 2015 +0100 linux-dpdk: packet: uplevel default RSS config to DPDK 2.0 conventions Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5ae37b41e41fbbce8de4c71733ac2adb77c73185 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 2 17:32:48 2015 +0100 Port 2a979410 "linux-generic: strongtypes: use named structs for C++" To fix C++ compilation. Reported-by: Gabor Sandor Enyedi <gabor.sandor.enyedi@ericsson.com> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 156c4d40d3ed3f4aba8140d6bc3c44ee6dba1216 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Aug 18 11:19:19 2015 +0100 linux-dpdk: pktio: use default RX/TX configuration of the PMDs It is more universal. Later on we should introduce a more flexible way for the applications to fine tune it. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@enea.com> commit 19a7541d082b937cd6a725a172b0018ceb7077a3 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Aug 18 11:05:54 2015 +0100 linux-dpdk: pktio: handle vector PMDs The ixgbe PMD introduced vector operations on the RX path, and the plan is to change the other drivers into this direction as well. Unfortunately that means these new drivers mandate a minimum burst size for receive, otherwise they don't return any packets. As ODP can't impose such a requirement on applications, we have to deal with it during the receive function. Currently ixgbe requires 32 buffers, it is expected to change to 4 later on. The rest of the packets in the burst are dropped, and a debug message is printed. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6b29546f13528ff7c49564ef893ae114fa28e63e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 2 16:57:20 2015 +0100 pool: add more debug output about sizes in the pool creation Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit dbc08807f6e5a2e6e9d10d488944d589cf394824 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Sep 2 16:25:14 2015 +0100 linux-dpdk: support DPDK 2.1.0 There wasn't any change since rc3 which would need acted on. The restriction about IP fragments could be lifted too. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6a838a51516e3918d23cf110dd64703538af8cf8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Aug 14 18:59:25 2015 +0100 test: wrapper: decrease requested hugepage number It's still 0.5 Gb, this way machines with less memory can also run it. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5e1e8d231fceba86677b63aeab57b0881bedef63 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Aug 13 18:14:03 2015 +0100 Port 7cd8a605 "validation: changing build order" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> commit 9c66bca0d8c059bb35abb434018e393bebe2ddfe Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Aug 10 15:09:23 2015 +0100 linux-dpdk: test: create the HUGEPAGEDIR parents, and don't fail if it exist Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Suggested-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 8e64aac38a9418099eccfc06d06fe1098ad03215 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Aug 7 18:31:54 2015 +0100 linux-dpdk: test: unmount hugetlbfs when test interrupted and at test start Do an unmount before mount, if necessary. The Ctrl-C handler is just for being nice to the rest of the system. Remove it from devbuild.sh. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Original-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit ebb9acde37af1aeeefb8bc9796bbea4d7425c00f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Aug 7 17:19:09 2015 +0100 linux-dpdk: test: pktio: fix pktio_run PATH setup When the build of tests outputs into an another directory (e.g. ./testdir) and 'make check' is running from there, pktio_run will run from the original source dir, so $(dirname $0)/../../../../test/validation/pktio will point to the original source as well. But pktio_main is in the build output dir. This patch adds that to the path. This should particularly happen in CI. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 62304a3fd8d3c355fa5bb53b501e27be58b6f16b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Aug 10 15:05:13 2015 +0100 linux-dpdk: test: output the tail of logfile to the console after failure This way we can see the details in CI, even though the log files are deleted. On the longer term we should add this functionality in odp.git to make check. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 318505a104ec695354408d99a323844cb45d2282 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Aug 6 16:51:36 2015 +0100 linux-dpdk: test: call make check with sudo And pass the ODP_PLATFORM_PARAMS to it. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 807f62a25ea72dfe61e6efb3ec7a70bbe785499d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Aug 5 19:37:27 2015 +0100 Port c9fca2c4 "linux-generic: pool: use ODP_CONFIG_PACKET_SEG_LEN_MIN correctly" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e1ac6c797539a62ee6b93554a1f0a7f5ba433a36 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Aug 5 19:05:14 2015 +0100 linux-dpdk: pool: add cache overhead when creating pool So applications can fully use all the requested buffers even when some of them are allocated to the object cache. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d3c82efd05916221cf28e7d5feff678028b67773 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Aug 5 19:02:27 2015 +0100 linux-dpdk: devbuild: remove obsolete pktio setup code and rework individual test running That pktio setup code is done by make check now. Also, the individual test running part should use the wrapper. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit ab2bda05acca04c683dc9d2ec7081b826920a88d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Aug 4 20:04:55 2015 +0100 linux-dpdk: init: init timers This was missed by the unit tests. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8c81e81c6f26ae7be377686147768b3ff1cf28e6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Aug 4 18:22:26 2015 +0100 linux-dpdk: support DPDK 2.1.0-rc3 It only needs a slight change in the Makefile, as the lib name changed. And refer the init functions of the new drivers. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f72f9c3b54293ac587de816b0b3fbc50005c1426 Merge: b7bb9f3b 3b09d892 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Aug 4 17:18:41 2015 +0100 Merge branch 'master' of https://git.linaro.org/lng/odp commit b7bb9f3b117e59a2bd144af3f1c3465dbe636766 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Tue Aug 4 17:05:34 2015 +0100 dpdk: set dpdk env for make check Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c31467b8fa286765ef2301fd14fc0de6f9ad9844 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Tue Aug 4 17:04:31 2015 +0100 dpdk: remove not used test/pktio_env Missing piece from my previous patch. pktio_env is now under test/pktio/ directory. That symlink has to be deleted. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 263cc9702461784515934c39f1bb52bac936e839 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 31 16:36:22 2015 +0100 README: document ODP_PLATFORM_PARAMS It's an important bit which was missing from our documentation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit acfe0d2564a22c8cec6bc65771ed190395677b32 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 31 16:21:22 2015 +0100 init: call init function of new drivers DPDK 2.0 have some new drivers, but we don't call their init functions. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8b9d55e7424a8f31c0bca45cce315897e4bab6cf Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jul 31 16:24:10 2015 +0100 README: Add symlink for ODP-DPDK readme from root dir It's easy to miss when it's in the platform/linux-dpdk directory. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit f10ca8c8b000ba04d431ea67c11ed5c8d82801c6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jul 30 17:58:47 2015 +0100 packet: check in compile time if DPDK ABI changed To make sure we don't cast the pointers to the wrong type in the inlined accessors. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-and-tested-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 42815a15e10cabfbfb6f3522a887c7ce2fd1f62b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jul 30 17:39:17 2015 +0100 packet: fix odp_packet_seg_len() casting data_len is uint16_t, so casting the pointer to (uint32_t *) then dereference it brings in the first 2 bytes from pkt_len. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-and-tested-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 481b71e20e14afa7a8b937580cf2cf4d4c4d9033 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jul 30 15:50:38 2015 +0100 dpdk: pool: set event_type during pool create This bit were missed while creating ad7fcd 'Port 3d85d5 "linux-generic: crypto: eliminate buffer type hack for completions"' Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-and-tested-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 762cf20e18a3a02d6a8311ed96e6d13b998aeace Author: Ciprian Barbu <ciprian.barbu@enea.com> Date: Thu Jul 30 18:06:13 2015 +0100 linux-dpdk: fix odp_cpumask_def_worker According to the API documentation odp_cpumask_def_worker sets up to 'num' CPUs and returns the count actually set or all available CPUs when num is 0. The former implementation was always returning the number of slave lcores, which is typically cpu_count -1. Note that if num == 0 the loop will iterate through all available slave lcores, thus conforming to the definition. Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ca493888e186aa38dbcd56282a3ef6e99a09f4c5 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Thu Jul 30 15:28:32 2015 +0100 dpdk: implement pktio_run Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 710f73c05301349d067b936fb821ac328821375d Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Thu Jul 30 15:22:18 2015 +0100 dpdk: symlink pktio_env and local copy of pktio_run Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f39f9869ef083f3e91a883caae3b902f15768012 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Thu Jul 30 11:21:47 2015 +0100 dpdk: implement odp_cpumask_def_worker Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 2d7405baf12745bb83b0480e6b0086884ae86d80 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Jul 29 19:04:20 2015 +0100 dpdk: use a local copy of odp_cpumask.c Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 97e47beb623c263b750d8dd1751cebd372b3d01d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 18:48:12 2015 +0100 test: add test wrapper script It will mount and unmount the hugetlbfs for us. Remove corresponding parts from devbuild.sh, and fix the individual test running part as well. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4e1d2c6cd00486a69c4fac778cfe3474ad23c9cd Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 18:44:05 2015 +0100 test: fix local Makefile.am We need a local copy of the linux-generic version, where classification is commented out. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 71225bb7381ce5cd109c238126be04b0c700875f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 16:09:32 2015 +0100 Port 0ebee2 "linux-generic: thread: implemented thrmask_worker and control" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0b20c17505e555710879f5cfdf03902c48115234 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 15:40:57 2015 +0100 Port 3f1a1c "linux-generic: thread: implemented odp_thread_type" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 124eece86293f4c49474b95f0c2e66bfea0111c6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 15:38:41 2015 +0100 Port 3ef51b "api: thrmask: added thread mask" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ad7fcd5500d56a148539a9b885fac9d116e02ecb Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 15:30:13 2015 +0100 Port 3d85d5 "linux-generic: crypto: eliminate buffer type hack for completions" And move the definition of odp_buf_to_hdr() to odp_buffer_inlines.h Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4160187b0f2c8220e93886f310a1da936a2d5bcd Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 14:59:33 2015 +0100 Port 5be42d "api: pool: remove shm paramter from odp_pool_create()" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d6a2b110a9c1c5a464c1266293165ac2c7ad2cb4 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 14:54:51 2015 +0100 Port 8b6c0c "linux-generic: thread: updated thread mask handling" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit de17f8fb88080378e3a5d1efbccec1cc87167c0b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 14:44:11 2015 +0100 Port 3501ae "api: init: added thread type to local init" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 435099d9b487be2aa85e11c7e7dfdcf82ba5bbd2 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 14:42:44 2015 +0100 Port 270af8 "api: helper: deleted odph_linux_cpumask_default" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5d6c6ea58845ed5b6c311b19690192db34802b18 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 14:38:53 2015 +0100 Port 46a041 "configure: use stricter warnings" Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 54e81c1a6b76b4c54dc4a2d65be21118c4e5d3db Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 14:37:05 2015 +0100 Port 5ab800 "validation: moving pktio plt specific to platform" pktio_env and pktio_run is empty now! Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c1edf60d492c08430af8d2c42a1600e54d4028b7 Merge: 213d8044 89dc8af4 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 28 14:14:35 2015 +0100 Merge git://git.linaro.org/lng/odp Sync up with latest ODP mainline commit 213d8044006e93b859a28a788325c38686912b65 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jul 27 18:48:26 2015 +0100 packet: inline odp_packet_data() and odp_packet_seg_len() They are also used in hot path. Also, get rid of the duplicate comments copied from the API. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit bc098bd3b501e3dd72030486725ed78f1d837e74 Author: Ciprian Barbu <ciprian.barbu@enea.com> Date: Mon Jul 27 20:03:27 2015 +0100 linux-dpdk: pktio: remove unnecessary pktio id from pool Remove old code that was used to implement odp_packet_input based on a per-pool pktio handle. Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2dd1d573dadf29332b76e0652f9a2a300647c940 Author: Ciprian Barbu <ciprian.barbu@enea.com> Date: Mon Jul 27 19:59:37 2015 +0100 linux-dpdk: pktio: use packet input field for odp_packet_input Fixes https://bugs.linaro.org/show_bug.cgi?id=1700 The way odp_packet_input was implemented made use of a per-pool pktio handle which meant that a pool could only be used by a single pktio. This was not correct from an API perspective and was probably old code remaining from the early days of odp-dpdk. As an argument for this there was already existing code that set a per-packet pktio handle, probably merged from upstream odp, but not actually used by odp_packet_input. Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a44b8e4fdfd87dc71192af19407aa1865e13931d Author: Ciprian Barbu <ciprian.barbu@enea.com> Date: Mon Jul 27 19:57:33 2015 +0100 configure.ac: fix default platform The help string states that the default platform is linux-dpdk but in reality it is set to linux-generic by default Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit dec969940486796ed98d4bf122dba7c7ebd352ac Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Jul 23 18:45:29 2015 +0100 linux-dpdk: packet_io: don't reset the offsets unnecessarily recv_pkt_dpdk() already calls _odp_packet_reset_parse(). Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3ada90e8b82de2eaca3b541a6d26b7cbbb18926f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 14 18:55:10 2015 +0100 linux-dpdk: packet_io: scale down descriptor numbers when pool is small Depending on the PMD the descriptor rings may need a buffer for each descriptor. And a pool is likely to be used for multiple interfaces. Scale down the descriptor numbers when they are more than a quarter of the pool. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3e3b703c3f46cf5ead7dad1f65d3f6afa876e76b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jul 14 16:27:37 2015 +0100 linux-dpdk: packet_io: use separate RX/TX locks and trylock for TX completion Using separate locks can avoid a lot of contention. And TX completion should use trylock: if someone else does TX on that port, chances are buffers will be released soon. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> commit 0514646ad1eaa34f74cf47df4ddf966e37227db4 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Fri Jul 10 19:13:48 2015 +0100 linux-dpdk: pool: use intermediate cast to avoid alignment warnings Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f99bc6286c63532fa8c50dec276fa2211e8f8c42 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jul 6 16:53:30 2015 +0100 pool: use the same default headroom as packet DPDK will use this headroom, it can cause problems if we use a different one here. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit 52e23eac0d09566940b3558e9701831643f9db83 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jul 6 16:50:20 2015 +0100 packet: fix error check in odp_packet_reset() Reset should pass if the required amount just fits the packet. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit 38d61b81894ea49c991d39dc7b8b6445e0f63e0b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jul 6 10:33:27 2015 +0100 dpdk: include the correct type definitions Otherwise applications use the linux-generic ones for basic types. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit 37cab30105889b29543bf90dc1dac1b8ed42cea6 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Wed Jul 1 16:17:07 2015 +0100 linux-dpdk: update to enable compile on DPDK 1.8 through 2.0 * RTE_MBUF_SCATTER_GATHER is not optional anymore * delete some dead code * no need to call rte_eal_pci_probe() * struct rte_mbuf changed, that causes most of the changes here * RSS config changed Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b3a46da78d79a63eb6ed4ba903455faef27f50a7 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jul 1 10:16:09 2015 +0100 thread: make a local copy of odp_thread.c We will need to modify it, so let's make a local copy of it. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit af15aa91a3d96a9ea0dd572c6d59b5eba26c51ae Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jun 12 19:28:54 2015 +0100 init: reset optind before calling DPDK init The calling app might have changed it. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b0ea4716a00ce31ce0d6c391456c6d61172613d8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jun 12 19:25:35 2015 +0100 init: omit return value of parse_dpdk_args() and refactor debug print We already have that value in dpdk_argc, no need to return it. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit aed7636c91f79d7afbfb17aee246ebfed68d60d0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jun 12 19:23:07 2015 +0100 init: check memory alloc failures in parse_dpdk_args And abort if there is any. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a5ac11fb32869f126a50fd57b7e1c8b3e043931c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jun 12 19:21:39 2015 +0100 init: release DPDK args Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c922bca7e27b4dcab79ddef9312971ec3d8e3e7f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Jun 12 19:19:48 2015 +0100 init: check rte_eal_init() return values more thoroughly Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2d232fabd9413821c2b2ce750499e403032ba8d2 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Mon Jun 22 17:14:09 2015 +0100 dpdk: do not lock up on running threads Do not run worker loop on current thread with remote launch. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e2a01fcdb14f4de29f8a8a0cf27a0f4d919b4609 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 10 19:37:06 2015 +0100 pktio: fix promisc setting 19121fd264: "dpdk: pktio implement promisc mode on vdevs" forgets to set the value when PMD supports promisc change. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 23d5429988b190f1d838027237224e1e798a815a Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Jun 10 19:35:09 2015 +0100 pool: fix cache_size calculation Round up j first to make sure we are under RTE_MEMPOOL_CACHE_MAX_SIZE. And allow 2 to be a valid cache size. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 19121fd26494c136b3ec5734dccd26abc0751335 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Mon Jun 8 10:07:22 2015 +0300 dpdk: pktio implement promisc mode on vdevs DPDK PMD vdev like pcap does not support switching promisc mode. Use system calls for corresponding devices. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3000df7d88b57af6ed2c1c2b383e1966818d556f Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Mon Jun 8 08:44:50 2015 +0300 dpdk: pktio: remove useless odp_pktio_open debug print Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5ece2ac021a9d7eedfaed45ded9ae7f550404551 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Fri Jun 5 13:13:26 2015 +0300 dpdk: turn on jumbo frames Turn on jumbo frames and make odp pktio jumbo test pass. In case if pcap DPDK PMD is used to capture jumbo frames needed to aujust snap len from 4096 to max packet size, like this: ./drivers/net/pcap/rte_eth_pcap.c Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f129286d633584da2a62370d813411a6a15f31e0 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Fri Jun 5 11:09:32 2015 +0300 dpdk: pktio: try get mtu with system call in dpdk fails DPDK PMD (like pcap) for some reason did not implement mtu for interface. Try to use system call if rte_eth_dev_get_mtu() fails to get mtu. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 856eed17319df0876ff9c6a87b782cc2e2eddb7b Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Jun 3 15:13:54 2015 +0300 dpdk: implement port close Implement port close and remove code to not init already inited ports. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> [Zoltan Kiss: fix checkpatch issues] Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 026b5d196165669d36faa69014dea3129b1ef7e0 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Jun 3 13:50:21 2015 +0300 dpdk: pktio: set missing handle schedule() needs proper id set to call pkin_poll(). Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit db2af0cf1c48278015ebfab2faa08a2c8617e9ef Merge: d369df66 a6d1ce8e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Jun 9 18:37:42 2015 +0100 Merge git://git.linaro.org/lng/odp Interim merge to cherry-pick patches, and solve sync problem between the two repo. commit d369df66acc7c9d8d06653d81df337ff049af52c Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Tue Jun 2 17:56:47 2015 +0100 linux-dpdk: packet: add support for packet segmentation Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 004d26315cfe93456a22311d078b1271590445ea Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Tue Jun 2 17:55:07 2015 +0100 linux-dpdk: packet: restructure metadata handling Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ee8b74e1731bc4b38430205d18be2378bcb8739c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jun 1 18:42:33 2015 +0100 packet_io: change default tx_free_thresh This value performs better with odp_l2fwd and OVS over 10Gb links. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 1a8df254e18bb50dbd835729bc3d01fcb87ebc6b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Jun 1 18:31:51 2015 +0100 packet_io: change TX completion Originally we flushed the completed buffers from the current interface before calling receive, but buffers are often held in other queues. Instead we check if receive was unsuccessful and the attached pool doesn't have any buffers for receiving. In that case we go through the list of all pktio interfaces (first the current), and try to flush out completed descriptors until we get something. rte_mempool_available() is based on rte_mempool_count(), but it only count the main ring and the current thread's cache, because the others are not interesting for us. This method doesn't scale very well when there are a lot of interfaces, and/or they change very often. We need to refactor the underlying pktio infrastructure first to enable fast iteration through the list of existing interfaces. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit afd376bf0ac0b0eb16159c0004fc06b90f47325c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed May 27 17:58:24 2015 +0100 scripts: return proper error when build has failed Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 69389f839da0ba662aa287d2992a2308e02cb75c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed May 27 17:55:14 2015 +0100 pool: handle if RTE_MEMPOOL_CACHE_MAX_SIZE == 0 DPDK allows disabling object cache by setting this define to 0 (or less). However that causes division by zero in our algorithm to calculate the cache size. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9fcfc658fd57af60d3402bacb17c118eb8c6c8bc Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 21 19:05:21 2015 +0100 scripts: run pktio_env before tests Create a symlink for the linux-generic version, and make the devbuild script able to pass parameters to the unit tests, and detect if the interfaces are ready. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 811eef3dbbdf8a4b7043fa8ab3079497121a0f66 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 21 18:32:14 2015 +0100 pktio: further syncup with linux-generic Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e135a1242c31bb53420e78ed3b763ce16fcb5dfa Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 21 18:17:33 2015 +0100 pktio: implement loopback send/recv Copied from linux-generic, the only difference is that _odp_packet_parse() takes odp_packet_hdr_t * here. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 634cb1b30fe0524cef6d1cf9b4ecb2225e2f4cf0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 21 18:12:25 2015 +0100 buffer: init next pointer and use the right alloc function - odp_buf_to_hdr(buffer)->next were not initialized - odp_buffer_alloc() should call odp_packet_alloc() for packets Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e170717b7a02406c372bca3b21d54c2cdfdabe2e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 21 18:35:54 2015 +0100 scripts: add devbuild.sh This script is a handy example for developers to automate local build and testing. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> commit 7978583a81f35fa7030c49fe45fb696ea1ed2029 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed May 20 19:13:44 2015 +0100 dpdk: do not segfault in odp_queue_destroy() Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5bff0e376141da4256e3ac6a82ed63fae72fc17c Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed May 20 19:13:15 2015 +0100 dpdk: do not open pktio without pool Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9ecbc368dfbde090ab703253eb660db2c7a7cd74 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed May 20 19:09:16 2015 +0100 dpdk: align _INVALID types 9778d012 "buffer: redefine ODP_BUFFER_INVALID for linux-dpdk" forgot to change the other relevant invalid value definitions: ODP_EVENT_INVALID ODP_PACKET_INVALID ODP_PACKET_SEG_INVALID This patch copies the linux-generic definitions and overwrites these values. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit b8051fdcf3f2de0f065c5613519fa6f2d261dbe2 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed May 20 19:04:14 2015 +0100 pool: remove unnecessary function definitions We don't use linux-generic's packet_socket implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit d7804c50ddc70f5c0adabf977dc5940b487a186e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed May 20 19:01:58 2015 +0100 pool: assert that pool name sizes are the same Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 0de5c1b7c8a0e8114ce22b28f9b431240c9ffcb0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed May 20 18:58:17 2015 +0100 pool: release DPDK pool name during pool destroy This way at least we can reuse the name. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit a4fa99b7377c39e455fc70c9e924548eb0c5f963 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Tue May 19 18:13:10 2015 +0100 dpdk: make some pktio tests pass Sync code with linux-generic and make following tests pass. Promiscuous and mac just return 0 from dpdk calls and odp test fails with pcap PMD. That has to work with real devices.: {"pktio open", test_odp_pktio_open}, {"pktio lookup", test_odp_pktio_lookup}, {"pktio close", test_odp_pktio_close}, {"pktio inq", test_odp_pktio_inq}, {"pktio outq", test_odp_pktio_outq}, {"pktio mtu", test_odp_pktio_mtu}, {"pktio promisc mode", test_odp_pktio_promisc}, {"pktio mac", test_odp_pktio_mac}, Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6c480108993202edaa333d0e29095a8fad5f5bc5 Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon May 18 19:36:14 2015 +0100 dpdk: README: fix DPDK config section Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> [Zoltan: use uppercase "Intel"] commit ee28b8ef7d22af3640484fbf4ba1211d3611a339 Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon May 18 19:35:07 2015 +0100 dpdk: README: add extra info Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> [Zoltan: use uppercase "Intel"] commit 5a0f1ce68e6b49e05c4a377e2f1ed8a10cb0ed64 Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon May 18 19:19:09 2015 +0100 dpdk: README: rework section on binding to DPDK Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit adf7480a0cd9c63aff5a3c0e656fe8390575aec0 Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon May 18 19:12:35 2015 +0100 dpdk: README: rephrase and correct Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> [Zoltan: fixed a few minor grammar mistakes] commit 1d411efa6813a1584a84273e4a174e6f5478963a Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon May 18 19:03:03 2015 +0100 dpdk: README: emphasize on document sections Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3d6abd09c13cfa12eaee57622336424c5d68a6aa Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon May 18 19:00:58 2015 +0100 dpdk: README: reorganize document sections Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e3a993e7ffb85ef84d5857132844198563b78350 Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon May 18 19:00:28 2015 +0100 dpdk: README: add some new lines Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit cf8b678b4112f649e11723164c5063a49a17e374 Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon May 18 18:59:45 2015 +0100 dpdk: README: remove comment style formatting Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit aa10b6324a91e18925ef9ff035b80b8dcb037a8c Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Mon May 18 17:39:47 2015 +0100 linux-dpdk: pool: add needed unlock to CHECK_U16_OVERFLOW Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e411bbb1be0d2a9cecfad21ecdff8e4d6fbb6afa Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon May 18 17:34:42 2015 +0100 packet: implement user metadata It will be right after odp_packet_hdr_t, before the actual buffer. The accessor functions are inlined for faster access. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> commit 3f2e8076cc67210406bedb53ec172a4b0e0e710e Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Fri May 15 15:21:23 2015 +0100 linux-dpdk: pool: initialize buf_hdr->handle.handle for queue use Adds init support for the buffer handle in the buf_hdr, which was the key missing piece needed to make ODP queues work. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b58733eef7766c42a2dc8bd0874966a2bd694f84 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Tue May 12 18:31:04 2015 +0100 linux-dpdk: packet: enable lazy parsing Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> [Zoltan Kiss: added the hunk to delete old _odp_packet_parse definition from the previous patch] commit dca9ed36a0523b03af3975a1abe1c672121dcc25 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Tue May 12 18:26:03 2015 +0100 linux-dpdk: packet: restructure for lazy parsing linux-dpdk: packet: restructure for lazy parsing Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> [Zoltan Kiss: move the hunk to delete old _odp_packet_parse definition to the next patch] commit a3152b660a0ec16ce6e2c05df5b12b95fc46b0dc Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 15 14:16:26 2015 +0100 dpdk: fix makefile with new include files Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 62a7588156cd363570ae89da44e04e0ab614630d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 15 14:02:56 2015 +0100 example: disable classifier example until we have an implementation for it Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2c3c0c247c53816a114e58f81776753a7013892c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 15 13:52:46 2015 +0100 packet: temporary skeletons for metadata functions A proper implementation should come later. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 763475591e8ea61129aaeae3ef35180391d80d30 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 15 13:38:01 2015 +0100 Port "linux-generic: use arch optimisations for time" Original commit hash: be57a99721 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 98dde7f00a4189a620b63a707882527b73d27d97 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 15 13:35:31 2015 +0100 Port "linux-generic: odp_linux: migrate helpers to helper dir" Original commit hash: dce6428f27 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4e8ad2eb04385ebfe5d55f0f7f52185feb4b55ce Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 15 13:23:53 2015 +0100 Add missing header files This is used by linux-generic/odp_timer.c and crypto.c Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9dff4fea7015e1418547d89a617ee05b77aac63c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 15 13:20:09 2015 +0100 packet: remove linux-generic packet_socket implementation It is only used by linux-generic packet_io. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit cc2f6b776ad000fbf374826f8e60f87d794f89d0 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Fri May 15 13:06:15 2015 +0100 linux-dpdk: pktio: adjustments to work with latest linux-generic code Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7b9ecb586207fd51f3a181c4e60d7835d2bafb00 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 15 13:05:28 2015 +0100 Port "api: packet: removed odp_packet_user_u64" Original commit hash: 349ad0c567 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 33d3fc41f384b2f7780e228d3cfb9129733336a1 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 15 12:14:33 2015 +0100 Align to "linux-generic: debug_internal: assert prints condition" Commit hash: 39998ff4 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit dc6ce994f3f40e4a0edfa291126ff41d97a5f585 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri May 15 12:10:26 2015 +0100 Backport "linux-generic: support running with restricted cpu set" Commit hash: 03caea94 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7e05193a18ecd58e8832299e643c35230989a3fb Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Fri May 8 13:37:02 2015 +0300 update version number from v1.0.4 to v1.1.0.0 Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit b57c288a483ef94ef60fbabd6f2da55db8f897cc Author: Anders Roxell <anders.roxell@linaro.org> Date: Mon May 11 15:25:58 2015 +0200 platform/Makefile.inc: fix path to git_hash.sh When building from a separate builddir: parallel-tests: installing './test-driver' + autoconf /bin/bash: ../../scripts/git_hash.sh: No such file or directory Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit beb3d56189b56fe10e11a7f90656ea918423b489 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Fri May 8 14:31:56 2015 -0500 linux-generic: remove extraneous ASSERTs No need to check that odp_packet_hdr_t is 64 bit aligned because it's part of odp_packet_hdr_stride which is cache aligned. This assert fails in case of arm 64-32, so just remove it from code. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 1de9b5efcf811d666c6405b9464763eaa77eab5b Author: Jerin Jacob <jerin.jacob@caviumnetworks.com> Date: Mon Apr 27 21:49:04 2015 +0530 example: timer: remove global variables to share the data between workers use the odp_shared_memory allocater instead of global variables to enable the timer example to run on baremetal/linux process execution environments Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 1d9a27f7bf8e138dec003d150b63addabf76bfbf Author: Mike Holmes <mike.holmes@linaro.org> Date: Thu May 7 08:38:06 2015 -0400 linux-generic/odp_impl: add implementation version details Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit ce86df1391bdc0461173768078e55fc38a441329 Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Tue May 5 16:30:52 2015 +0300 style: moved pool type first in pool_param Type + union highlights the usage better than union + type. Less packed structure is likely not an issue, since pools are few. 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> commit ef93fe9ac9699215291cbf62991e5ce9fbe860d6 Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Tue May 5 16:30:51 2015 +0300 style: pool_param doxygen comments Moved comments into separate lines for better readability (more chars per line). 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> commit 2162d875c16fcec818912e0bec172e900d8d0e99 Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Tue May 5 16:30:50 2015 +0300 api: packet: removed odp_packet_user_u64 Simplified the API by removing user_u64 option. User has now room for a pointer (or upto intptr_t sized variable) and a configurable sized user_area. Both can be used at the same time. User has to use the user_area when more space than sizeof(intptr_t) bytes is needed. 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> commit 126f710258a76a34c37aca98c5cfe0fd8d018cc0 Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Tue May 5 16:30:49 2015 +0300 api: packet: rename user_data to user_area Term "area" highlights better that the per packet user area is fixed in size and position. E.g. odp_packet_data(), odp_packet_seg_data() return pointers which are (likely) modified during packet processing. 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> commit 7c072de2b818ae028569e41b16c8502d887429cf Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Thu Apr 2 16:21:59 2015 +0100 linux-generic: support running with restricted cpu set odp_cpu_count() returns the number of online CPUs, but when running in a control group access may be restricted to only a subset of these. This combined with a lack of error handling in odph_linux_pthread_create() means a number of the applications create more threads than there are cores available to them, leading to deadlocks in odp_barrier_wait(). Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit db175f8d9e4b0fa3198936083426dcab570b9d20 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu Apr 23 13:36:59 2015 -0700 api: pktio: Clarify doc on default pool usage on odp_pktio_open Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 644cc172ff460b7c511a17d4f618122810736310 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Fri Apr 10 10:52:18 2015 -0500 validation: packet: add user metadata tests Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-and-tested-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit daee2ddabd5894111fa6d332bfe18e49d123ff9b Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Fri Apr 10 10:52:17 2015 -0500 linux-generic: packet: add user metadata support Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-and-tested-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit de16caac8719b2dcf08676ba4d0ad71e05064047 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Fri Apr 10 10:52:16 2015 -0500 linux-generic: pool: add user metadata support Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-and-tested-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 303e2ec23a876d497af7ce81f969d3ef274a670b Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Fri Apr 10 10:52:15 2015 -0500 linux-generic: buffer: restructure user mdatadata fields Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-and-tested-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 8101e86e16f85c880b8b79cb85fd8f40233cdcbb Author: Jerin Jacob <jerin.jacob@caviumnetworks.com> Date: Mon Apr 20 16:22:15 2015 +0530 timer: Add missing platform handles to u64 conversion functions Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit e83b931579741407c225706b87120642b9cc55ce Author: Balasubramanian Manoharan <bala.manoharan@linaro.org> Date: Fri Apr 10 15:56:31 2015 +0530 api/linux-generic/example/validation: remove odp_pmr_create_range() function definition This is combined commit of 4 following mailing list patches: linux-generic: classification: remove odp_pmr_create_range() function implementation. This patch removes the implementation of odp_pmr_create_range() function. Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> api: classification: remove odp_pmr_create_range() function definition. The support for a range based packet matching rule is not available in most of the hardwares and hence this API is removed. Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> validation: remove test case for odp_pmr_create_range() function This patch removes the validation suite test case for odp_pmr_create_range() function. Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> example: classifier: remove odp_pmr_create_range() support This patch removes support for odp_pmr_create_range() function in the classifier example application. Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 9e35c0e373501ee7430e51923348d5df76e23c06 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu Mar 26 11:07:11 2015 -0500 api: packet: relax return code to use non-zero for true This change addresses Bug https://bugs.linaro.org/show_bug.cgi?id=1334 Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 77dfaacd6ad88c1b565224bc3dfcbf1f6f2c2309 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu Mar 26 11:57:05 2015 -0500 api: packet/pool: proposed APIs for packet user metadata Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit f547a372d44fd8602e07aecb23ffdaf3068cf165 Author: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Date: Wed May 6 10:04:43 2015 +0200 linux-generic: use inttypes defines to print (u)int32_t values Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit a9d0e393329aa2d3ba8be9b6600fedd479c7bc33 Author: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Date: Wed May 6 11:10:46 2015 +0200 test: pktio: add missing atomic init Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit f72ae32d8fa8bd5d2bd869ee122cd36defb24984 Author: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Date: Tue May 5 09:24:49 2015 +0200 test: use CU_ASSERT_FATAL in case odp_buffer_alloc failed to avoid segfaults Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 6fed22f67b590a1298a550749b40507326f4ea34 Author: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Date: Thu Apr 30 11:40:51 2015 +0300 validation: pktio: fix polling tests Some tests poll input queues for packets but the queues are setup as scheduled. Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 2c5a1d551351182b47c8c1341c633896c1afabe9 Author: Christophe Milard <christophe.milard@linaro.org> Date: Tue May 5 17:49:08 2015 +0200 validation: tests for module odp_ver_abt_log_dbg Created directory for module odp_ver_abt_log_dbg, populated with file odp_errno.c and odp_system.c which, despite its confusing name is not testing the system module but the sys* function of the odp_ver_abt_log_dbg module. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 7da2690a499e95805536a0d7b3fadf64255f97c5 Author: Christophe Milard <christophe.milard@linaro.org> Date: Tue May 5 17:49:07 2015 +0200 validation: rename executable to match modules Just the executables whose contents already matched a module have been renamed. Module names are taken from doxygens defgroup, with the exepection of pktio, as of Maxims requirement. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 744e51162a9f6b9d7f5686c15dfaa2771533b72b Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Apr 29 20:22:49 2015 +0300 update version number from v1.0.3 to v1.0.4 Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 5883b9683feeda8b01e1c9996088b9b95a394dea Author: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Date: Fri Apr 24 15:09:18 2015 +0200 api: time: force time defines as ULL to avoid computation overflows on 32bits systems For example the odp_timer validation tests computes 10 * ODP_TIME_SEC and stores it into an uint64_t, but the computation overflows on 32b systems and the test fails. Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 9c3717e12552b3d60a7100f14ff8e5bf9408ec0a Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Mon Apr 27 17:48:41 2015 +0100 performance: pktio: fix check for pktio_tx A typo in the error check means we don't correctly guard against failing to open the transmit pktio (when not using a loopback interface). Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit ddf21d74880fe31916ef00e6eff2a01edda4a71b Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Mon Apr 27 17:48:02 2015 +0100 performance: pktio: test return value of odp_pktio_close() Coverity complains that the return value of odp_pktio_close() isn't being checked. This fixes https://bugs.linaro.org/show_bug.cgi?id=1513 Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit b362573b74ddb6e2939d83acd773d72c571f3425 Author: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Date: Fri Apr 24 15:53:33 2015 +0200 validation: synchronizers: fix init of custom barrier atomic Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 555dbec24fd3dc4909b33189c5f3f24a82e283cf Author: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Date: Fri Apr 24 15:53:22 2015 +0200 linux-generic: packet_io: init l2 and l3 cos table spinlocks Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 24fc060ca075fd9e04d64d3e53d508ee893ca4a4 Author: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Date: Fri Apr 24 15:53:17 2015 +0200 test: classification: add missing init of atomic variable Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 61450e23fcc1b56bc9ecf841e8c8d45c5eaa84a2 Author: Mike Holmes <mike.holmes@linaro.org> Date: Mon Apr 27 14:59:36 2015 -0400 perfromance: .gitignore: add odp_pktio_perf Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 4963dd2d820005e48f91b78e6caaed45d91a9d63 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Thu Apr 23 16:46:57 2015 +0100 validation: pktio: don't pass invalid handles Behaviour is undefined if an API is passed an invalid handle, so don't test it. Fixes https://bugs.linaro.org/show_bug.cgi?id=1375 Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit e644ce4e7812946d7175d7452f02058d534e5de7 Author: Balasubramanian Manoharan <bala.manoharan@linaro.org> Date: Thu Apr 23 16:07:41 2015 +0530 example: ODP classifier example ODP Classifier example This programs gets pmr rules as command-line parameter and configures the classification engine in the system. This initial version supports the following * ODP_PMR_SIP_ADDR pmr term * PMR term MATCH and RANGE type * Multiple PMR rule can be set on a single pktio interface with different queues associated to each PMR rule * Automatically configures a default queue and provides statistics for the same * Prints statistics interms of the number of packets dispatched to each queue Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 07833034064c1b2be38fea3f2a1bc2dff8965ecc Author: Ola Liljedahl <ola.liljedahl@linaro.org> Date: Mon Apr 20 14:32:30 2015 +0200 example: timer: clean up prescheduled events Fixes https://bugs.linaro.org/show_bug.cgi?id=1450 Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 0dc56b4050068bfccb8e4f958138eaf4933bce27 Author: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Date: Wed Apr 22 10:01:19 2015 +0200 linux-generic: pool: initialize atomics during odp_pool_init_global Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 81e272871043bfc4d5f3f40ed5aa1b17978bf992 Author: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Date: Wed Apr 22 16:17:11 2015 +0200 validation: use PRIu32 instead of %u to print uint32_t variables Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 9abad7f099e5c23ccb26c1042ef64bc80f04a644 Author: Mike Holmes <mike.holmes@linaro.org> Date: Mon Apr 20 15:55:34 2015 -0400 example: doxygen: remove examples from src path If the examples are on the src path they pollute the documentation with their own declarations. The correct mechanism is to declare the examples to be seen in the documentation in one location that is on the .dox path, and have the EXAMPLE_PATH locate the actual example code. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 40b28bb012bf0f3fbbb1d5d198f05ace910fbebd Author: Mike Holmes <mike.holmes@linaro.org> Date: Tue Apr 21 17:26:44 2015 -0400 validation: thread: add odp_thread sunnyday tests Add test cases for APIs in the logical ODP THREAD grouping Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Christophe Milard <christophe.milard@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit dde7ed021b42be2ac3daea2b8f8c982c0e3cc3f3 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Wed Apr 15 10:39:14 2015 +0100 performance: pktio: add throughput test A self-contained throughput test using the loop interface. A number of transmit and receive workers are run on separate cores, the transmitters generate packets at a defined rate and the receivers consume them. Each test iteration runs for a fixed period, at the end of the iteration it is verified that the number of packets transmitted was as expected and that all transmitted packets were received. It's also possible to specify an alternative loopback device or a pair of connected devices via the command line. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit ee2eba6f231830539ca6d571d9cb8ba159c7518b Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Apr 22 13:12:59 2015 -0400 doc: api_guide_lines: add guidance on ODP_DEPRECATED Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 042b3ff7271d81809478d479224b4155d5113cc8 Author: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Date: Wed Apr 22 10:01:32 2015 +0200 linux-generic: pool: fix initialization of odp_buffer_hdr ref_count Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit b1e20c71bb50a1b8806d4d2c5da95f4bdb397d7e Author: Mike Holmes <mike.holmes@linaro.org> Date: Tue Apr 14 15:59:41 2015 -0400 api_test: remove odp_shm_test The shm test is obsolte, remove it Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 74a3c4dd428c878c085f1eea74fd709ebf08f552 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Fri Apr 17 18:16:42 2015 +0300 update version number from v1.0.2 to v1.0.3 Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 8914536bbb4060f37275b6d494957bf096bafc20 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Fri Apr 10 07:32:50 2015 -0500 linux-generic: pool: fix missing increment of blkallocs stat Fixes Bug https://bugs.linaro.org/show_bug.cgi?id=1455 Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 0c669854c057a111bfe3fb91f4788146775ff0ed Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Apr 15 13:50:47 2015 -0400 doc: doxygen.cfg: removed reference to l2fwd l2fwd is no longer an example Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 8a741f952fe5fc698b9747ae32b11045e90c251f Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Apr 15 14:25:22 2015 -0400 linux-generic: odp_linux: migrate helpers to helper dir The odph helper src files do not belong in linux-generic, move them out to the helper directory. From the helper directory they may be more cleanly extended to support other execution environments beyond Linux. Clean up checkpatch whitespace warning in the migrated code. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit f42930a55162065b295958443278c01449ef17ad Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Apr 15 13:52:28 2015 -0400 helper: doxygen: group packet headers logically The headers are all closely related but do not appear that way in the documentation, gather them together Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 1f7e60647e4dad303469706eac9594b7e8a03bdc Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Apr 15 13:52:27 2015 -0400 helper: doxygen: eth fix break in rendered doc The period signals to doxygen to add a line break, remove it Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 39c80ed6f675a5d0306fbc738610b410025cc89b Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Apr 15 13:52:26 2015 -0400 helper: doxygen: icmp convert to c comments The code level comments describing the groupings were polluting the real defintions seen in the final output Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit d7f375ed76653ea681fb4ee03d3f100566f810d1 Author: Ola Liljedahl <ola.liljedahl@linaro.org> Date: Mon Apr 13 22:58:29 2015 +0200 linux-generic: timer: check for zero timer resolution Fail to create timer pool with zero timer resolution. https://bugs.linaro.org/show_bug.cgi?id=1451 Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 90831db7175c5d67b9b849c0e2dc6d110bc0be28 Author: Mike Holmes <mike.holmes@linaro.org> Date: Fri Apr 10 16:35:18 2015 -0400 doc: odpdoxygen.css: clean up style Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit b86b2835a90c0f1abf54872e28074705932fadb4 Author: Mike Holmes <mike.holmes@linaro.org> Date: Fri Apr 10 16:35:17 2015 -0400 doc: doxygen.cfg: add platform to title Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit a343f1f52fd7f5bf8ac2d0be501b5e9bbdb7717d Author: Mike Holmes <mike.holmes@linaro.org> Date: Tue Apr 7 13:27:03 2015 -0400 scripts: odp_check: remove astyle ODP has not adopted a style that can be universally applied with a tool such as astyle. Remove astyle leaving only the cleanup for whitespace and checkpatch elements for checking src files before a patch is created. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit cbb4fd0c0e8bae0af6e83f3e1b596a29d525a57e Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Apr 8 21:22:16 2015 +0300 validation: add new test l2fwd_run Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-tested-by: Mike Holmes <Mike.holmes@linaro.org> commit a451558313108956d1a03936729b8bf02da21514 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Apr 8 21:22:15 2015 +0300 validation: sched: add missing copyright Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-tested-by: Mike Holmes <Mike.holmes@linaro.org> commit 33e330c7eb17b1d453cdb46c645289ede4284626 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Apr 8 21:22:14 2015 +0300 validation: move l2fwd from example to performance tests Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-tested-by: Mike Holmes <Mike.holmes@linaro.org> commit 4a4e6c49763b295b36783f1dd1b17dafa193d2d7 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Apr 8 21:22:13 2015 +0300 validation: implement platform env Different platforms need different steps to set up pktio for testing. That might be veth devices for linux-generic, kernel modules and extended set up for dpdk and simple set pktio testing names for other platforms. This patch implements platform/test/pktio_env file which sets up global envs for pktio. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-tested-by: Mike Holmes <Mike.holmes@linaro.org> commit 78c8ff19270a6107461ec7b85efa3616b8abdadd Author: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Date: Fri Apr 10 09:33:46 2015 +0300 examples: odp_ipsec: runtime select multiple vs single deq Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Reviewed-by: Robbie King <robking@cisco.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 9f1c337919eca8f32aab83880c54ad7d33e28e8c Author: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Date: Wed Apr 8 09:28:16 2015 +0300 examples: odp_ipsec: runtime select scheduled vs poll queues Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Reviewed-by: Robbie King <robking@cisco.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit fc29357a5b390a9eed10111cdc8c5f21ff07c163 Author: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Date: Wed Apr 8 09:27:50 2015 +0300 examples: odp_ipsec: handle alloc_pkt_ctx failure Application should continue in case a packet context cannot be allocated. Signed-off-by: Alexandru Badicioiu <alexandru.badicioiu@linaro.org> Reviewed-by: Robbie King <robking@cisco.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 0ace139f353dbc3e773289621a3aa52f253b790e Author: Mike Holmes <mike.holmes@linaro.org> Date: Mon Apr 6 15:34:59 2015 -0400 linux-generic: use arch optimisations for time Switch to using configure time optimizations from compile time Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 87f6f204131f66da63c5ce5936a171039fe0ae13 Author: Mike Holmes <mike.holmes@linaro.org> Date: Mon Apr 6 15:34:58 2015 -0400 configure: add ARCH optimisation support by directory Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 44d09c2c2cd0f330083fd3a5b0db6e16b76665f5 Author: Taras Kondratiuk <taras.kondratiuk@linaro.org> Date: Wed Mar 18 17:40:21 2015 +0200 validation: crypto: combine sync and async tests Sync and Async crypto tests are almost identical and have a lot duplicated code. Move unique configuration into testsuite's init function and reuse Async test code for both Sync and Async. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Robert King <robking@cisco.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit b6ea1f0734808036518f6bfeb8e6424039f68bcd Author: Taras Kondratiuk <taras.kondratiuk@linaro.org> Date: Wed Mar 18 17:40:20 2015 +0200 validation: crypto: handle synchronous operations in async test Current API can't force crypto operation to be strictly sync or async. Hence test should handle synchronous operation even if 'pref_mode' is set to ODP_CRYPTO_ASYNC. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Robert King <robking@cisco.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 4b65a7cec1bd9bc8b8b80cddac1bccd7e64677ce Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Apr 1 18:29:53 2015 -0400 linux-generic: system_info: use global data struct Don't store ODP global data in multiple locations, gather global data into odp_global_data. Move the static odp_system_info into odp_global_data. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit e7bcaf5c4e7078dfd89dbef3aa768797793102b7 Author: Anders Roxell <anders.roxell@linaro.org> Date: Wed Apr 1 22:45:52 2015 +0200 test: enable valgrind check Valgrind will enable memcheck, drd and sgcheck by default Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit b47af7fe2488a88b406288d5b9c269587cf81af8 Author: Anders Roxell <anders.roxell@linaro.org> Date: Wed Apr 1 22:45:51 2015 +0200 m4: add plumbing for valgrind check Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 0b626e098cf6fc87f42129ce649fa9d0ab2297eb Author: Anders Roxell <anders.roxell@linaro.org> Date: Wed Apr 1 22:45:50 2015 +0200 test/README: explain what's the intention with test/validation Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 28e9ad635e0a0be0d35b14ee54166c4dbc4b85c6 Author: Anders Roxell <anders.roxell@linaro.org> Date: Wed Apr 1 22:45:49 2015 +0200 test/README: add copyright header Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 8a67d9892e8044c196194befa539c22d09b4f709 Author: Mike Holmes <mike.holmes@linaro.org> Date: Mon Apr 6 07:54:01 2015 -0400 validation: classification: un-checked return Fixes CID 89196 Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 073952f16ad48aa5ccd73e0f217659f76abc5a4d Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Thu Apr 2 12:07:40 2015 +0100 validation: pktio: support arbitrary length packets Rework the way test packets are generated in order to allow generating and verifying arbitrary length packets. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 8f52e363292369c369fe5bee28c82f5f00f57eb6 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Thu Apr 2 12:07:39 2015 +0100 validation: pktio: fix memory corruption A magic number, used to ensure jumbo frames are transmitted and received in full, is written to the end of a packet buffer at a fixed offset of 9170 bytes. However for non-jumbo tests this is way beyond the end of the allocated buffer. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 83336d0df9d10e3c254e44ad17c4267d6c735510 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Thu Apr 2 12:11:56 2015 +0100 linux-generic: pool: check for NULL params before dereference Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 540aaa27990bcf56614da1f5ddc968211057ee60 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Thu Apr 2 17:49:20 2015 +0100 linux-generic: pktio: fix SEGV after odp_pktio_inq_remdef() Calling odp_pktio_inq_remdef() causes the pktio's inq_default to be set to ODP_QUEUE_INVALID, but when the scheduler later polls the pktio it fails to check the validity of inq_default and ends up passing a bogus pointer to queue_enq_multi(). Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 97eb3fe4373856cd4443c97f70853a670ded1ed8 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Thu Apr 2 18:21:08 2015 +0100 validation: common: catch odp_term_local/global failures Failures in odp_term_local() or odp_term_global() are an indication that the test did not correctly clean up after itself so should cause the test to fail. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 1ec371b4d930c2324b56d9207ccdbc4b70c98ad0 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Thu Apr 2 18:21:07 2015 +0100 validation: common: print odp_init failures to stderr Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 2ecfd1a00f0e91f029db96a69e9f3dbe3d8227c0 Author: Mike Holmes <mike.holmes@linaro.org> Date: Thu Mar 26 12:43:26 2015 -0400 linux-generic: timer: convert assert to ODP_ASSERT ODP implementations should not call assert directly. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 0e0a2f6e1f6cc329be886edf554ea04d5b346df9 Author: Mike Holmes <mike.holmes@linaro.org> Date: Thu Mar 26 12:43:25 2015 -0400 linux-generic: debug_internal: assert prints condition Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit c20cba8e50d53132ed3fe8b758c78cdb0fa764df Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Thu Mar 26 11:14:05 2015 +0200 validation: schedule: exit schedule loop Added function to pause and exit the schedule loop according to the API. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit d001c29b5ad023df54f97ce761866087794874f4 Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Thu Mar 26 11:14:04 2015 +0200 validation: schedule: added queue destroy test The test creates one queue of each schedule sync type and destroys those. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 3d0fa27e313f03ea965d376230f452e3e8f151b8 Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Thu Mar 26 11:14:03 2015 +0200 linux-generic: schedule: terminate Added clean up for pending schedule commands and queue destroys. Added error detection of non empty queues and pre-scheduled events. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 31d4279373ae325fa078a66d19dae5f67a9d0695 Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Thu Mar 26 11:14:02 2015 +0200 linux-generic: scheduler: restructured queue and pktio integration Scheduler runs by polling scheduler priority queues for schedule commands. There are two types of scheduler commands: queue dequeue and packet input poll. Packet input is polled directly when a poll command is received. From schduler point of view, the default packet input queue is like any other queue. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 95d2f00b22905a75fde5935e6e428b7fc64e1591 Author: Mike Holmes <mike.holmes@linaro.org> Date: Fri Mar 20 15:08:41 2015 -0400 README: Update content and links The 3rd party application repo is not supported and the architecture document is stale, in addition the ability to run the tests is now part of the build system. Make these updates to the document. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit ad8851d6725a697d141d70c5650199ef46d0ad93 Author: Ola Liljedahl <ola.liljedahl@linaro.org> Date: Tue Mar 3 17:19:30 2015 +0100 example: odp_generator: use odp_timer Use ODP timer facility instead of POSIX sleep/nanosleep. https://bugs.linaro.org/show_bug.cgi?id=1025 Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 333f0b86f6480d1742189e0ae6083d59b999ce99 Author: Mike Holmes <mike.holmes@linaro.org> Date: Tue Mar 17 14:57:19 2015 -0400 doc: doxygen: add declaring variables Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit e41ff878b6e6f3d31d549ddb156a5cf34f62d48c Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Fri Mar 27 19:23:57 2015 +0300 update version number from v1.0.1 to v1.0.2 Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 744aa99d25a97aaae4499521f27321f5bb0680b9 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu Mar 26 11:07:46 2015 -0500 validation: packet: use non-zero as true indicator This change addresses Bug https://bugs.linaro.org/show_bug.cgi?id=1334 Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 3be08a35e2f2161ed19e4a36ba77800a44286625 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Fri Feb 27 15:21:55 2015 +0300 linux-generic: pktio check for NULL entry CID: 85427 https://bugs.linaro.org/show_bug.cgi?id=1175 get_pktio_entry() can return NULL entry then it can be derefenced inside is_free(entry). Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit e45a4b9417fba1d62ee5541e854941e9de2ade2c Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Mar 18 20:02:33 2015 -0400 linux-generic: linux: destroy used pthread attr Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 0047979b69807cf489158bb3a7f8f9f4841637cb Author: Balasubramanian Manoharan <bala.manoharan@linaro.org> Date: Thu Mar 26 19:00:31 2015 +0530 linux-generic: fix incorrect pmr_term_value update in odp_pmr_create_xxx() function Fix for incorrect pmr_term_value update in odp_pmr_create_match() and odp_pmr_create_range() functions. Fixes https://bugs.linaro.org/show_bug.cgi?id=1381 Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit efb0ed0179950a0c6a14d40097405f29fcaa2c23 Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Wed Mar 25 13:58:02 2015 +0200 example: generator: replace strtok_r with strtok and fix leaks The odp_ipsec example leaks some strings allocated during parse_args. https://bugs.linaro.org/show_bug.cgi?id=1117 CID 56899: Resource leak (RESOURCE_LEAK) Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 9a64badfc2aac8730cbd8da8453f76ffba7f1b46 Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Wed Mar 25 13:58:01 2015 +0200 example: odp_ipsec: replace strtok_r with strtok and fix leaks The odp_ipsec example leaks some strings allocated during parse_args. https://bugs.linaro.org/show_bug.cgi?id=1117 CID 56899: Resource leak (RESOURCE_LEAK) Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit faa82f2a861e079dd5379cb31206d6f55b8385ca Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Wed Mar 25 13:58:00 2015 +0200 example: odp_l2fwd: replace strtok_r with strtok and fix leaks The odp_l2fwd example leaks some strings allocated during parse_args. https://bugs.linaro.org/show_bug.cgi?id=1117 CID 56899: Resource leak (RESOURCE_LEAK) Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit e8b95a816b8bc1236ccbcab082d82dc2d37004f7 Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Mar 18 18:17:40 2015 -0400 linux-generic: linux: remove unused include assert.h Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit a6d797b6aa82bcc1557cd418c6e38455d2562976 Author: Ola Liljedahl <ola.liljedahl@linaro.org> Date: Mon Mar 23 21:56:26 2015 +0100 linux-generic: strongtypes: use named structs for C++ Typedefs to anonymous structs creates problems for C++ programs: GCC: warning: ‘odp_crypto_op_params’ has a field ‘odp_crypto_op_params::pkt’ whose type uses the anonymous namespace error: anonymous type with no linkage used to declare function ‘<anonymous struct>* ppp_packet::get_queue() const’ with linkage CLANG: extern odp_pool_t tmo_pool; warning: variable 'tmo_pool' has internal linkage but is not defined When linking: undefined reference to `tmo_pool' The solution is to add a (unique) name to all structs used by the strong typing typedefs. Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit ec0ccb5d20fb759a240e31431baa289b4325927d Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Tue Mar 24 18:11:45 2015 +0300 example: l2fwd print packets per second Current print in l2fwd is not useful with slow links and also it's hard to say how fast does it work. Print pps and packets drops. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-and-tested-by: Ciprian Barbu <ciprian.barbu@linaro.org> commit f7933840a019e5c7078917f3e4b4e0e1e49b7434 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Mon Mar 23 16:03:21 2015 +0300 validation: fix memory allocation in odp_synchronizers odp_synchronizers should not reverve memory with PROC flag, i.e. with requesting shared memory object. Without that fix there might be seg. faults if prior shared memory object was created with prior runs. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> commit ae577d57e6f43f47ebfef874f6a751ec94d76548 Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Mar 18 18:17:41 2015 -0400 linux-generic: packet_socket: remove unused include assert.h Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit b8491127f1bb8b09d85f1f28e4d77bba07d927c0 Author: Anders Roxell <anders.roxell@linaro.org> Date: Tue Mar 24 10:51:03 2015 +0100 gitignore: ignore TAGS gitignore when using ctags generated by make Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 18df34e33c58af0e0ce4700a61a6b548a2a581c5 Author: Jerin Jacob <jerin.jacob@caviumnetworks.com> Date: Wed Mar 18 19:41:36 2015 +0530 barrier: allow platform to override odp_barrier_t Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Bala Manoharan<bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit de10aaf2396d4bfa031bd6ec5d37138ae1393fda Author: Jerin Jacob <jerin.jacob@caviumnetworks.com> Date: Wed Mar 18 19:41:35 2015 +0530 ticketlock: allow platform to override odp_ticketlock_t Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Bala Manoharan<bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 77a550918cfe6a5cc50c4ccd6111921578ae442f Author: Jerin Jacob <jerin.jacob@caviumnetworks.com> Date: Wed Mar 18 19:41:34 2015 +0530 rwlock: allow platform to override odp_rwlock_t Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Bala Manoharan<bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 39e1c364a5acae5309ac2efc61111b8dbc66698a Author: Jerin Jacob <jerin.jacob@caviumnetworks.com> Date: Wed Mar 18 19:41:33 2015 +0530 spinlock: allow platform to override odp_spinlock_t Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Bala Manoharan<bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 31350d643ca70ba74f640743f00a7051f64331cc Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Fri Mar 20 11:34:22 2015 +0200 validation: schedule: free queues and pool With the implementation of termination APIs it is now necessarry to cleanup all allocated resources, queues and pool in this case. Fixes https://bugs.linaro.org/show_bug.cgi?id=1284 Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Tested-and-reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit d62c8f73ce54fbee25502baac0c5b0e94a561568 Author: Christophe Milard <christophe.milard@linaro.org> Date: Fri Mar 20 13:00:51 2015 +0100 validation: fixed memory leak in odp_cpumask.c CID 88273: Resource leaks (RESOURCE_LEAK) Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 67185e0b74df971e438dd002339f62b1cd247b4f Author: Mike Holmes <mike.holmes@linaro.org> Date: Fri Mar 20 14:19:38 2015 -0400 performance: odp_atomic: move atomic test from api_test to performance The api_test directory is being deleted, any test with value needs to migrate Moved this test to performance because it can be used to gauge the ability of the atomics to scale with core count. The move required that odp_atomic run all tests by default Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 2ec2ed247c1359da3c99141116f9ba3c0bebde5f Author: Mike Holmes <mike.holmes@linaro.org> Date: Thu Mar 19 14:20:09 2015 -0400 validation: timer: use unused attribute Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 6b7fdff459eb9105c0426db9434f08b17970ea1a Author: Mike Holmes <mike.holmes@linaro.org> Date: Thu Mar 19 14:20:08 2015 -0400 test: debug: add unused attribute MACRO Compiler attributes should be used to signify that an unused argument is intentionally unused Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 3407db09bbb3495d606d06ae3aec666076364c60 Author: Mike Holmes <mike.holmes@linaro.org> Date: Thu Mar 19 14:07:32 2015 -0400 test: debug: replace example with test The structures are part of the test hierarchy not example Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 0c50f6bff0a238e4bc5ceac61cd431f4875443aa Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Tue Mar 17 10:31:56 2015 +0000 performance: scheduling: add support for VPATH builds Pass the test executable path to the test script to avoid the assumption that they're both in the same directory. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 8ac2ecbb475ed70b5a48347dca7bf75f78e7c770 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Tue Mar 17 10:31:55 2015 +0000 performance: scheduling: catch exit codes odp_scheduling_run always exits with code 0 so "make check" will never report failures. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 498a10c6320ced07a699186312c49d322552ffb2 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Tue Mar 17 10:31:54 2015 +0000 validation: pktio: add support for VPATH builds Running "make check" in a VPATH build fails as the odp_pktio_run script incorrectly assumes that the odp_pktio binary is in the same directory. Resolve this by passing the path to the test binary to the script via the TESTS_ENVIRONMENT variable. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 07024e3199a0650e72a14b8ba54fed00a1ca6180 Author: Christophe Milard <christophe.milard@linaro.org> Date: Mon Mar 16 11:05:03 2015 +0100 validation: added odp_cpumask test Half sunny days tests for odp cpumask: At this point, odp_cpu_count() is used to get the number of cpus a odp_cpumask_t may contain. This returns probably a too conservative (small) number Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 7496c0e52ee77097e11e4ac673379dc820b9fa58 Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Mar 18 19:46:02 2015 -0400 validation: timer: free malloced memory clean up after calling malloc Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit f6b673fb8ff05580f1f7e94d66db3b8806fb9151 Author: Mike Holmes <mike.holmes@linaro.org> Date: Wed Mar 11 14:24:07 2015 -0400 doc: move api guidelines to API doc This documentation was moved from the architecture doc to this API doc. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 1225498adbebfba163d05322fb042c0485fcfe10 Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Fri Mar 6 16:30:44 2015 +0200 validation: timer: use ODP_SHM_NULL Use ODP_SHM_NULL to select default shm memory in odp_pool_create(), instead of ODP_SHM_INVALID. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed & Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 42898d963a61cbf300415e0c8208559108a1a8f6 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu Mar 12 16:36:46 2015 -0500 linux-generic: strongtypes: add dummy struct var to keep c++ happy C++ doesn't like null structs so add a dummy variable to make it happy. Note that we only use these types as pseudo-pointers for strong typing so the contents of what they apparently point to is irrelevant since we never reference it. https://bugs.linaro.org/show_bug.cgi?id=1267 Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 3e67d9c3028cbb4e45998c923460a2a1451b4dbf Author: Ola Liljedahl <ola.liljedahl@linaro.org> Date: Thu Mar 12 17:03:29 2015 +0100 validation: timer: added cancel test Add basic timer cancel test that checks that everything is OK when a timer is reset and then cancelled before expiration. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit d21ad790ce6ac071a1bafd33cc29ff68303bb891 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Mon Mar 16 13:58:01 2015 +0000 linux-generic: queue: fix potential queue leak If schedule buffer allocation fails during odp_queue_create(), a scheduled or pktin queue may be incorrectly left in an allocated state. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit be9fd23e6d4349347d9be48bbf42c008298a4f1f Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Mon Mar 16 12:27:43 2015 +0000 validation: pktio: prevent race when using veth pair There's a potential race condition whereby the test case could start running before the virtual ethernet interfaces are fully brought up. So replace the the arbitrary delay with a check for the interface's operational state before kicking off the test. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 0e6b7de5f74114b1deec98848238b695d81effaa Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Fri Mar 13 20:05:53 2015 +0300 update version number from v1.0.0 to v1.0.1 Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit f1856d6b09a5bb7aaf3f999ef50ca125eb4238af Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Wed Mar 11 15:13:43 2015 +0200 example: odp_ipsec: remove USE_MAC_ADDR_HACK Remove the old hack and switch to using the provided API This also fixes https://bugs.linaro.org/show_bug.cgi?id=1330 Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit e0ea627e7c4d237586894bbf7574ed80d7f875ed Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Fri Mar 6 13:00:54 2015 +0300 validation: pktio: disable arp on virtual interfaces Virtual interfaces for linux-generic tests do not have IP address. Arp discovery has to be turned off. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> commit ffee3892a3f4f790e483cd3f03c76ce030237323 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Mar 11 11:36:25 2015 +0300 validation: pktio check return code for pool_destroy Fix CID 88056 to check return code of pool_destroy. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> commit c5a6a425e83bc774328bcc3dff5a35a64134e599 Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Wed Mar 11 14:59:51 2015 +0200 validation: schedule: code clean up Cleaned up usage of buf count, thread args and globals. 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> commit 49127831eb8ae2a16860af1fcb39abce68d495b4 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Fri Mar 6 13:24:52 2015 +0000 linux-generic: only print errors to stderr The default logger prints all log levels to stderr. To make things easier when debugging failures change it to print only errors to stderr and everything else to stdout. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 0eea70fcff9531743f70e96f64109217e761f4c4 Author: Ola Liljedahl <ola.liljedahl@linaro.org> Date: Wed Mar 11 16:36:45 2015 +0100 linux-generic: odp_timer: set user_ptr for cancelled timeout Ensure that the timeout user_ptr and timer fields are set when the corresponding timer is immediately cancelled. https://bugs.linaro.org/show_bug.cgi?id=1313 Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit e1fe1f215daab00bee994dffeffd07d32324613d Author: Petri Savolainen <petri.savolainen@nokia.com> Date: Thu Mar 5 14:09:04 2015 +0200 validation: odp_scheduling: limit worker thread count The scheduling test launches a thread per cpu by default, which results several minute run time when system cpu count is high. Added a script for 'make check', which passes worker thread count as command line argument to the test. Test does now two runs: one with 1 thread and second with max 8 threads. 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> commit e7008f027d2a2b13fc9e0038ae0e3ea0f3468087 Author: Taras Kondratiuk <taras.kondratiuk@linaro.org> Date: Fri Mar 6 17:50:39 2015 +0200 linux-generic: linux: remove explicit buffer cache flush _odp_flush_caches() is called from odp_term_local() now. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit f8ca8fc615f9702ea579d34291a88f5afa579f3d Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Sun Mar 8 17:52:50 2015 -0500 validation: shm: add unit tests for strong type display functions Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 4eb585ab06b3765dc2f8a2d5491158dfe33249f0 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Sun Mar 8 17:52:49 2015 -0500 validation: pool: add unit tests for strong type display functions Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 6b1593bccbdaf74797f4a3663059468fdd0e76fb Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Sun Mar 8 17:52:48 2015 -0500 validation: pktio: add unit tests for strong type display functions Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit e05b86fc123d6633158ec17b29487c308b9cb21b Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Sun Mar 8 17:52:47 2015 -0500 validation: packet: add unit tests for strong type display functions Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit b626d72d4f6ab7e3f92e41d06dc113d4fdd07771 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Sun Mar 8 17:52:46 2015 -0500 validation: buffer: add unit tests for strong type display functions Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit c1129f750bd9c16b7cc08cc3ef820e01d95bc16d Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Sun Mar 8 17:52:45 2015 -0500 validation: crypto: add unit tests for strong type display functions Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit fa3b6819c4614e11823ca21ead621246c92f56ab Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Sun Mar 8 17:52:44 2015 -0500 validation: classification: add unit tests for strong type display functions Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit fef341532aac890b6af15b044a308c998ed29fd7 Author: Ola Liljedahl <ola.liljedahl@linaro.org> Date: Mon Mar 9 12:28:03 2015 +0100 validation: odp_timer: cleanup for clean termination Free queue and timeouts, destroy timeout pool before termination. https://bugs.linaro.org/show_bug.cgi?id=1285 Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 6dcf4a8da0156c921576f15a2efd2f6f475b5db4 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Fri Mar 6 15:24:54 2015 +0300 example: odp_packet uncomment polling queues odp_packet examples has polling queues commented out with if 1. Input queue (ODP_QUEUE_TYPE_PKTIN) is not attached to scheduler but it make sense in example show that packets can be accessed with polling queues also. https://bugs.linaro.org/show_bug.cgi?id=301 Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 9fbb092ecd1f910f6e8c3bf65bb70189448f742a Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Sun Mar 8 14:28:51 2015 +0300 linux-generic: mmap: jumbo frames support Support for jumbo frames for linux-generic with unsegmented buffers. Test for pkio is also adjusted to work with 9*1024=9216 bytes packets. https://bugs.linaro.org/show_bug.cgi?id=509 Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 453ccb2d641e1e862ec2c3f953cf2f1f538b90e2 Author: Mike Holmes <mike.holmes@linaro.org> Date: Fri Mar 6 15:30:36 2015 -0500 linux-generic: linux: remove unused define Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 01ab88f8d4b6d6215f5b126e4dc1600c55893ca3 Author: Taras Kondratiuk <taras.kondratiuk@linaro.org> Date: Fri Mar 6 17:48:23 2015 +0200 api: pool: move platform includes to linux-generic Do not include platform-specific header files from common API headers. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 9a28fb289b69fb9b1d06fc261447a1fc7901d738 Author: Taras Kondratiuk <taras.kondratiuk@linaro.org> Date: Wed Feb 25 11:30:21 2015 +0200 linux-generic: weak: move stdarg.h include from odp_debug_internal.h stdarg.h is not needed in odp_debug_internal.h, but instead should be included in odp_weak.c. The change is needed to be able to reuse odp_weak.c from other platforms. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 2bd578f5146523105f4a4c9ae5b4e94651aa3ec1 Author: Gary S. Robertson <gary.robertson@linaro.org> Date: Wed Mar 4 17:16:16 2015 -0600 replace deprecated _BSD_SOURCE with _DEFAULT_SOURCE Compilation of ODP v1.0 on OpenEmbedded failed due to the following warning being treated as an error: | In file included from /usr/include/stdlib.h:24:0, | from odp/example/ipsec/odp_ipsec.c:16: | /usr/include/features.h:148:3: | error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, | use _DEFAULT_SOURCE" [-Werror=cpp] | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, | use _DEFAULT_SOURCE" | ^ Modified the source 'example/ipsec/odp_ipsec.c' as recommended. Change-Id: I3b8fb392611ea3ad35d17a9492637f44d7ca5d2c Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 7f31e41eae768cd518b2566ff4cb1ba9738ac730 Author: Stuart Haslam <stuart.haslam@linaro.org> Date: Thu Mar 5 12:10:03 2015 +0000 validation: common: prevent masking test failures The addition of tests_global_term() inadvertently masked test failures by overwritting the value of ret. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 69b9f661a6d679c8a3b5174ea671bfe687d144df Author: Mike Holmes <mike.holmes@linaro.org> Date: Thu Mar 5 13:48:20 2015 -0500 validation: shm: abort on null pointer CU_ASSERT does not exit, use CU_ASSERT_FATAL to ensure the pointer is not used. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 7f32ebccf86dcb4f457282ed3411f2d45e1c09a2 Author: Petri Savolainen <petri.savolainen@linaro.org> Date: Mon Mar 2 16:45:00 2015 +0200 linux-generic: thread: reuse thread ids Scheduler validation test failed on a 28 thread machine since it creates and terminates many threads during a test run. Linux-generix implementation did not reuse thread IDs but run out of threads. Thread ids are protected with a lock and new alloc/free rutines reuse thread IDs. Fixes https://bugs.linaro.org/show_bug.cgi?id=1294 Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 7bd9768fb434f1714ae3d38ddf6ba1a4e6ca36c1 Author: Robbie King <robking@cisco.com> Date: Thu Feb 26 14:52:15 2015 -0500 validation: crypto: add packet free to sync test Signed-off-by: Robbie King <robking@cisco.com> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 78a6fb259adc0856f26ad30a3bbca2768001d2a7 Author: Robbie King <robking@cisco.com> Date: Thu Feb 26 14:52:14 2015 -0500 validation: crypto: add common test cleanup Destroy queue and pool before termination. https://bugs.linaro.org/show_bug.cgi?id=1282 Signed-off-by: Robbie King <robking@cisco.com> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 89e093dc684e53ef8d3c4e0056244b111b5a907a Author: Robbie King <robking@cisco.com> Date: Thu Feb 26 14:52:13 2015 -0500 validation: common: add support for test term Signed-off-by: Robbie King <robking@cisco.com> Tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 9163e328fc0faefcc4c2dfa1d24ca6b173335296 Author: Taras Kondratiuk <taras.kondratiuk@linaro.org> Date: Thu Feb 26 15:25:42 2015 +0200 validation: crypto: split crypto and random tests Crypto and Random are separate API modules now, so split tests accordingly. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-and-tested-by: Robbie King <robking@cisco.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 9f4a9b82398530bab80cb324a1098ab5d6f288ad Author: Balasubramanian Manoharan <bala.manoharan@linaro.org> Date: Fri Feb 27 19:45:51 2015 +0530 validation: classification: destroy pktio default inqueue during teardown Destroys pktio default inqueue for a clean odp_classification_term_global() Fixes https://bugs.linaro.org/show_bug.cgi?id=1281 Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 2352b3e8d738da156dca58942f27b859df945790 Author: Balasubramanian Manoharan <bala.manoharan@linaro.org> Date: Fri Feb 27 12:42:31 2015 +0530 validation: classification: pktio skip value set to zero odp_pktio_skip_set() value is reset to zero as the validation suite expects the skip value to be zero. Fixes https://bugs.linaro.org/show_bug.cgi?id=1230 Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> commit 5f53638a92006d2210bb9821f29ea0260a73b309 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Thu May 14 19:10:22 2015 +0100 packet: refactor packet alloc/free - call rte_pktmbuf_alloc/free directly, without buffer API - add debug message to odp_packet_reset along the way Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> [Zoltan Kiss: improved the commit name and message] Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0761735ae107f150de3ed4db8505d0da2f8af008 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Thu May 14 18:55:16 2015 +0100 init: print help from EAL Print help for EAL parameters if ODP_PLATFORM_PARAMS was not exported. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5801e630cdcfeb6c912652858945e7218911887f Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu May 14 18:47:59 2015 +0100 linux-dpdk: init: add missing init/term routines Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit da99a8f6c719e362a5da884b9f4c001cd1595c56 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu May 14 18:41:51 2015 +0100 linux-dpdk: packet: correct odp_packet_reset() usage Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 14e7c2125b3dd62dcb47380f57d48104b0b77b8b Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu May 14 18:37:32 2015 +0100 linux-dpdk: buffer: correct odp_buffer_is_valid() Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9778d01219ccbca69172a66448daa58aba63db82 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 14 18:33:21 2015 +0100 buffer: redefine ODP_BUFFER_INVALID for linux-dpdk The linux-generic value of 0xffffffff (a.k.a. 2^32-1) could be a valid pointer, and for this implementation odp_buffer_t is a pointer to the buffer itself. Copy the linux-generic file and change the definition. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5e39a3473b33223628bbeed8d11ee456c6c77787 Author: Bill Fischofer <bill.fischofer@linaro.org> Date: Thu May 14 16:34:45 2015 +0100 linux-dpdk: pool: add UNLOCK call to error paths And fixing a too long line around it. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5a69887c33467594a295ed482fbeb246e37b7f81 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 14 16:30:07 2015 +0100 pool: print DPDK error message in case of pool allocation failure Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a4b4a10694392c52a25714367245a5f886204504 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 14 16:26:50 2015 +0100 pool: Refactor cache_size algorithm This patch tries to find the greatest divisor of n, which is: - not itself - smaller or equal than RTE_MEMPOOL_CACHE_MAX_SIZE - cache_size * 1.5 smaller or equal than n The third point implies the first point, and the fact that it should be a divisor, implies the third point as well. That's why j starts at least from 2. There is an extra check after the calculation to make sure the value conforms the requirements. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit c92c580c0f3c8f3bdaf3c03b7a04d748bf18c79e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 7 19:21:50 2015 +0100 pool: fix debug messages - macro already prints function name - one debug message was printed as error - another one missed a newline Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 26022c9b229e31bd55540028a62662f890c78c25 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 7 19:20:53 2015 +0100 dpdk: delete a bunch of stale code Most of these are remainings of the old linux-generic implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 391cb244cbd4e75a569b41e96d72cc35e56da44c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 7 18:55:40 2015 +0100 packet: fix odp_packet_len, improve its documentation and offset calculation The pointer has to be dereferenced after converted to uint32_t. Also extend the documentation and improve offset calculation. Reported-by: Marko Kallio <marko.kallio@tieto.com> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3c0edd4744ff201051be7c119208c8a20e8dc9ef Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu May 7 18:52:45 2015 +0100 dpdk: add pcap to linked libraries We will need it for CI. In the future we should take the necessary list of libraries from DPDK automatically, and provide it to applications. So we won't link by default something we don't use. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6b14ef4fcd65c518104d76516cb9e387c6a450fb Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Thu May 7 18:49:18 2015 +0100 setup_pkt_dpdk: validate device name There is a test odp_pktio_open("notthere', ) which should return fail. If we use atoi() in that function we need to validate if dev name has only digits. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> [zoltan.kiss@linaro.org: improved the subject and message a bit] Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e713c0e531b57c55ad647bc5a9eb0ca7e96cd611 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Thu May 7 18:41:56 2015 +0100 setup_pkt_dpdk: return if error happened Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> [zoltan.kiss@linaro.org: improved the subject a bit] Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0dea4136e8df29fd072dd0db9a2859ca04cb6214 Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Thu May 7 18:24:20 2015 +0100 dpdk: configure: remove dependency on DPDK env vars The RTE_SDK and RTE_TARGET were required by configure but never actually used. Additionally odp already allows passing the path to SDK via configure argument --with-sdk-install-path Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d2e5a6ce49a2e48f24b12146c2ac2a604704e477 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Thu May 7 18:19:04 2015 +0100 init: fix typos in odp_init_dpdk Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9e41f167a8f44b74af6a1e1ffe00dc6d305ac8a4 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 30 18:12:36 2015 +0100 init: make sure GCC constuctors are linked Otherwise the linker would miss them as the app doesn't refer to anything in DPDK. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ac1789bfe9ceb6bbe04b6455f996680a20441813 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Thu Apr 30 14:35:52 2015 +0100 dpdk: try to find SDK in configure Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f3ba6cde38ff13fef9140462a9773c51f17bbfb1 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Thu Apr 30 14:34:32 2015 +0100 configure.ac: include configure.m4 if platform explicitly selected cherry-pick linux-generic commit: 920c3db configure script selects linux-generic as default platform and includes platfrom specific configure scripts: ./platform/linux-generic/m4/configure.m4 In case if --with-platfrom=linux-generic was provided to configure platform specific file is not included and that branch of code does not run. This change has to be done for each platform since we have there pktio_env scripts but m4_include macro does not recognize bash variables. So that there is if check. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-and-tested-by: Mike Holmes <Mike.holmes@linaro.org> commit f0af7fba275f6dd18274416fb2c5443b1f0b02f0 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Apr 29 18:50:50 2015 +0100 dpdk: implement ODP_PLATFORM_PARAMS env Implement ODP_PLATFORM_PARAMS environment arg with dpdk uses as advanced information for rte_eal_init() call. Use case example: export ODP_PLATFORM_PARAMS="-n 4 --vdev eth_pcap0,iface=veth1 -- -p 3" Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 494e0822ac8a5e09bb051586130419b48e43f5c2 Author: Maxim Uvarov <maxim.uvarov@linaro.org> Date: Wed Apr 29 18:50:06 2015 +0100 dpdk: howto debug DPDK app without hardware Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8ce796fefb7b2c08b8798e5afcf453e670ef0f02 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Apr 28 19:10:42 2015 +0100 buffer: make sure we avoid scatter-gather related bugs This part of DPDK code is buggy, make an assertion until we upgrade to a fixed version of DPDK. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> commit 6c633ac8c3df9c437223fd067bc1fb73c10e5914 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Apr 28 17:49:31 2015 +0100 packet_io: use one queue per device Set up the devices with only one queue when opened. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 380aca44b7f0d836a53c7127774c58557e50f797 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Apr 24 20:46:59 2015 +0100 init: implement termination functions This is based on linux-generic, with a few changes: - no classification termination, obviously - this implementation doesn't have term for pool and pktio - odp_term_global waits for the DPDK threads at the end Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b747f1190338b93631fddd826ea48b31df6f3ce7 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Apr 24 20:45:19 2015 +0100 validation: comment out classification tests We don't have a working implementation, but with this line CI is not able to run the other tests. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c6d144981539e98fb57d074555a5fc0ef8592a49 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 23 20:10:12 2015 +0100 queue: delete current implementation and use linux-generic This one is just an old copy of linux-generic, let's use the current one. Later we can start off our own version if necessary. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 1ce215ee93c320273a0e61c77675c4298cd04c99 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 23 18:40:42 2015 +0100 packet: print debug info with default logger Although DPKD will still print its output to stdout. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit df701a032847bbce7f58713c237a0c3001d774a5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 23 18:25:59 2015 +0100 packet: implement odp_packet_add/rem_data Based on the linux-generic implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3d15173910838683b24a0c26ded856a11f0e7695 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 23 18:14:04 2015 +0100 packet: implement odp_packet_copydata_in Based on the linux-generic implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d64ef4d1ff60c9863d91ee4f339d7ce09dc05702 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 23 17:17:52 2015 +0100 packet: implement odp_packet_copydata_out Based on the linux-generic implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit dc71eff43913bede7ba55fabe9a74841d683f2df Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 23 17:09:23 2015 +0100 packet: implement odp_packet_copy And two related functions. This is based on linux-generic implementation, performance could be improved in the future, e.g. it's using odp_packet_offset to get the offset for every segment, which unnecessarily iterates through all the segments from the beginning, every time. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4beb4e0cfac769e96f3f7aab277f7064be5d1423 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 23 17:03:13 2015 +0100 packet: remove old implementation of odp_packet_copy Otherwise the next patch would like quite unreadable. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 27fd1ca18269407ecdc9216295d7dffb865171b1 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 23 12:50:32 2015 +0100 packet: implement segment accessors Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f1ceb2cd70c308478b43745f45eb9cbc21e737e8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Apr 22 16:54:33 2015 +0100 packet: make sure the packet buffer is aligned to cache line rte_mbuf is already aligned, odp_packet_hdr_t is right between it and the head of the buffer. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e856aa58da68ed6c76f6abed54772947b602f62e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Apr 22 16:30:49 2015 +0100 pktio: remove send_pkt_dpdk() Apart from calling rte_eth_tx_burst the only thing it does is to copy the pkt_table[] array into an another one. As far as I can determine DPDK doesn't touch this array of pointers, so it's not necessary to copy it. I've merged the rest of it into odp_pktio_send() Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b580725696bd2ce2cca2279e336160a2887dcb9e Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Apr 21 19:10:11 2015 +0100 packet: fix up L2/L3/L4 offset handling - return the pointer to the correct segment - refactor duplicate code into a common function - fix offset setting error check - set the offset to their default value during packet receive Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7f499d3c034b686834c979add2b99903a0a4d6de Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Apr 21 18:03:18 2015 +0100 packet: sync up user metadata accessors to linux-generic Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6f454ea25c56ed37963fdaf7ac3a1ff1e4ec8097 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Apr 17 14:29:32 2015 +0100 packet: implement odp_packet_pool() and odp_packet_input() For odp_packet_input() pktio has to be adjusted as well to store the odp_pktio_t in the pool structure. A few header file dependencies are also fixed. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 654890f132ce220e661d100c6297c9469e4f96e9 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Apr 17 12:03:47 2015 +0100 packet: implement missing pointers and lengths accessors According to the relevan section of include/odp/api/packet.h. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 9ae10a5e9d8867532af4ab3e87af21874ed6bbb3 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 16 21:32:20 2015 +0100 timer: enable linux-generic implementation Actually it just needed a new implementation of odp_hdr_to_buf() to be in an own odp_buffer_inlines.h, and an extra include. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 83569ad1ccccf7b584c7288fc02493ab425cf579 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 16 18:40:38 2015 +0100 packet: fix odp_packet_reset - set the data length from the parameter - check that parameter - and the return value during allocation as well - use headroom as well - memset only the header, not the whole packet - reset rte_mbuf and rte_pktmbuf values as well for each segment Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5c0a2b6d0893e09908a8695cc09964f88f4b47f9 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 16 16:37:58 2015 +0100 pool: initial implementation of odp_pool_destroy DPDK doesn't support pool destroy at the moment. Instead we should improve odp_pool_create() to try to reuse pools. See this thread: http://thread.gmane.org/gmane.comp.networking.dpdk.devel/16498 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit afc919408d5990745e5ea373c8394f8df36a83e8 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 16 16:03:37 2015 +0100 pool: associate raw and timeout buffers with RTE_MBUF_CTRL type Packet buffers remain the same. Save the ODP type as well. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 97a22cbc86d87b9ec113113386a29604bdcb812b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 16 16:35:25 2015 +0100 pool: update alloc and free to handle control buffer type Also translate the error scenario correctly Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4b0d5c6b497095f48ec003b47930b08b0382c5ff Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 16 16:22:35 2015 +0100 pool: copy pool parameter handling from linux-generic These changes are almost the same as with linux-generic, except that we make sure the headroom for packets is at leas RTE_PKTMBUF_HEADROOM. Debug logs are updated accordingly, and timeout type is no longer unimplemented. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c9300cdeb0a8c8d7a5da8c5659712f5d97a720c3 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 16 18:25:11 2015 +0100 packet: check ODP head and tailroom config conforms with DPDK ODP_CONFIG_PACKET_HEADROOM is a minimum, we should check that it's smaller or equal to RTE_PKTMBUF_HEADROOM. ODP_CONFIG_PACKET_TAILROOM has to be 0, DPDK doesn't explicitly support mandating tailroom size for received packets. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 28481d628f701a7deb5190c27002862502ab6552 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Apr 14 19:04:52 2015 +0100 pool: print a debug message if valid shm parameter is passed in odp_pool_create Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ec69a55d90c72d1be4d3cdadfec07318049cbbb2 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Apr 14 18:54:17 2015 +0100 pool: save pool_hdl into DPDK private areas and implement odp_buffer_pool Save the pool handle to pool and buffer metadata areas so we can return it in odp_buffer_pool. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 22f5abee037fc3fffc73de83e839550325f99d8c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Apr 14 18:43:00 2015 +0100 buffer: return the ODP buffer type instead of DPDK one That's what the callers expect. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 39afd3d75951f07ed8221904fa17885a72e14b5a Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 16 16:29:39 2015 +0100 pool: calculate cache size before pool creation According to the DPDK API, this value must be equal or smaller than RTE_MEMPOOL_CACHE_MAX_SIZE. Also, it is recommended to be a divisor of the number of elements. This algorithm tries to find the greatest divisor which is smaller than the max allowed, if there isn't any, the max is used. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e7db08bea0dec50bf5b6e4ac73876383429466d2 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Apr 16 17:01:40 2015 +0100 pool: minor code style fix Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0ddf8e9ba1abe37454316b044132ff3293548d54 Author: Mike Holmes <mike.holmes@linaro.org> Date: Thu Mar 19 16:01:27 2015 -0400 linux-dpdk: init: add terminate functions Re-use the stubs that were used to develop linux-generic Changed the return behaviour to be a fault Original commit was 5c7aed2c Signed-off-by: Mike Holmes <mike.holmes@linaro.org> commit fc10967f00ebc024b99d25748c9ea55d543932d7 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 18 18:10:19 2015 +0000 pool: code style fix Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 1a48d8bbd088f10dd8c24c58da9e9f15b09c5ced Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 18 18:06:05 2015 +0000 Revert "pool: made buffer pool create unimplemented" This reverts commit 3925e6a28da232eecc9a82cf8fdf61847d6b4896. Conflicts: platform/linux-dpdk/odp_pool.c Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5c62d247304a434055bd7188755761f906d9cf2f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 18 18:51:04 2015 +0000 pool: fix debug messages Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 38c9e41e4f1aa5ec08e8540c3f8836ec213b7212 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 18 18:47:38 2015 +0000 pool: use "num" in odp_pool_create To store the number of buffers requested. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit eab92ec6d03da61e9e1a4eedac667138600cd1f0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 18 18:43:18 2015 +0000 pool: fix pool type names and sizes Also add an overflow check, and make the timeout type implementation unimplemented for the time being. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit dd71ca594c816edec8035447c0363d7a27ffde36 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Wed Mar 18 18:07:19 2015 +0000 pool: remove ODP_BUFFER_TYPE_ANY This is no longer a valid type. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2eb86c4d0b62b05736a964c9c8de847463d3445d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Mon Mar 16 17:45:56 2015 +0000 ODP-DPDK: Fix code style changes Ran checkpatch on platform/linux-dpdk to fix up some accumulated code style problems, mostly indentation. This patch doesn't contain any functional changes. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit 476869544712df7b670742a81636727ab66e0713 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 04:55:45 2015 +0530 TEMPORARILY removed timer from examples Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 99a299c77d83587f94d8a19e99f28be1b9f85948 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 04:54:24 2015 +0530 Fix undefined reference to _odp_buffer_type_set Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit cbaed9cf6c9aae8a686f5b45b0560c18eb7f6e7b Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 04:50:47 2015 +0530 Fix undefined reference to odp_pool_destroy - This function is currently unimplemented Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 429f4df06bd6f209cf11172f5de7f68d6b6a1a3c Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 04:43:01 2015 +0530 Fix undefined reference to odp_queue_destroy - It internally implements, queue_enq_dummy queue_enq_multi_dummy and queue_deq_multi_destroy Port of 72011097 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit cfc6686e6d8d9084fb8acaa48fc600b4daa8d230 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 04:32:56 2015 +0530 Fix undefined reference to odp_buffer_from_event & odp_buffer_to_event Port of d9a7f995 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 7d6f4e4553429c2de41162584a5eec53a4c89152 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 04:26:59 2015 +0530 Fix undefined reference to odp_global_data variable Port of b776ca47, de37ffa4, 6c0c7f72 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit f4d5c66960a26540f200bd10cb040957ecf69895 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 04:24:04 2015 +0530 Fix undefined reference to odph_linux_cpumask_default Port of 5e47a0cf Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit f6fd452fe30759e56ed46c5c55f7689f9d24e30c Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 04:21:23 2015 +0530 Fix undefined reference to odp_packet_to_event Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 8a0e1c9dc208676531f26286b80ebf5d88ec2d45 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 04:18:21 2015 +0530 Fix undefined reference to odp_packet_from_event Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 3f95efc9211f10b57fb84f86bd0bc4beb4c39ac1 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 04:16:13 2015 +0530 Fix undefined reference to odp_pktio_lookup - currently this function is unimplemented Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 93b117e02892951b4ca4ab6c710daebd53d2daf5 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Sun Mar 15 03:22:43 2015 +0530 dpdk: Taken odp_packet_io_queue.h from linux-generic which is needed by libodp.a Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 08dd964cc31de0041a27bd4e2b633692545d7e1d Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 03:59:23 2015 +0530 dpdk: disabled timer for now from odp-dpdk Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 644cd961e029b776cb0443ae9885c46db12c8880 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 03:35:44 2015 +0530 queue: odp_queue_deq use events instead of buffers Port of d3066cb4 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 136857821a5ff2e226e51383b618c4f4d7ded8da Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 03:34:29 2015 +0530 queue: odp_queue_deq_multi use events instead of buffers Port of e822279e Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 6e48d461a82c8d067d660b2e3e780311edca7282 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 03:32:31 2015 +0530 queue: odp_queue_enq use events instead of buffers Port of a49b7b64 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 3d6f543190c50b19c09c9825e366037525294cf3 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 03:30:22 2015 +0530 queue: odp_queue_enq_multi use events instead of buffers Port of 37514635 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 58cff2094ff87c7bdc0a39cc1e7a2b41c3e37e83 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 03:21:14 2015 +0530 pool: copy entire params instead of taking one by one Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 2b8d4f9692d1ab27a7af9a73385d12cfb624f715 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 03:15:56 2015 +0530 pool: rename buffer pool functions and params odp_buffer_pool_print -> odp_pool_print odp_buffer_pool_info -> odp_pool_info odp_buffer_pool_info_t -> odp_pool_info_t Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 7b3420221fe1698634e7a3a0812231f68a29d0e9 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 03:03:47 2015 +0530 pool: get_pool_entry fix for integer from pointer without a cast - Modify the parameter from pool_id to pool_hdl - get the pool_id using pool_hdl_to_index Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 77fe665bc8b6ce8f691db81bf3dc307add1f1186 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 02:49:35 2015 +0530 pool: rename buffer_pool functions and defines odp_buffer_pool_create -> odp_pool_create odp_buffer_pool_lookup -> odp_pool_lookup ODP_BUFFER_POOL_INVALID -> ODP_POOL_INVALID Port of 939a0233 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 592ba62b590a02ad16de95902b507dca8129f17e Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 02:43:21 2015 +0530 pool: made buffer pool create unimplemented - along with odp_buffer_pool_create the dpdk constructors were also commented out and kept in #if 0, as it will be useful in future while implementing it. Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit def4031946de987d3660c4d9eb7e010f2c556d39 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 02:33:18 2015 +0530 pool: Fix pool_hdl - Added pool_hdl to pool_entry_s - Added new function pool_index_to_handle Port of 939a0233 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit cbeaf9a7664bfe1b66d847e092996ebd0ebf163a Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 02:24:19 2015 +0530 pool: Fix comparison between pointer and integer error Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 342c266124574578f8960a64e0bd65cb0fb8d4fd Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 02:01:05 2015 +0530 api: odp_packet_io.h: use int for size of pkt_tables - resolve conflicting types for odp_pktio_recv() odp_pktio_send() odp_pktio_mac_addr() Port of 8da5fbd8 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit d7f53e7b179c8b0e8b94a019d855d0234897d232 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 01:53:45 2015 +0530 Fix compilation error in odp_packet_io.c Port of 08c99fac Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 5dbfcf169d25957810a9cb5a6a9f099083ed1e2e Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 01:22:01 2015 +0530 packet: renamed odp_buffer_type to _odp_buffer_type - Added odp_packet_to_buffer for pkt_src to get the buffer from packet. Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 131c8350cd9b465f03b5ef139db1a17141cfc222 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 01:12:16 2015 +0530 pktio: add strong typing support - Fixes the compilation error due to introduction of strong typing. Port of a2fdaa2e Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 27969ed8bc5eef0ec2feeefba94661dcde73cd6a Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 00:47:59 2015 +0530 packet: renamed odp_packet_to_buffer to _odp_packet_to_buffer - Added prototype of _odp_packet_to_buffer Port of f01afe33 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit ce880154b7769a8bf02dd8cbcc7780683c35b8bc Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 00:44:14 2015 +0530 packet: Moved the location of odp_packet_to_buffer - odp_packet_free is referring to this and couldn't find it, as this was defined below Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit ccb0c978dcefc86715c9b3107a5cbfec07978308 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 00:42:14 2015 +0530 packet: renamed odp_packet_from_buffer to _odp_packet_from_buffer - Added prototype of _odp_packet_from_buffer Port of cdf09e88 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 42cc5a3adea81cfce89273497434a69503c70987 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 00:39:15 2015 +0530 packet: Moved the location of odp_packet_from_buffer - odp_packet_alloc is referring to this and couldn't find it, as the function was defined below. Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 28c09aba790554e4beef47273511f42b2dc95d3f Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 00:26:51 2015 +0530 packet: rename ODP_BUFFER_TYPE_PACKET to ODP_POOL_PACKET Port of 8d0f8982 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit e4de29068b9de6ae8f2ad501f92c578ad562503a Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 00:20:55 2015 +0530 packet: rename buf_type to type in pool params Port of 8d0f8982 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit bac9ef1da4f556f8716934aac292db25ebe4fa1a Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Mar 12 00:04:23 2015 +0530 linux: Fix up odph_linux_pthread_create - Instead of getting the num of cores and first core from user, get the cpumask and start pthreads from active cpu's - start_args_t comes from thread_tbl now. - free memory allocated for start_args in odph_linux_pthread_join. - Fix indentation in odph_linux_pthread_join. Port of 38e36ef1 and a8626029 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit f39a1fdd1eee956f33311fbf8cde4126bb3381b6 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 23:49:00 2015 +0530 helper: linux: use cpumask in linux thread/proc - Fix conflicting types for odph_linux_pthread_create and odph_linux_process_fork_n Port of 38e36ef1 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 9bde6797da6932fb99e12ffc325ca499732557ea Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 23:33:28 2015 +0530 Removed odp_start_args_t from odp_linux.c - This structure is moved into odp/helper/linux.h Port of a8626029 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 3c7b18027e1cc0fb524536ebe997345e64b77787 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 23:14:17 2015 +0530 pool: Rename odp_buffer_pool_init_global to odp_pool_init_global - Fix up a debug print from "Buffer pool init" to "Pool init" - Fix shared mem pool name from "odp_buffer_pools" to " odp_pools" Port of 5bc5e072 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 63f6fc085a38ac1fd8824272234a1f7666e8a82a Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 23:07:04 2015 +0530 api: cpu: odp_sys_core_count() is obsoleted. Getting cpu count using odp_cpu_count - odp_linux.c doesn't need header file odp/api/cpu.h, as this is internally included from odp/helper/linux.h Port of 4feec768 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit a4409d24b2f1ba2349bd6e5e5a562288e354818f Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 22:58:11 2015 +0530 ipsec: Fix missing prototype of _odp_buffer_type_set Port of 2448f405 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 0387e8fdb8edb15e0bdaca90cb2558081f268509 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 22:55:15 2015 +0530 api: packet: Fix missing prototype of _odp_packet_copy_md_to_packet Port of 84077081 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit db413f1840fbd7a0068b0895d985f444cb0b5fa5 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 22:44:07 2015 +0530 api: buffer: Removed odp_buffer_type Removed odp_buffer_type() from API and made it internal. Port of 00a584d6 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit c4a38fa471909a42cd323e84dc4db85c8f3e643d Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 22:40:12 2015 +0530 api: buffer: Change buffer size from size_t to uint32_t Port of 7458d46c Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 9717acc46571aa002ab780933777d2c968be9458 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 10 19:30:48 2015 +0000 pool: Fix pool accessors broken by strong typing changes Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 810b9cef134db6149e5f3d6b62dd99549224dee0 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 22:28:11 2015 +0530 pool: Rename odp_buffer_pool_param_t to odp_pool_param_t Ported from 8d0f8982 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 54a941d32cdc121582bb5f06af6b52ba9fd3e047 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 22:26:08 2015 +0530 pool: Rename ODP_BUFFER_POOL_NAME_LEN to ODP_POOL_NAME_LEN Ported from 8d0f8982 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 6c4b22c1c268b468dbe9016e4ca6664a4972c345 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 10 19:30:46 2015 +0000 pool: fix lock header file path odp_ticketlock.h -> odp/ticketlock.h odp_spinlock.h -> odp/spinlock.h Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 64cab9759444b3bc070c163d68258045589eba67 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 22:15:04 2015 +0530 api: pool: Rename odp_buffer_pool_ to odp_pool_ Ported from 939a0233 Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit b000aca4fe35485770a5862eaee9ca4344d8a6f6 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 10 19:30:44 2015 +0000 api: config: Renamed ODP_CONFIG_BUFFER_POOLS Ported from 3ef9ca82 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 9450d67bb137ba9c9e23ef5c64714ee03d3190fe Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 10 19:30:43 2015 +0000 buffer: Remove old assert Ported from 1ddfc9a9a1a Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 0de5d31de388410587c72a7db1fa3bc15e27c484 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 10 19:30:42 2015 +0000 buffer: ODP_CONFIG_PACKET_BUF_LEN_MIN renamed To ODP_CONFIG_PACKET_SEG_LEN_MIN. Ported from 1460be05 Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 1c8a3d18c406aebcb8ba5e70f34d9f8ef20589a4 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Wed Mar 11 21:38:38 2015 +0530 Changed compilation flag to -std=gnu99 from -std=c99 - This change is required because DPDK library uses typeof, asm keywords which is not part of c99. Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Acked-by: Zoltan Kiss <zoltan.kiss.org> commit 31fa47948342d7382563ec6ae2ba59cf120ede53 Author: Mike Holmes <mike.holmes@linaro.org> Date: Sat Mar 7 22:47:41 2015 -0500 configure.ac: build linux-dpdk by default Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-and-tested-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit 9a29c9544c19061a7c6d0bcf1716e9c25d65b2fd Author: Mike Holmes <mike.holmes@linaro.org> Date: Sat Mar 7 22:47:40 2015 -0500 linux-dpdk: m4: add configure.m4 When reusing linux-generic atomic.h, use of the built support is checked at configure time, until the odp-dpdk implementation uses the dpdk defined http://dpdk.org/doc/api/rte__atomic_8h.html it should do the same. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit 0bb5f377e380fce106c0715f3299938c7933a50b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 3 19:39:38 2015 +0000 DPDK: Follow up the header renamings and moves - api/odp_*.h -> odp/*.h - odp and odp/plat in linux-generic/include - odph_*.h -> odp/helper/*.h - coremask -> cpumask - new api impementations from linux-generic: errno, event, version Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit 06ec9ee467a1ed19fe82ad09671f1098c666a5c5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 3 19:39:37 2015 +0000 api: sync up packet.h to the current frame Copied the content of the empty linux-generic header file and copied the inline definitions to the right place. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit b1c0da7b0491b7b78e2312a361c0169ff62fc1af Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 3 19:39:36 2015 +0000 DPDK: delete old header overwrites odp_debug.h: we don't have that static assert anymore which made this unnecessary odp_packet.h: there is odp/packet.h, see previous commit odp_platform_types.h: we needed this to use unsigned long instead of uint32_t for buffer and packet handle. Strong typing made that unnecessary. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit ead5ee0a9de38f35a9e0245b2c565df037de5700 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Tue Mar 3 19:39:35 2015 +0000 DPDK: rename files Make the buffer_pool -> pool naming change and odp_packet_inlines.h becomes the base of packet.h Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit a2229f4160d10ce1e232ed65da3158f72b04b2a1 Merge: bee3aa08 49bc9ee8 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Mon Mar 2 16:37:12 2015 +0530 Diff between ODP 0.6 to 1.0 Merge ../odp into WIP commit bee3aa08a5808691439e42fac8136f6eb16f6f79 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Fri Feb 27 19:20:01 2015 +0000 packet_io: Implement odp_pktio_mtu Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit 8ba4a34b9614ea7c75d64d1782e1d04703abfe8b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Feb 27 19:20:00 2015 +0000 packet_dpdk: Fixing up setup_pkt_dpdk - fixing debug messages - generate socket_id properly - enable multicast and promiscuous mode by default Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit b65a3f78ccb717377a72f7d39c3bd627bf798f7d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Feb 27 19:19:59 2015 +0000 packet_dpdk: Adjust default port config for OVS-DPDK This is copying the config of the OVS-DPDK implementation. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a46bfdeb08e00b9bfbcf69b43dcdc77d6d797f0b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Feb 27 19:19:58 2015 +0000 packet: Implement odp_packet_push_tail Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4d3b55f5ca355425ab7bdde6eb52868716df329b Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Feb 27 19:19:57 2015 +0000 packet: check offset in odp_packet_l2_offset_set Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e573bc9ec22a7253f5d79e1d3ac061c6122e8f5d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Feb 27 19:19:56 2015 +0000 buffer_pool: Fix buffer pool functions Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit baffb3822d193e798fef436cf241912d1738f505 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Feb 27 19:19:55 2015 +0000 buffer: fix buffer helper functions Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ab956936015804564f1b83db257a62e69c107d64 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Fri Feb 27 19:19:54 2015 +0000 packet_dpdk: Increase MAX_PKT_BURST Somehow OVS needs this. We should check on this later to figure out why. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit cbd0f513c66e69e5d7c8669e4aa823c082a3a40c Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Fri Feb 27 15:31:59 2015 +0530 Changes to compile odp-dpdk Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit 28f444498e5f54a79d4d1b4f7e6094b23f185331 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:37 2015 +0000 packet: Add skeletons with ODP_UNIMPLEMENTED Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 011dff3f449af99b31f7e56cdde332bfba189f8a Author: Zoltan Kiss <zoltan.kiss@schaman.hu> Date: Thu Feb 26 18:25:36 2015 +0000 DPDK: Add required headers and remove some stale includes Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 66cd0d3c0d4f0aad4ba2c7640d976f22a7ca5f66 Author: Zoltan Kiss <zoltan.kiss@schaman.hu> Date: Thu Feb 26 18:25:35 2015 +0000 packet: Trivial compile fixes plus remove SCTP Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5312f8620f92a1daf0ad06ba5886d13194586ad3 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Feb 26 18:25:34 2015 +0000 linux: Error check in odph_linux_pthread_create Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit bca6c60f2644e3b52e718246ac1840f45e247b2e Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Feb 26 18:25:33 2015 +0000 init: Trivial compile fixes Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit bb7e919bab7770a714908ef7fc53ef539f456ffe Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Feb 26 18:25:32 2015 +0000 buffer: Fix logging and variable access in odp_buffer_snprint Also sync the definition to the header Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 79b6b651ed69e802ea7daf51708ec9b8b2899e61 Author: Zoltan Kiss <zoltan.kiss@schaman.hu> Date: Thu Feb 26 18:25:31 2015 +0000 Makefile: Prevent the linux-generic odp_buffer_inlines.h to be included linux-generic/odp_timer.c includes it but we don't actually need it and it only causes trouble Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0116343f423f0fd5e83b1b14de7514d7faf124f1 Author: Zoltan Kiss <zoltan.kiss@schaman.hu> Date: Thu Feb 26 18:25:30 2015 +0000 api: Use our own platform type definitions We only need it to define odp_buffer_t and odp_packet_t as unsigned longs, so it will be compatible with both 32 and 64 bit archs. Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0c9164ee5fa8bb52943e766378e708f870c476ea Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:29 2015 +0000 api: Make odp_packet_len inline This function is in some very hot paths, often called for every packet. Simply the overhead of the function call could be quite big, inlineing can provide up to 10% performance gain. Unfortunately we can't show in the API the internals, so at compile time we calculate the offset for the packet length. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6b100a64246c8519e5b0af44047bd344e286c1d9 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:28 2015 +0000 api: Sync up odp_packet.h with linux-generic 0.6 The two headers become identical at this point. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit e3a79fca57acbe2c3609d168a2edab1ede4401eb Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:27 2015 +0000 DPDK API: Delete duplicate API header files and add new files from linux-generic This patch pull headers from the linux-generic API directory and delete their duplicate. It also removes odp_schedule.c from linux-dpdk, as it is mostly duplicate, and adds the following new files from linux-generic: odp_classification.h odp_impl.c odp_version.h odp_weak.c Note, there is no implementation for the classification API yet. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ffd49d004ed74563b1bc6d96faadf94bdcf65428 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Thu Feb 26 18:25:26 2015 +0000 API: promisc mode manipulation functions Porting commit from linux-generic (22ea) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6d0f99cbcd2e7d1f34848ff0697e483bd4f2b76c Author: Zoltan Kiss <zoltan.kiss@schaman.hu> Date: Thu Feb 26 18:25:25 2015 +0000 Makefile misses icmp and ipsec helper files Porting commit from linux-generic (a69a) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 262683f39f22e2d77024f5d8b76555ba6ec76b79 Author: Zoltan Kiss <zoltan.kiss@schaman.hu> Date: Thu Feb 26 18:25:24 2015 +0000 pktio: add MTU manipulation functions Porting commit from linux-generic (553a) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 6ac327a9f259ae4fafbe126610dc552f9dd52273 Author: Zoltan Kiss <zoltan.kiss@schaman.hu> Date: Thu Feb 26 18:25:23 2015 +0000 API: pktio: mac addr get function Porting commit from linux-generic (52e1) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c8572d902761f000ef08044a74cc70fba5993b7a Author: Zoltan Kiss <zoltan.kiss@schaman.hu> Date: Thu Feb 26 18:25:22 2015 +0000 Added process mode to example app Porting commit from linux-generic (d988) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a17f0df2a50f1c2638ae066d84613b9b1c09c403 Author: Zoltan Kiss <zoltan.kiss@schaman.hu> Date: Thu Feb 26 18:25:21 2015 +0000 api: buffer: add pool info query Porting commit from linux-generic (28e8) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c88d0c1b05a10e433c49917a94b08267cb451231 Author: Zoltan Kiss <zoltan.kiss@schaman.hu> Date: Thu Feb 26 18:25:20 2015 +0000 api: rename ODP_STATIC_ASSERT to _ODP_STATIC_ASSERT Porting commit from linux-generic (eda0) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d3c24e7cf1f6b4767950552f3e34dac712aad6a9 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:19 2015 +0000 api: pktio: remove odp_pktio_get_input() and odp_pktio_set_input() Porting commit from linux-generic (d24e) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 96fe76291f8fb543bf0b2c6263cd4a1b5657d83f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:18 2015 +0000 api: packet: add segmentation and copy API Porting commit from linux-generic (f2804) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3f9cbe14e4bcdaa23de8b202284dac71691b1aa0 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:17 2015 +0000 api: packet: add head/tail room manipulation Porting commit from linux-generic (543fd) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5e11da01db2f0a80e668c0edde2dba11f8975451 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:16 2015 +0000 api: packet: user context Porting commit from linux-generic (2624) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d8cda5cdeab779c145d286a76bd0c6cbef339686 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:15 2015 +0000 api: packet: change layer offset/pointer API Porting commit from linux-generic (df8a) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 4c168e94772864d5d500848955c865644d94d637 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:14 2015 +0000 api: packet: change alloc/free Porting commit from linux-generic (a834) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 2c9c2a442af9098d70c973fe5ec76af4e46cb7fd Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:13 2015 +0000 api: packet: move helper functions to public API Porting commit from linux-generic (8822) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d99aaccd02b96110c8b7ab8135a30895ff4e2af2 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:12 2015 +0000 api: rename ODP_STATIC_ASSERT to _ODP_STATIC_ASSERT Porting commit from linux-generic (eda0) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit a5218c24f4621f18c13672e097d7b6dac4a0ba7f Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:11 2015 +0000 api: buffer: change pool create Porting commit from linux-generic (0d93) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 52eedfc75acf5369da7967fa8b1f43fdd0bbf170 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:10 2015 +0000 api: buffer/shm: prevent circular dependencies Porting commit from linux-generic (835be) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 513b61c5907db7ec82228b6de06b8a87bf770951 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:09 2015 +0000 api: odp_debug.h: move macros internally Porting commit from linux-generic (4440) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit bc0ca10af5866636472e3ad4e7b0823865cd5fe7 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:08 2015 +0000 odp_debug.h: backward compatible _Static_assert Porting commit from linux-generic (3ee9) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 49cf6e3cd0b1b17df40f4bc4f9191d2928afbff1 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:07 2015 +0000 api: move internal debug macros Porting commit from linux-generic (f158) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 07cdc843d84e389e612a75dc066b5ddd4308d162 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:06 2015 +0000 api: odp_align: move internal macros Porting commit from linux-generic (724a) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit cab3bea734c4c6adcfe8eea35fb5b45b1760001d Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:05 2015 +0000 api: odp_time.h: rename odp_time_get_cycles() to odp_time_cycles() Porting commit from linux-generic (44c2) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 3aac5d5bad989f5d82975b5b1eadddfb9fadce5a Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:04 2015 +0000 Factor ODP types into a common include file Porting commit from linux-generic (111e) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 5e1bd0c88398a8987e88ab238e3d2c68f629546c Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:03 2015 +0000 linux-dpdk: remove odp_packet_netmap.h Porting commit from linux-generic (3612) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit f6baea1367f0acc27d746925aa106d9019fe9f48 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:02 2015 +0000 Rename buffer_from_packet function Porting commit from linux-generic (7a6c) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 7dbe941b31ef3d34edd79aba31326d3e407aaf17 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:01 2015 +0000 Add global_init params Porting commit from linux-generic (6f99) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit c5ec1fabfa22280264d81f120555eb45518948cb Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:25:00 2015 +0000 Rename packet start function Porting commit from linux-generic (7df9) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit ea08c3acacc9ab86445c2c15d4dc6f70f0372db5 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:24:59 2015 +0000 Rename packet buffer address function Porting commit from linux-generic (4f7a) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit d1aa6b899ff91773690bcdcdb80568c503506432 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:24:58 2015 +0000 Added process mode to example app Porting commit from linux-generic (d988) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 8c47a43798b0ef1d0287f7095ae5b0c2f1baafed Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:24:57 2015 +0000 Removed unnecessary pktio type include files Porting commit from linux-generic (0ece) Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 046dea4d68914491627b4bffad6b7e6e7da95225 Author: Zoltan Kiss <zoltan.kiss@linaro.org> Date: Thu Feb 26 18:24:56 2015 +0000 Remove pktio type awareness Porting commit from linux-generic (e968) Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit 0c700c3bacae424c433f98a79e6f1d7d794ce00e Merge: 031c955d b2bfcf34 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Fri Feb 27 14:46:13 2015 +0530 Merge ../odp into WIP commit 031c955d60683380eb1523551e273f551f84ce4b Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Mon Dec 1 15:24:27 2014 +0530 Add support for DPDK 1.7.1 - Added math library while linking - Added -rpath to locate the shared objects - Code modification done to support DPDK 1.7.1 - Updated README Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Reviewed-by: Zoltan Kiss <zoltan.kiss@linaro.org> commit cffdde07497931448ce8a4e03a19ad3116c81bd3 Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Fri Nov 7 18:22:22 2014 +0530 Running IPsec App on ODP-DPDK - Enabled crypto support in ODP-DPDK by calling odp_crypto_init_global during initialization. - Added platform specific odp_packet_io.h - Added odp_pktio_get_mac_addr API for ODP-DPDK. - Fixed data_len of mbuf. - set USE_MAC_ADDR_HACK to 0 in odp_ipsec.c to use odp API to get mac addr in ODP-DPDK platform. This is a temporary fix until ipsec app is modified to use odp_pktio_get_mac_addr permanently. Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> commit 98f556f5045a5d3cf073e75af9f31a2dbeefbcaa Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon Oct 6 13:27:10 2014 +0300 linux-dpdk: Rework buffer management Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit 9e73493250d59cb3c650acf4d458d3b9d6eb40b7 Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon Oct 6 13:23:20 2014 +0300 linux-dpdk: Fix ODP_BUFFER_POOL_INVALID and ODP_BUFFER_INVALID Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit 8073f6ac4752725614c6b2c8b76298e6f16b893d Author: Ciprian Barbu <ciprian.barbu@linaro.org> Date: Mon Oct 6 13:23:19 2014 +0300 linux-dpdk: Add ODP_ABORT Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> commit 7d0090a443072ed354cc9e1cd81d16aacb26d64a Author: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Date: Mon Oct 6 14:00:52 2014 +0530 Revert "git split: delete dpdk" This reverts commit d8cda8b0f395d00902a50690fee3679f65780013. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Signed-off-by: Yi He <yi.he@linaro.org>
l---------README.DPDK1
-rw-r--r--pkgconfig/libodp-dpdk.pc.in16
-rw-r--r--platform/linux-dpdk/.gitignore1
-rw-r--r--platform/linux-dpdk/Makefile.am235
-rw-r--r--platform/linux-dpdk/Makefile.inc4
-rw-r--r--platform/linux-dpdk/README328
l---------platform/linux-dpdk/arch1
-rw-r--r--platform/linux-dpdk/doc/platform_specific.dox32
l---------platform/linux-dpdk/include/odp/api/align.h1
l---------platform/linux-dpdk/include/odp/api/atomic.h1
l---------platform/linux-dpdk/include/odp/api/barrier.h1
l---------platform/linux-dpdk/include/odp/api/buffer.h1
l---------platform/linux-dpdk/include/odp/api/byteorder.h1
l---------platform/linux-dpdk/include/odp/api/classification.h1
l---------platform/linux-dpdk/include/odp/api/compiler.h1
l---------platform/linux-dpdk/include/odp/api/cpu.h1
l---------platform/linux-dpdk/include/odp/api/cpumask.h1
l---------platform/linux-dpdk/include/odp/api/crypto.h1
l---------platform/linux-dpdk/include/odp/api/debug.h1
l---------platform/linux-dpdk/include/odp/api/deprecated.h1
l---------platform/linux-dpdk/include/odp/api/errno.h1
l---------platform/linux-dpdk/include/odp/api/event.h1
l---------platform/linux-dpdk/include/odp/api/hash.h1
l---------platform/linux-dpdk/include/odp/api/hints.h1
l---------platform/linux-dpdk/include/odp/api/init.h1
-rw-r--r--platform/linux-dpdk/include/odp/api/packet.h46
-rw-r--r--platform/linux-dpdk/include/odp/api/packet_flags.h31
l---------platform/linux-dpdk/include/odp/api/packet_io.h1
l---------platform/linux-dpdk/include/odp/api/packet_io_stats.h1
l---------platform/linux-dpdk/include/odp/api/plat/atomic_inlines.h1
l---------platform/linux-dpdk/include/odp/api/plat/atomic_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/barrier_types.h1
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/buffer_types.h50
l---------platform/linux-dpdk/include/odp/api/plat/byteorder_inlines.h1
l---------platform/linux-dpdk/include/odp/api/plat/byteorder_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/classification_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/cpumask_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/crypto_types.h1
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/event_types.h57
l---------platform/linux-dpdk/include/odp/api/plat/init_types.h1
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/packet_flag_inlines.h94
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/packet_flag_inlines_api.h46
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/packet_inlines.h198
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/packet_inlines_api.h118
l---------platform/linux-dpdk/include/odp/api/plat/packet_io_types.h1
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/packet_types.h149
l---------platform/linux-dpdk/include/odp/api/plat/pool_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/queue_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/rwlock_recursive_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/rwlock_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/schedule_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/shared_memory_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/spinlock_recursive_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/spinlock_types.h1
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/static_inline.h.in43
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/std_clib_inlines.h38
l---------platform/linux-dpdk/include/odp/api/plat/strong_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/sync_inlines.h1
l---------platform/linux-dpdk/include/odp/api/plat/thread_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/thrmask_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/ticketlock_inlines.h1
l---------platform/linux-dpdk/include/odp/api/plat/ticketlock_inlines_api.h1
l---------platform/linux-dpdk/include/odp/api/plat/ticketlock_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/time_types.h1
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/timer_types.h51
l---------platform/linux-dpdk/include/odp/api/plat/traffic_mngr_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/version_types.h1
l---------platform/linux-dpdk/include/odp/api/pool.h1
l---------platform/linux-dpdk/include/odp/api/queue.h1
l---------platform/linux-dpdk/include/odp/api/random.h1
l---------platform/linux-dpdk/include/odp/api/rwlock.h1
l---------platform/linux-dpdk/include/odp/api/rwlock_recursive.h1
l---------platform/linux-dpdk/include/odp/api/schedule.h1
l---------platform/linux-dpdk/include/odp/api/schedule_types.h1
l---------platform/linux-dpdk/include/odp/api/shared_memory.h1
l---------platform/linux-dpdk/include/odp/api/spinlock.h1
l---------platform/linux-dpdk/include/odp/api/spinlock_recursive.h1
-rw-r--r--platform/linux-dpdk/include/odp/api/std_clib.h28
l---------platform/linux-dpdk/include/odp/api/std_types.h1
l---------platform/linux-dpdk/include/odp/api/sync.h1
l---------platform/linux-dpdk/include/odp/api/system_info.h1
l---------platform/linux-dpdk/include/odp/api/thread.h1
l---------platform/linux-dpdk/include/odp/api/thrmask.h1
l---------platform/linux-dpdk/include/odp/api/ticketlock.h1
l---------platform/linux-dpdk/include/odp/api/time.h1
l---------platform/linux-dpdk/include/odp/api/timer.h1
l---------platform/linux-dpdk/include/odp/api/traffic_mngr.h1
l---------platform/linux-dpdk/include/odp/api/version.h1
l---------platform/linux-dpdk/include/odp/drv1
l---------platform/linux-dpdk/include/odp/visibility_begin.h1
l---------platform/linux-dpdk/include/odp/visibility_end.h1
-rw-r--r--platform/linux-dpdk/include/odp_buffer_inlines.h46
-rw-r--r--platform/linux-dpdk/include/odp_buffer_internal.h116
-rw-r--r--platform/linux-dpdk/include/odp_config_internal.h139
-rw-r--r--platform/linux-dpdk/include/odp_errno_define.h4
-rw-r--r--platform/linux-dpdk/include/odp_packet_dpdk.h49
-rw-r--r--platform/linux-dpdk/include/odp_packet_internal.h239
-rw-r--r--platform/linux-dpdk/include/odp_packet_io_internal.h214
-rw-r--r--platform/linux-dpdk/include/odp_pool_internal.h95
l---------platform/linux-dpdk/include/odp_posix_extensions.h1
l---------platform/linux-dpdk/include/protocols1
-rw-r--r--platform/linux-dpdk/m4/configure.m4152
l---------platform/linux-dpdk/m4/odp_openssl.m41
l---------platform/linux-dpdk/m4/odp_pthread.m41
-rw-r--r--platform/linux-dpdk/odp_buffer.c108
-rw-r--r--platform/linux-dpdk/odp_crypto.c1290
-rw-r--r--platform/linux-dpdk/odp_errno.c35
-rw-r--r--platform/linux-dpdk/odp_init.c545
-rw-r--r--platform/linux-dpdk/odp_packet.c1518
-rw-r--r--platform/linux-dpdk/odp_packet_dpdk.c712
-rw-r--r--platform/linux-dpdk/odp_packet_flags.c297
-rw-r--r--platform/linux-dpdk/odp_pool.c653
-rw-r--r--platform/linux-dpdk/odp_std_clib.c38
-rw-r--r--platform/linux-dpdk/odp_thread.c241
-rw-r--r--platform/linux-dpdk/odp_time.c427
-rwxr-xr-xscripts/builddeb37
-rwxr-xr-xscripts/devbuild.sh77
-rwxr-xr-xscripts/git-transplant.py94
-rw-r--r--test/linux-dpdk/.gitignore3
-rw-r--r--test/linux-dpdk/Makefile.am56
-rw-r--r--test/linux-dpdk/Makefile.inc19
-rw-r--r--test/linux-dpdk/m4/configure.m42
l---------test/linux-dpdk/run-test1
l---------test/linux-dpdk/validation/api/pktio/.gitignore1
-rw-r--r--test/linux-dpdk/validation/api/pktio/Makefile.am4
l---------test/linux-dpdk/validation/api/pktio/pktio_env1
-rwxr-xr-xtest/linux-dpdk/validation/api/pktio/pktio_run.sh111
-rwxr-xr-xtest/linux-dpdk/wrapper-script.sh76
128 files changed, 9041 insertions, 0 deletions
diff --git a/README.DPDK b/README.DPDK
new file mode 120000
index 000000000..659f5671d
--- /dev/null
+++ b/README.DPDK
@@ -0,0 +1 @@
+platform/linux-dpdk/README \ No newline at end of file
diff --git a/pkgconfig/libodp-dpdk.pc.in b/pkgconfig/libodp-dpdk.pc.in
new file mode 100644
index 000000000..d3164a610
--- /dev/null
+++ b/pkgconfig/libodp-dpdk.pc.in
@@ -0,0 +1,16 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libodp-dpdk
+Description: The ODP packet processing engine
+Version: @PKGCONFIG_VERSION@
+<<<<<<< HEAD:pkgconfig/libodp-linux.pc.in
+Libs: -L${libdir} -lodp-linux @DPDK_LIBS@
+Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ @TIMER_LIBS@ -lpthread @ATOMIC_LIBS@ @LIBCONFIG_LIBS@
+=======
+Libs: -L${libdir} -lodp-dpdk
+Libs.private: @ATOMIC_LIBS@
+>>>>>>> odpdpdk/master:pkgconfig/libodp-dpdk.pc.in
+Cflags: -I${includedir}
diff --git a/platform/linux-dpdk/.gitignore b/platform/linux-dpdk/.gitignore
new file mode 100644
index 000000000..909756a1f
--- /dev/null
+++ b/platform/linux-dpdk/.gitignore
@@ -0,0 +1 @@
+include/odp/api/plat/static_inline.h
diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
new file mode 100644
index 000000000..c1497f0f6
--- /dev/null
+++ b/platform/linux-dpdk/Makefile.am
@@ -0,0 +1,235 @@
+include $(top_srcdir)/platform/Makefile.inc
+include $(top_srcdir)/platform/@with_platform@/Makefile.inc
+
+PLAT_CFLAGS =
+if ARCH_X86
+PLAT_CFLAGS += -msse4.2
+endif
+
+if DPDK_DEFAULT_DIR
+PLAT_CFLAGS += -include /usr/include/dpdk/rte_config.h
+else
+PLAT_CFLAGS += -include $(SDK_INSTALL_PATH)/include/rte_config.h
+endif
+
+AM_CFLAGS += $(PLAT_CFLAGS)
+AM_CFLAGS += -I$(srcdir)/include
+AM_CFLAGS += -I$(top_srcdir)/platform/linux-generic/include
+AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
+AM_CFLAGS += -I$(top_srcdir)/include
+AM_CFLAGS += -I$(top_builddir)/include
+AM_CFLAGS += -Iinclude
+
+include_HEADERS = \
+ $(top_srcdir)/include/odp.h \
+ $(top_srcdir)/include/odp_api.h
+
+odpincludedir= $(includedir)/odp
+odpinclude_HEADERS = \
+ $(srcdir)/include/odp/visibility_begin.h \
+ $(srcdir)/include/odp/visibility_end.h
+
+odpapiincludedir= $(includedir)/odp/api
+odpapiinclude_HEADERS = \
+ $(srcdir)/include/odp/api/align.h \
+ $(srcdir)/include/odp/api/atomic.h \
+ $(srcdir)/include/odp/api/barrier.h \
+ $(srcdir)/include/odp/api/buffer.h \
+ $(srcdir)/include/odp/api/byteorder.h \
+ $(srcdir)/include/odp/api/classification.h \
+ $(srcdir)/include/odp/api/compiler.h \
+ $(srcdir)/include/odp/api/cpu.h \
+ $(srcdir)/include/odp/api/cpumask.h \
+ $(srcdir)/include/odp/api/crypto.h \
+ $(srcdir)/include/odp/api/debug.h \
+ $(srcdir)/include/odp/api/deprecated.h \
+ $(srcdir)/include/odp/api/errno.h \
+ $(srcdir)/include/odp/api/event.h \
+ $(srcdir)/include/odp/api/hash.h \
+ $(srcdir)/include/odp/api/hints.h \
+ $(srcdir)/include/odp/api/init.h \
+ $(srcdir)/include/odp/api/packet_flags.h \
+ $(srcdir)/include/odp/api/packet.h \
+ $(srcdir)/include/odp/api/packet_io.h \
+ $(srcdir)/include/odp/api/packet_io_stats.h \
+ $(srcdir)/include/odp/api/pool.h \
+ $(srcdir)/include/odp/api/queue.h \
+ $(srcdir)/include/odp/api/random.h \
+ $(srcdir)/include/odp/api/rwlock.h \
+ $(srcdir)/include/odp/api/rwlock_recursive.h \
+ $(srcdir)/include/odp/api/schedule.h \
+ $(srcdir)/include/odp/api/schedule_types.h \
+ $(srcdir)/include/odp/api/shared_memory.h \
+ $(srcdir)/include/odp/api/spinlock.h \
+ $(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/sync.h \
+ $(srcdir)/include/odp/api/system_info.h \
+ $(srcdir)/include/odp/api/thread.h \
+ $(srcdir)/include/odp/api/thrmask.h \
+ $(srcdir)/include/odp/api/ticketlock.h \
+ $(srcdir)/include/odp/api/time.h \
+ $(srcdir)/include/odp/api/timer.h \
+ $(srcdir)/include/odp/api/traffic_mngr.h \
+ $(srcdir)/include/odp/api/version.h \
+ $(srcdir)/arch/@ARCH_DIR@/odp/api/cpu_arch.h
+
+odpapiplatincludedir= $(includedir)/odp/api/plat
+odpapiplatinclude_HEADERS = \
+ $(builddir)/include/odp/api/plat/static_inline.h \
+ $(srcdir)/include/odp/api/plat/atomic_inlines.h \
+ $(srcdir)/include/odp/api/plat/atomic_types.h \
+ $(srcdir)/include/odp/api/plat/barrier_types.h \
+ $(srcdir)/include/odp/api/plat/buffer_types.h \
+ $(srcdir)/include/odp/api/plat/byteorder_inlines.h \
+ $(srcdir)/include/odp/api/plat/byteorder_types.h \
+ $(srcdir)/include/odp/api/plat/classification_types.h \
+ $(srcdir)/include/odp/api/plat/cpumask_types.h \
+ $(srcdir)/include/odp/api/plat/crypto_types.h \
+ $(srcdir)/include/odp/api/plat/event_types.h \
+ $(srcdir)/include/odp/api/plat/init_types.h \
+ $(srcdir)/include/odp/api/plat/packet_flag_inlines.h \
+ $(srcdir)/include/odp/api/plat/packet_flag_inlines_api.h \
+ $(srcdir)/include/odp/api/plat/packet_inlines.h \
+ $(srcdir)/include/odp/api/plat/packet_inlines_api.h \
+ $(srcdir)/include/odp/api/plat/packet_io_types.h \
+ $(srcdir)/include/odp/api/plat/packet_types.h \
+ $(srcdir)/include/odp/api/plat/pool_types.h \
+ $(srcdir)/include/odp/api/plat/queue_types.h \
+ $(srcdir)/include/odp/api/plat/rwlock_types.h \
+ $(srcdir)/include/odp/api/plat/rwlock_recursive_types.h \
+ $(srcdir)/include/odp/api/plat/schedule_types.h \
+ $(srcdir)/include/odp/api/plat/shared_memory_types.h \
+ $(srcdir)/include/odp/api/plat/spinlock_types.h \
+ $(srcdir)/include/odp/api/plat/spinlock_recursive_types.h \
+ $(srcdir)/include/odp/api/plat/std_clib_inlines.h \
+ $(srcdir)/include/odp/api/plat/strong_types.h \
+ $(srcdir)/include/odp/api/plat/sync_inlines.h \
+ $(srcdir)/include/odp/api/plat/thread_types.h \
+ $(srcdir)/include/odp/api/plat/thrmask_types.h \
+ $(srcdir)/include/odp/api/plat/ticketlock_inlines.h \
+ $(srcdir)/include/odp/api/plat/ticketlock_inlines_api.h \
+ $(srcdir)/include/odp/api/plat/ticketlock_types.h \
+ $(srcdir)/include/odp/api/plat/time_types.h \
+ $(srcdir)/include/odp/api/plat/timer_types.h \
+ $(srcdir)/include/odp/api/plat/traffic_mngr_types.h \
+ $(srcdir)/include/odp/api/plat/version_types.h
+
+odpdrvincludedir = $(includedir)/odp/drv
+odpdrvinclude_HEADERS = \
+ $(srcdir)/include/odp/drv/compiler.h
+
+noinst_HEADERS = \
+ ${top_srcdir}/platform/linux-generic/include/_fdserver_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/_ishm_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/_ishmphy_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_align_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_atomic_internal.h \
+ ${srcdir}/include/odp_buffer_inlines.h \
+ ${srcdir}/include/odp_buffer_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_bitmap_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_classification_internal.h \
+ ${srcdir}/include/odp_config_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_debug_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_classification_datamodel.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_classification_inlines.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_classification_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_crypto_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_forward_typedefs_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_internal.h \
+ ${srcdir}/include/odp_packet_dpdk.h \
+ ${srcdir}/include/odp_packet_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_name_table_internal.h \
+ ${srcdir}/include/odp_packet_io_internal.h \
+ ${srcdir}/include/odp_errno_define.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_packet_io_ipc_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_packet_io_queue.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_packet_io_ring_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_packet_socket.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_pkt_queue_internal.h \
+ ${srcdir}/include/odp_pool_internal.h \
+ ${srcdir}/include/odp_posix_extensions.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_queue_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_ring_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_schedule_if.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_sorted_list_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_shm_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_time_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_timer_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_timer_wheel_internal.h \
+ ${top_srcdir}/platform/linux-generic/include/odp_traffic_mngr_internal.h \
+ ${srcdir}/include/protocols/eth.h \
+ ${srcdir}/include/protocols/ip.h \
+ ${srcdir}/include/protocols/ipsec.h \
+ ${srcdir}/include/protocols/tcp.h \
+ ${srcdir}/include/protocols/udp.h \
+ ${srcdir}/Makefile.inc
+
+__LIB__libodp_dpdk_la_SOURCES = \
+ ../linux-generic/_fdserver.c \
+ ../linux-generic/_ishm.c \
+ ../linux-generic/_ishmphy.c \
+ ../linux-generic/odp_atomic.c \
+ ../linux-generic/odp_barrier.c \
+ ../linux-generic/odp_bitmap.c \
+ odp_buffer.c \
+ ../linux-generic/odp_byteorder.c \
+ ../linux-generic/odp_classification.c \
+ ../linux-generic/odp_cpu.c \
+ ../linux-generic/odp_cpumask.c \
+ ../linux-generic/odp_cpumask_task.c \
+ odp_crypto.c \
+ odp_errno.c \
+ ../linux-generic/odp_event.c \
+ ../linux-generic/odp_hash.c \
+ odp_init.c \
+ ../linux-generic/odp_impl.c \
+ ../linux-generic/odp_name_table.c \
+ odp_packet.c \
+ odp_packet_dpdk.c \
+ odp_packet_flags.c \
+ ../linux-generic/odp_packet_io.c \
+ ../linux-generic/pktio/loop.c \
+ ../linux-generic/odp_pkt_queue.c \
+ odp_pool.c \
+ ../linux-generic/odp_queue.c \
+ ../linux-generic/odp_rwlock.c \
+ ../linux-generic/odp_rwlock_recursive.c \
+ ../linux-generic/odp_schedule.c \
+ ../linux-generic/odp_schedule_if.c \
+ ../linux-generic/odp_schedule_iquery.c \
+ ../linux-generic/odp_shared_memory.c \
+ ../linux-generic/odp_sorted_list.c \
+ ../linux-generic/odp_spinlock.c \
+ ../linux-generic/odp_spinlock_recursive.c \
+ odp_std_clib.c \
+ ../linux-generic/odp_sync.c \
+ ../linux-generic/odp_system_info.c \
+ odp_thread.c \
+ ../linux-generic/odp_thrmask.c \
+ ../linux-generic/odp_ticketlock.c \
+ odp_time.c \
+ ../linux-generic/odp_timer.c \
+ ../linux-generic/odp_timer_wheel.c \
+ ../linux-generic/odp_traffic_mngr.c \
+ ../linux-generic/odp_version.c \
+ ../linux-generic/odp_weak.c \
+ arch/@ARCH_DIR@/odp_cpu_arch.c \
+ arch/@ARCH_DIR@/odp_sysinfo_parse.c
+
+__LIB__libodp_dpdk_la_LIBADD = $(ATOMIC_LIBS)
+
+if ARCH_IS_X86
+__LIB__libodp_dpdk_la_SOURCES += arch/@ARCH_DIR@/cpu_flags.c
+endif
+
+# Create symlink for ABI header files. Application does not need to use the arch
+# specific include path for installed files.
+install-data-hook:
+ if [ -h $(DESTDIR)$(prefix)/include/odp/api/abi ]; then \
+ : ; \
+ else \
+ $(LN_S) -rf $(DESTDIR)$(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \
+ $(DESTDIR)$(prefix)/include/odp/api/abi; \
+ fi
diff --git a/platform/linux-dpdk/Makefile.inc b/platform/linux-dpdk/Makefile.inc
new file mode 100644
index 000000000..d26b2cc82
--- /dev/null
+++ b/platform/linux-dpdk/Makefile.inc
@@ -0,0 +1,4 @@
+AM_CFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
+AM_CXXFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
+AM_LDFLAGS += -R$(SDK_INSTALL_PATH)/lib
+LOG_COMPILER = $(top_srcdir)/test/linux-dpdk/wrapper-script.sh
diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
new file mode 100644
index 000000000..5a82257e7
--- /dev/null
+++ b/platform/linux-dpdk/README
@@ -0,0 +1,328 @@
+Copyright (c) 2014, Linaro Limited
+All rights reserved.
+
+SPDX-License-Identifier: BSD-3-Clause
+
+
+ERRATA:
+- DPDK 16.07 and earlier supports pool names with RTE_MEMZONE_NAMESIZE
+ characters (including terminating NULL), which is 6 characters less than
+ ODP_POOL_NAME_LEN. Names reaching into this interval might collide if the
+ first 25 characters are not unique.
+
+
+1. Rationale
+=================================================
+
+This is an effort to port ODP on top of DPDK to accelerate packet processing on
+systems equipped with NIC's that supports DPDK.
+
+Prerequisites and considerations:
+--------------------------------
+- 8GB of RAM recommended, 4 might be enough too
+- it's recommended to obtain a DPDK supported network card (many come in dual
+ port configuration, mostly dedicated to server usage)
+- it's also possible to use odp-dpdk for evaluation purposes without a DPDK
+ compatible NIC, using the pcap poll mode driver
+- DPDK code must be downloaded, configured and compiled, details below
+- ODP-DPDK has been compiled and tested on an x86 host with Ubuntu 16.04 LTS
+ (4.4.0 kernel).
+- DPDK only works on a selected range of network cards. The list of known and
+ supported devices can be found in the DPDK documentation:
+ http://dpdk.org/doc/guides-17.02/nics/index.html
+
+
+2. Preparing DPDK
+=================================================
+
+Fetching the DPDK code:
+----------------------
+ git clone http://dpdk.org/git/dpdk ./<dpdk-dir>
+
+Right now odp-dpdk only supports DPDK v17.02:
+ cd <dpdk-dir>
+ git tag -l -- will list all the tags available
+ git checkout -b 17.02 tags/v17.02
+
+Compile DPDK:
+------------
+Please refer to http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html for more
+details on how to build DPDK. Best effort is done to provide some help on DPDK
+cmds below for Ubuntu, where it has been compiled and tested.
+
+On Ubuntu install pcap development library:
+ sudo apt-get install libpcap-dev
+
+This has to be done only once:
+ cd <dpdk-dir>
+ make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc
+
+Enable pcap pmd to use ODP-DPDK without DPDK supported NIC's:
+ cd <dpdk-dir>/x86_64-native-linuxapp-gcc
+ sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
+
+Enable openssl crypto pmd to use openssl with odp-dpdk:
+ sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_OPENSSL=).*,\1y,' .config
+
+Now return to parent directory and build DPDK:
+ cd ..
+
+The last step depends on if shared libraries are required.
+SHARED libraries:
+ make install T=x86_64-native-linuxapp-gcc DESTDIR=./install EXTRA_CFLAGS="-fPIC"
+
+STATIC libraries:
+ make install T=x86_64-native-linuxapp-gcc DESTDIR=./install
+
+This only ensures building DPDK, but traffic is not tested with this build yet.
+
+
+3. Compile ODP-DPDK
+=================================================
+
+Build dependencies are listed in DEPENDENCIES. Use absolute DPDK directory
+path with the --with-sdk-install-path option.
+
+ cd <odp-dir>
+ ./bootstrap
+
+The following step depends on if shared libraries are required.
+SHARED libraries:
+ ./configure --with-sdk-install-path=<dpdk-dir>/x86_64-native-linuxapp-gcc
+
+STATIC libraries (better performance):
+ ./configure --with-sdk-install-path=<dpdk-dir>/x86_64-native-linuxapp-gcc --disable-shared
+
+ make
+
+
+4. Prepare DPDK for running ODP-DPDK examples
+=================================================
+
+Reserve hugepages:
+-----------------
+To reserve huge pages, which is needed for DPDK, execute following commands
+(these are usually needed only once after the system has started):
+ sudo sh -c 'echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages'
+
+If you are running on a multi-node machine then hugepages have to be reserved on
+each node:
+ ls /sys/devices/system/node
+ sudo sh -c 'echo 1024 > /sys/devices/system/node/node*/hugepages/hugepages-2048kB/nr_hugepages'
+
+Mount hugetlbfs:
+---------------
+ sudo mkdir /mnt/huge
+ sudo mount -t hugetlbfs nodev /mnt/huge
+
+Insert DPDK kernel module:
+-------------------------
+DPDK uses userspace poll mode drivers, so it's necessary to insert a couple of
+modules to allow DPDK to map the NIC's registers to userspace:
+ sudo /sbin/modprobe uio
+ ulimit -Sn 2048
+
+ cd <dpdk-dir>
+ sudo insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
+
+Bind NIC's to DPDK:
+------------------
+The DPDK code contains a tool used to bind drivers to the network cards.
+
+ cd <dpdk-dir>
+ ./usertools/dpdk-devbind.py --status
+
+This command produces output that is similar to the one given below:
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Network devices using DPDK-compatible driver
+============================================
+0000:05:00.0 'Ethernet 10G 2P X520 Adapter' drv=igb_uio unused=
+0000:05:00.1 'Ethernet 10G 2P X520 Adapter' drv=igb_uio unused=
+
+Network devices using kernel driver
+===================================
+0000:01:00.0 'NetXtreme II BCM5709 Gigabit Ethernet' if=eth0 drv=bnx2 unused=<none> *Active*
+0000:01:00.1 'NetXtreme II BCM5709 Gigabit Ethernet' if=eth1 drv=bnx2 unused=<none>
+0000:07:00.0 'T320 10GbE Dual Port Adapter' if=eth2,eth3 drv=cxgb3 unused=<none>
+
+Other network devices
+=====================
+<none>
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Bind using interface name:
+-------------------------
+The easiest way is to let the tool automatically switch the regular drivers. For
+that the interface must not be active i.e. no IP addresses assigned:
+ sudo ifconfig eth0 0
+ sudo ifconfig eth1 0
+ sudo ./usertools/dpdk-devbind.py --bind=igb_uio eth0
+ sudo ./usertools/dpdk-devbind.py --bind=igb_uio eth1
+
+
+Bind using PCI ids:
+------------------
+Another way is to remove the regular drivers and use PCI ids:
+ sudo rmmod ixgbe
+
+ sudo ./usertools/dpdk-devbind.py --bind=igb_uio 05:00.0
+ sudo ./usertools/dpdk-devbind.py --bind=igb_uio 05:00.1
+
+Unbind network cards from DPDK:
+------------------------------
+To restore the NIC's back to kernel use something like this:
+ sudo ./usertools/dpdk-devbind.py --bind=ixgbe 05:00.0
+ sudo ./usertools/dpdk-devbind.py --bind=ixgbe 05:00.1
+
+
+5. Running ODP apps
+=================================================
+
+ODP-DPDK applications need to be run as root. You also need to supply the DPDK
+command line parameters either as a null-terminated array of char's to
+odp_global_init()'s platform_params parameter:
+
+ odp_global_init([params], "-n 4");
+
+Or, if it's NULL the platform tries to read the ODP_PLATFORM_PARAMS environment
+variable.
+
+You need to pass at least "-n [1..4]" to specify the number of memory channels.
+The coremask (-c) is calculated by ODP-DPDK based on the process affinity at
+startup. You can influence that with 'taskset'. DPDK init changes the affinity
+of the calling thread, so after it returns the original affinity is restored.
+Only the first active core is passed to rte_eal_init(), as the rest would be
+used for DPDK's special lcore threads, which are only available through
+rte_eal_[mp_]remote_launch(), but not through ODP API's. Nevertheless,
+odp_local_init() makes sure for the rest of the DPDK libraries ODP threads look
+like proper DPDK threads.
+
+Exaple how to run an ODP-DPDK L2 forwarding application:
+
+ sudo ODP_PLATFORM_PARAMS="-n 4" ./odp_l2fwd -i 0,1 -c 2
+
+ -i 0,1 - interface numbers
+ -c 2 - number of worker cpus
+
+
+6. Howto debug DPDK apps on the host
+=================================================
+
+For example you need to debug some l2fwd application. Then network configuration
+might be:
+
+<veth1-2> <-----> <veth2-1> (iface0 DPDK L2FWD APP iface1) <veth2-3> <-----> <veth3-2>
+
+Where:
+vethX-Y - virtual devices for host.
+
+Packet sent to veth1-2 goes to chain and appears on veth3-2
+
+Steps:
+Recompile with:
+CONFIG_RTE_LIBRTE_PMD_PCAP=y
+
+ ip link add veth1-2 type veth peer name veth2-1
+ ip link add veth2-3 type veth peer name veth3-2
+ ifconfig veth1-2 up -arp
+ ifconfig veth2-1 up -arp
+ ifconfig veth2-3 up -arp
+ ifconfig veth3-2 up -arp
+
+ mount -t hugetlbfs none /mnt/huge
+
+Finally give l2fwd fake devices:
+ ./l2fwd -c '0xf' -n 4 --vdev "eth_pcap0,iface=veth2-1" --vdev="eth_pcap1,iface=veth2-3" -- -p 3
+
+7. Build with devbuild.sh
+=================================================
+
+scripts/devbuild.sh contains an example script aimed for developers. It uses
+the CI scripts from https://git.linaro.org/lng/check-odp.git to build DPDK and
+ODP-DPDK. It can also run "make check" or individual unit tests, but you need to
+install CUnit as a prerequisite.
+If you have build problems, try to run it and see if it works. An example:
+ export REPOS=${PWD}
+ git clone https://git.linaro.org/lng/check-odp.git
+ git clone https://git.linaro.org/lng/odp-dpdk.git
+ odp-dpdk/scripts/devbuild.sh dpdk
+ odp-dpdk/scripts/devbuild.sh odp
+ odp-dpdk/scripts/devbuild.sh odp-check
+
+It can also run unit tests individually, optionally with gdb. If the first
+parameter is not dpdk, odp or odp-check, it tries to run it in
+"$CHECK_ODP_DIR/new-build/bin/", with the help of the wrapper script. That's
+where example programs are, but you can also use it to run the unit tests, by
+traversing the directories:
+
+ odp-dpdk/scripts/devbuild.sh \
+ ../../../odp-dpdk/test/common_plat/validation/api/atomic/atomic_main
+ odp-dpdk/scripts/devbuild.sh \
+ ../../../odp-dpdk/test/linux-dpdk/validation/api/pktio/pktio_run.sh
+
+The wrapper will prepend the executable with ODP_GDB env. variable, or pass it
+down if its name ends ".sh". With prepending your command line with ODP_GDB=gdb
+you can run the tests in GDB. If the unit test is wrapped into yet another
+shell script (like pktio), it has to do the prepending itself!
+
+8. Upgrading ODP-DPDK to newer ODP API level
+=================================================
+
+This repository is based on odp.git, it also retains the history of that. There
+are some modifications in configure.ac plus a few other files, but most of the
+changes are in platform/linux-dpdk. That directory's Makefile.am builds our
+code and the required parts from platform/linux-generic.
+This allows us to easily pull the necessary changes from odp.git with git:
+
+git remote add odp_base https://git.linaro.org/lng/odp.git
+git pull odp_base master
+
+This will result in a merge commit, and possibly some conflict resolving if
+one of the files we touch outside platform/linux-dpdk is modified. After
+resolving this conflict you need to implement the changes in the API. Also,
+some of the code in our files are exact copy of the linux-generic counterpart,
+it's important to port the fixes to the original. The git-transplant script
+can do this:
+
+scripts/git-transplant.py platform/linux-generic/ platform/linux-dpdk/ \
+[the previous last commit merged from odp.git]..HEAD
+
+It prints the list of prospective patches to be ported. See its comments about
+what it does.
+
+9. Building odp-dpdk with dpdk crypto PMD's
+======================================================
+
+Refer to dpdk crypto documentation for detailed building of crypto PMD's:
+http://dpdk.org/doc/guides/cryptodevs/index.html.
+
+To build odp-dpdk with dpdk virtual crypto devices, we need to build supporting
+intel multi-buffer library prior to dpdk build.
+
+get the Intel multi-buffer crypto from,
+https://downloadcenter.intel.com/download/22972
+and follow the README from the repo on how to build the library.
+
+building dpdk:
+
+Follow the instructions from "Compile DPDK" section.
+Make sure to enable necessary crypto PMD's,
+
+# Compile PMD for AESNI backed device
+sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_AESNI_MB=).*,\1y,' .config
+
+# Compile PMD for AESNI GCM device
+sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=).*,\1y,' .config
+
+# Compile PMD for SNOW 3G device
+sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_SNOW3G=).*,\1y,' .config
+
+AESNI_MULTI_BUFFER_LIB_PATH=/path-to/Intel-multi-buffer-crypto/ \
+ make install T=x86_64-native-linuxapp-gcc EXTRA_CFLAGS="-fPIC"
+
+when building odp-dpdk application, add the multi-buffer crypto library path to make file.
+Before running the application, export ODP_PLATFORM_PARAMS with corresponding
+crypto vdev's.
+ex: ODP_PLATFORM_PARAMS="-n 4 --vdev cryptodev_aesni_mb_pmd,max_nb_sessions=32 \
+ --vdev cryptodev_null_pmd,max_nb_sessions=32"
diff --git a/platform/linux-dpdk/arch b/platform/linux-dpdk/arch
new file mode 120000
index 000000000..b552ee6b9
--- /dev/null
+++ b/platform/linux-dpdk/arch
@@ -0,0 +1 @@
+../linux-generic/arch/ \ No newline at end of file
diff --git a/platform/linux-dpdk/doc/platform_specific.dox b/platform/linux-dpdk/doc/platform_specific.dox
new file mode 100644
index 000000000..bdab65640
--- /dev/null
+++ b/platform/linux-dpdk/doc/platform_specific.dox
@@ -0,0 +1,32 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+* @file platform_specific.dox
+* extra linux-dpdk documentation
+*/
+
+/** @addtogroup odp_thread
+ * @par ODP thread
+ * In this ODP implementation an odp thread is either:
+ * - a linux process descendant (or same as) the odp instantiation process.
+ * - a pthread 'member' of a linux process descendant (or same as) the odp
+ * instantiation process.
+ */
+
+/**
+ * @fn odp_init_local(odp_instance_t instance, odp_thread_type_t thr_type)
+ * @note In this ODP implementation odpthreads have to be
+ * processes descendants of (or same as) the ODP
+ * instantiation process, or pthreads 'members' of such
+ * processes.
+ * @note As ODP instantiation processes cannot be descendants
+ * of each others, the instance parameter provided
+ * to odp_init_local() is actually fully defined by these
+ * requirements: It has to be the value returned by the
+ * unique call to odp_init_global() made by one single
+ * ascendant of the current process.
+ */
diff --git a/platform/linux-dpdk/include/odp/api/align.h b/platform/linux-dpdk/include/odp/api/align.h
new file mode 120000
index 000000000..10c13402c
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/align.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/align.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/atomic.h b/platform/linux-dpdk/include/odp/api/atomic.h
new file mode 120000
index 000000000..e6d28fdf5
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/atomic.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/atomic.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/barrier.h b/platform/linux-dpdk/include/odp/api/barrier.h
new file mode 120000
index 000000000..72a22f10f
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/barrier.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/barrier.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/buffer.h b/platform/linux-dpdk/include/odp/api/buffer.h
new file mode 120000
index 000000000..6587bdcb2
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/buffer.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/buffer.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/byteorder.h b/platform/linux-dpdk/include/odp/api/byteorder.h
new file mode 120000
index 000000000..cef6d89b6
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/byteorder.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/byteorder.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/classification.h b/platform/linux-dpdk/include/odp/api/classification.h
new file mode 120000
index 000000000..43cf93626
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/classification.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/classification.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/compiler.h b/platform/linux-dpdk/include/odp/api/compiler.h
new file mode 120000
index 000000000..6b99f796c
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/compiler.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/compiler.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/cpu.h b/platform/linux-dpdk/include/odp/api/cpu.h
new file mode 120000
index 000000000..eb6a69f83
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/cpu.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/cpu.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/cpumask.h b/platform/linux-dpdk/include/odp/api/cpumask.h
new file mode 120000
index 000000000..49ca0f2c3
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/cpumask.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/cpumask.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/crypto.h b/platform/linux-dpdk/include/odp/api/crypto.h
new file mode 120000
index 000000000..d69e8a0e2
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/crypto.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/crypto.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/debug.h b/platform/linux-dpdk/include/odp/api/debug.h
new file mode 120000
index 000000000..2814f8f54
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/debug.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/debug.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/deprecated.h b/platform/linux-dpdk/include/odp/api/deprecated.h
new file mode 120000
index 000000000..42bc7ef16
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/deprecated.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/deprecated.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/errno.h b/platform/linux-dpdk/include/odp/api/errno.h
new file mode 120000
index 000000000..f274d6a73
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/errno.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/errno.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/event.h b/platform/linux-dpdk/include/odp/api/event.h
new file mode 120000
index 000000000..674d3539a
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/event.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/event.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/hash.h b/platform/linux-dpdk/include/odp/api/hash.h
new file mode 120000
index 000000000..80cbce721
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/hash.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/hash.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/hints.h b/platform/linux-dpdk/include/odp/api/hints.h
new file mode 120000
index 000000000..60a8912b5
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/hints.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/hints.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/init.h b/platform/linux-dpdk/include/odp/api/init.h
new file mode 120000
index 000000000..0f4bd6c09
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/init.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/init.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/packet.h b/platform/linux-dpdk/include/odp/api/packet.h
new file mode 100644
index 000000000..9df56021f
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/packet.h
@@ -0,0 +1,46 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP packet descriptor
+ */
+
+#ifndef ODP_PLAT_PACKET_H_
+#define ODP_PLAT_PACKET_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/std_types.h>
+#include <odp/api/plat/event_types.h>
+#include <odp/api/plat/packet_io_types.h>
+#include <odp/api/plat/packet_types.h>
+#include <odp/api/plat/buffer_types.h>
+#include <odp/api/plat/pool_types.h>
+
+/** @ingroup odp_packet
+ * @{
+ */
+
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 0
+#include <odp/api/plat/packet_inlines.h>
+#endif
+
+/**
+ * @}
+ */
+
+#include <odp/api/spec/packet.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ODP_PLAT_PACKET_H_ */
diff --git a/platform/linux-dpdk/include/odp/api/packet_flags.h b/platform/linux-dpdk/include/odp/api/packet_flags.h
new file mode 100644
index 000000000..e3725a60f
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/packet_flags.h
@@ -0,0 +1,31 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP packet flags
+ */
+
+#ifndef ODP_PLAT_PACKET_FLAGS_H_
+#define ODP_PLAT_PACKET_FLAGS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 0
+#include <odp/api/plat/packet_flag_inlines.h>
+#endif
+
+#include <odp/api/spec/packet_flags.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ODP_PLAT_PACKET_FLAGS_H_ */
diff --git a/platform/linux-dpdk/include/odp/api/packet_io.h b/platform/linux-dpdk/include/odp/api/packet_io.h
new file mode 120000
index 000000000..1e0d9e415
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/packet_io.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/packet_io.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/packet_io_stats.h b/platform/linux-dpdk/include/odp/api/packet_io_stats.h
new file mode 120000
index 000000000..58fdde2de
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/packet_io_stats.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/packet_io_stats.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/atomic_inlines.h b/platform/linux-dpdk/include/odp/api/plat/atomic_inlines.h
new file mode 120000
index 000000000..5ecc5b8a6
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/atomic_inlines.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/atomic_inlines.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/atomic_types.h b/platform/linux-dpdk/include/odp/api/plat/atomic_types.h
new file mode 120000
index 000000000..2febdca91
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/atomic_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/atomic_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/barrier_types.h b/platform/linux-dpdk/include/odp/api/plat/barrier_types.h
new file mode 120000
index 000000000..8869ae8cc
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/barrier_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/barrier_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/buffer_types.h b/platform/linux-dpdk/include/odp/api/plat/buffer_types.h
new file mode 100644
index 000000000..809768f3d
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/buffer_types.h
@@ -0,0 +1,50 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP buffer descriptor
+ */
+
+#ifndef ODP_BUFFER_TYPES_H_
+#define ODP_BUFFER_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 1
+#include <odp/api/abi/buffer.h>
+#else
+
+#include <odp/api/std_types.h>
+#include <odp/api/plat/strong_types.h>
+
+/** @ingroup odp_buffer
+ * @{
+ */
+
+typedef ODP_HANDLE_T(odp_buffer_t);
+
+#define ODP_BUFFER_INVALID _odp_cast_scalar(odp_buffer_t, 0xffffffff)
+
+typedef ODP_HANDLE_T(odp_buffer_seg_t);
+
+#define ODP_SEGMENT_INVALID ((odp_buffer_seg_t)ODP_BUFFER_INVALID)
+
+/**
+ * @}
+ */
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp/api/plat/byteorder_inlines.h b/platform/linux-dpdk/include/odp/api/plat/byteorder_inlines.h
new file mode 120000
index 000000000..5f3751602
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/byteorder_inlines.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/byteorder_inlines.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/byteorder_types.h b/platform/linux-dpdk/include/odp/api/plat/byteorder_types.h
new file mode 120000
index 000000000..13d0058a7
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/byteorder_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/byteorder_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/classification_types.h b/platform/linux-dpdk/include/odp/api/plat/classification_types.h
new file mode 120000
index 000000000..1d1183de3
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/classification_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/classification_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/cpumask_types.h b/platform/linux-dpdk/include/odp/api/plat/cpumask_types.h
new file mode 120000
index 000000000..cdf1f996f
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/cpumask_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/cpumask_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/crypto_types.h b/platform/linux-dpdk/include/odp/api/plat/crypto_types.h
new file mode 120000
index 000000000..36d39fdc5
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/crypto_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/crypto_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/event_types.h b/platform/linux-dpdk/include/odp/api/plat/event_types.h
new file mode 100644
index 000000000..086e83d51
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/event_types.h
@@ -0,0 +1,57 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP event
+ */
+
+#ifndef ODP_EVENT_TYPES_H_
+#define ODP_EVENT_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 1
+#include <odp/api/abi/event.h>
+#else
+
+#include <odp/api/std_types.h>
+#include <odp/api/plat/strong_types.h>
+
+/** @ingroup odp_event
+ * @{
+ */
+
+typedef ODP_HANDLE_T(odp_event_t);
+
+#define ODP_EVENT_INVALID _odp_cast_scalar(odp_event_t, 0xffffffff)
+
+/**
+ * Event types
+ */
+typedef enum odp_event_type_t {
+ ODP_EVENT_BUFFER = 1,
+ ODP_EVENT_PACKET = 2,
+ ODP_EVENT_TIMEOUT = 3,
+ ODP_EVENT_CRYPTO_COMPL = 4,
+} odp_event_type_t;
+
+/**
+ * @}
+ */
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp/api/plat/init_types.h b/platform/linux-dpdk/include/odp/api/plat/init_types.h
new file mode 120000
index 000000000..6b19ee415
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/init_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/init_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_flag_inlines.h b/platform/linux-dpdk/include/odp/api/plat/packet_flag_inlines.h
new file mode 100644
index 000000000..fef6ff97b
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/packet_flag_inlines.h
@@ -0,0 +1,94 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * Packet flag inline functions
+ */
+
+#ifndef _ODP_PLAT_PACKET_FLAG_INLINES_H_
+#define _ODP_PLAT_PACKET_FLAG_INLINES_H_
+
+#include <odp/api/plat/packet_types.h>
+
+/** @internal Inline function offsets */
+extern const _odp_packet_inline_offset_t _odp_packet_inline;
+
+/** @internal Inline function @param pkt @return */
+static inline uint64_t _odp_packet_input_flags(odp_packet_t pkt)
+{
+ return *(uint64_t *)(uintptr_t)((uint8_t *)pkt +
+ _odp_packet_inline.input_flags);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline int _odp_packet_has_l2(odp_packet_t pkt)
+{
+ _odp_packet_input_flags_t flags;
+
+ flags.all = _odp_packet_input_flags(pkt);
+ return flags.l2;
+}
+
+/** @internal Inline function @param pkt @return */
+static inline int _odp_packet_has_eth(odp_packet_t pkt)
+{
+ _odp_packet_input_flags_t flags;
+
+ flags.all = _odp_packet_input_flags(pkt);
+ return flags.eth;
+}
+
+/** @internal Inline function @param pkt @return */
+static inline int _odp_packet_has_jumbo(odp_packet_t pkt)
+{
+ _odp_packet_input_flags_t flags;
+
+ flags.all = _odp_packet_input_flags(pkt);
+ return flags.jumbo;
+}
+
+/** @internal Inline function @param pkt @return */
+static inline int _odp_packet_has_flow_hash(odp_packet_t pkt)
+{
+ return *(uint64_t *)((char *)pkt + _odp_packet_inline.ol_flags) &
+ _odp_packet_inline.rss_flag;
+}
+
+/** @internal Inline function @param pkt */
+static inline void _odp_packet_has_flow_hash_clr(odp_packet_t pkt)
+{
+ *(uint64_t *)((char *)pkt + _odp_packet_inline.ol_flags) &=
+ ~_odp_packet_inline.rss_flag;
+}
+
+/** @internal Inline function @param pkt @return */
+static inline int _odp_packet_has_ts(odp_packet_t pkt)
+{
+ _odp_packet_input_flags_t flags;
+
+ flags.all = _odp_packet_input_flags(pkt);
+ return flags.timestamp;
+}
+
+/* Include inlined versions of API functions */
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 0
+
+/** @ingroup odp_packet
+ * @{
+ */
+
+#include <odp/api/plat/packet_flag_inlines_api.h>
+
+/**
+ * @}
+ */
+
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_flag_inlines_api.h b/platform/linux-dpdk/include/odp/api/plat/packet_flag_inlines_api.h
new file mode 100644
index 000000000..24062bf26
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/packet_flag_inlines_api.h
@@ -0,0 +1,46 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * Packet flag inline functions
+ */
+
+#ifndef _ODP_PLAT_PACKET_FLAG_INLINES_API_H_
+#define _ODP_PLAT_PACKET_FLAG_INLINES_API_H_
+
+_ODP_INLINE int odp_packet_has_l2(odp_packet_t pkt)
+{
+ return _odp_packet_has_l2(pkt);
+}
+
+_ODP_INLINE int odp_packet_has_eth(odp_packet_t pkt)
+{
+ return _odp_packet_has_eth(pkt);
+}
+
+_ODP_INLINE int odp_packet_has_jumbo(odp_packet_t pkt)
+{
+ return _odp_packet_has_jumbo(pkt);
+}
+
+_ODP_INLINE int odp_packet_has_flow_hash(odp_packet_t pkt)
+{
+ return _odp_packet_has_flow_hash(pkt);
+}
+
+_ODP_INLINE void odp_packet_has_flow_hash_clr(odp_packet_t pkt)
+{
+ _odp_packet_has_flow_hash_clr(pkt);
+}
+
+_ODP_INLINE int odp_packet_has_ts(odp_packet_t pkt)
+{
+ return _odp_packet_has_ts(pkt);
+}
+
+#endif
diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
new file mode 100644
index 000000000..93102974b
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
@@ -0,0 +1,198 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP packet inline functions
+ */
+
+#ifndef _ODP_PLAT_PACKET_INLINES_H_
+#define _ODP_PLAT_PACKET_INLINES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/plat/packet_types.h>
+#include <odp/api/pool.h>
+#include <odp/api/packet_io.h>
+#include <odp/api/hints.h>
+
+#include <rte_mbuf.h>
+
+/** @internal Inline function offsets */
+extern const _odp_packet_inline_offset_t _odp_packet_inline;
+
+/** @internal Inline function @param pkt @return */
+static inline void *_odp_packet_data(odp_packet_t pkt)
+{
+ char **buf_addr = (char **)(void *)((char *)pkt +
+ _odp_packet_inline.buf_addr);
+ uint16_t data_off = *(uint16_t *)(void *)((char *)pkt +
+ _odp_packet_inline.data);
+
+ return (void *)(*buf_addr + data_off);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline uint32_t _odp_packet_seg_len(odp_packet_t pkt)
+{
+ return *(uint16_t *)(void *)((char *)pkt + _odp_packet_inline.seg_len);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline uint32_t _odp_packet_len(odp_packet_t pkt)
+{
+ return *(uint32_t *)(void *)((char *)pkt + _odp_packet_inline.pkt_len);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline uint32_t _odp_packet_headroom(odp_packet_t pkt)
+{
+ struct rte_mbuf *mb = (struct rte_mbuf *)((uint8_t *)pkt +
+ _odp_packet_inline.mb);
+
+ return rte_pktmbuf_headroom(mb);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline uint32_t _odp_packet_tailroom(odp_packet_t pkt)
+{
+ struct rte_mbuf *mb = (struct rte_mbuf *)((uint8_t *)pkt +
+ _odp_packet_inline.mb);
+
+ return rte_pktmbuf_tailroom(rte_pktmbuf_lastseg(mb));
+}
+
+/** @internal Inline function @param pkt @return */
+static inline odp_pool_t _odp_packet_pool(odp_packet_t pkt)
+{
+ return *(odp_pool_t *)(uintptr_t)((uint8_t *)pkt +
+ _odp_packet_inline.pool);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline odp_pktio_t _odp_packet_input(odp_packet_t pkt)
+{
+ return *(odp_pktio_t *)(uintptr_t)((uint8_t *)pkt +
+ _odp_packet_inline.input);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline int _odp_packet_num_segs(odp_packet_t pkt)
+{
+ return *(uint8_t *)(uintptr_t)((uint8_t *)pkt +
+ _odp_packet_inline.nb_segs);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline void *_odp_packet_user_ptr(odp_packet_t pkt)
+{
+ return *(void **)(uintptr_t)((uint8_t *)pkt +
+ _odp_packet_inline.user_ptr);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline void *_odp_packet_user_area(odp_packet_t pkt)
+{
+ return (void *)((char *)pkt + _odp_packet_inline.udata);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline uint32_t _odp_packet_user_area_size(odp_packet_t pkt)
+{
+ return *(uint32_t *)(void *)((char *)pkt +
+ _odp_packet_inline.udata_len);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline uint32_t _odp_packet_flow_hash(odp_packet_t pkt)
+{
+ return *(uint32_t *)(void *)((char *)pkt + _odp_packet_inline.rss);
+}
+
+/** @internal Inline function @param pkt @param flow_hash */
+static inline void _odp_packet_flow_hash_set(odp_packet_t pkt, uint32_t flow_hash)
+{
+ *(uint32_t *)(void *)((char *)pkt + _odp_packet_inline.rss)
+ = flow_hash;
+ *(uint64_t *)(void *)((char *)pkt + _odp_packet_inline.ol_flags)
+ |= _odp_packet_inline.rss_flag;
+}
+
+/** @internal Inline function @param pkt @return */
+static inline odp_time_t _odp_packet_ts(odp_packet_t pkt)
+{
+ return *(odp_time_t *)(uintptr_t)((uint8_t *)pkt +
+ _odp_packet_inline.timestamp);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline void *_odp_packet_head(odp_packet_t pkt)
+{
+ return (uint8_t *)_odp_packet_data(pkt) - _odp_packet_headroom(pkt);
+}
+
+/** @internal Inline function @param pkt @return */
+static inline int _odp_packet_is_segmented(odp_packet_t pkt)
+{
+ return !rte_pktmbuf_is_contiguous((struct rte_mbuf *)((uint8_t *)pkt +
+ _odp_packet_inline.mb));
+}
+
+/** @internal Inline function @param pkt @return */
+static inline odp_packet_seg_t _odp_packet_first_seg(odp_packet_t pkt)
+{
+ return (odp_packet_seg_t)(uintptr_t)pkt;
+}
+
+/** @internal Inline function @param pkt @return */
+static inline odp_packet_seg_t _odp_packet_last_seg(odp_packet_t pkt)
+{
+ struct rte_mbuf *mb = (struct rte_mbuf *)((uint8_t *)pkt +
+ _odp_packet_inline.mb);
+
+ return (odp_packet_seg_t)(uintptr_t)rte_pktmbuf_lastseg(mb);
+}
+
+/** @internal Inline function @param pkt @param seg @return */
+static inline odp_packet_seg_t _odp_packet_next_seg(odp_packet_t pkt,
+ odp_packet_seg_t seg)
+{
+ struct rte_mbuf *mb = (struct rte_mbuf *)(uintptr_t)seg;
+ (void)pkt;
+
+ if (mb->next == NULL)
+ return ODP_PACKET_SEG_INVALID;
+ else
+ return (odp_packet_seg_t)(uintptr_t)mb->next;
+}
+
+/** @internal Inline function @param pkt @param offset @param len */
+static inline void _odp_packet_prefetch(odp_packet_t pkt, uint32_t offset, uint32_t len)
+{
+ const char *addr = (char *)_odp_packet_data(pkt) + offset;
+ size_t ofs;
+
+ for (ofs = 0; ofs < len; ofs += RTE_CACHE_LINE_SIZE)
+ rte_prefetch0(addr + ofs);
+}
+
+/* Include inlined versions of API functions */
+#include <odp/api/plat/static_inline.h>
+
+#if ODP_ABI_COMPAT == 0
+
+#include <odp/api/plat/packet_inlines_api.h>
+
+#endif /* ODP_ABI_COMPAT */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ODP_PLAT_PACKET_INLINES_H_ */
diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_inlines_api.h b/platform/linux-dpdk/include/odp/api/plat/packet_inlines_api.h
new file mode 100644
index 000000000..16a445a13
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/packet_inlines_api.h
@@ -0,0 +1,118 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * Packet inline functions
+ */
+
+#ifndef _ODP_PLAT_PACKET_INLINES_API_H_
+#define _ODP_PLAT_PACKET_INLINES_API_H_
+
+_ODP_INLINE void *odp_packet_data(odp_packet_t pkt)
+{
+ return _odp_packet_data(pkt);
+}
+
+_ODP_INLINE uint32_t odp_packet_seg_len(odp_packet_t pkt)
+{
+ return _odp_packet_seg_len(pkt);
+}
+
+_ODP_INLINE uint32_t odp_packet_len(odp_packet_t pkt)
+{
+ return _odp_packet_len(pkt);
+}
+
+_ODP_INLINE uint32_t odp_packet_headroom(odp_packet_t pkt)
+{
+ return _odp_packet_headroom(pkt);
+}
+
+_ODP_INLINE uint32_t odp_packet_tailroom(odp_packet_t pkt)
+{
+ return _odp_packet_tailroom(pkt);
+}
+
+_ODP_INLINE odp_pool_t odp_packet_pool(odp_packet_t pkt)
+{
+ return _odp_packet_pool(pkt);
+}
+
+_ODP_INLINE odp_pktio_t odp_packet_input(odp_packet_t pkt)
+{
+ return _odp_packet_input(pkt);
+}
+
+_ODP_INLINE int odp_packet_num_segs(odp_packet_t pkt)
+{
+ return _odp_packet_num_segs(pkt);
+}
+
+_ODP_INLINE void *odp_packet_user_ptr(odp_packet_t pkt)
+{
+ return _odp_packet_user_ptr(pkt);
+}
+
+_ODP_INLINE void *odp_packet_user_area(odp_packet_t pkt)
+{
+ return _odp_packet_user_area(pkt);
+}
+
+_ODP_INLINE uint32_t odp_packet_user_area_size(odp_packet_t pkt)
+{
+ return _odp_packet_user_area_size(pkt);
+}
+
+_ODP_INLINE uint32_t odp_packet_flow_hash(odp_packet_t pkt)
+{
+ return _odp_packet_flow_hash(pkt);
+}
+
+_ODP_INLINE void odp_packet_flow_hash_set(odp_packet_t pkt, uint32_t flow_hash)
+{
+ return _odp_packet_flow_hash_set(pkt, flow_hash);
+}
+
+_ODP_INLINE odp_time_t odp_packet_ts(odp_packet_t pkt)
+{
+ return _odp_packet_ts(pkt);
+}
+
+_ODP_INLINE void *odp_packet_head(odp_packet_t pkt)
+{
+ return _odp_packet_head(pkt);
+}
+
+_ODP_INLINE int odp_packet_is_segmented(odp_packet_t pkt)
+{
+ return _odp_packet_is_segmented(pkt);
+}
+
+_ODP_INLINE odp_packet_seg_t odp_packet_first_seg(odp_packet_t pkt)
+{
+ return _odp_packet_first_seg(pkt);
+}
+
+_ODP_INLINE odp_packet_seg_t odp_packet_last_seg(odp_packet_t pkt)
+{
+ return _odp_packet_last_seg(pkt);
+}
+
+_ODP_INLINE odp_packet_seg_t odp_packet_next_seg(odp_packet_t pkt,
+ odp_packet_seg_t seg)
+{
+ return _odp_packet_next_seg(pkt, seg);
+}
+
+_ODP_INLINE void odp_packet_prefetch(odp_packet_t pkt, uint32_t offset,
+ uint32_t len)
+{
+ return _odp_packet_prefetch(pkt, offset, len);
+}
+
+#endif
diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_io_types.h b/platform/linux-dpdk/include/odp/api/plat/packet_io_types.h
new file mode 120000
index 000000000..9ff4d49da
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/packet_io_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/packet_io_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_types.h b/platform/linux-dpdk/include/odp/api/plat/packet_types.h
new file mode 100644
index 000000000..5df0a41ec
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/packet_types.h
@@ -0,0 +1,149 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP packet descriptor
+ */
+
+#ifndef ODP_PACKET_TYPES_H_
+#define ODP_PACKET_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stddef.h>
+
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 1
+#include <odp/api/abi/packet.h>
+#else
+
+#include <odp/api/std_types.h>
+#include <odp/api/plat/strong_types.h>
+
+/** @ingroup odp_packet
+ * @{
+ */
+
+typedef ODP_HANDLE_T(odp_packet_t);
+
+#define ODP_PACKET_INVALID _odp_cast_scalar(odp_packet_t, NULL)
+
+#define ODP_PACKET_OFFSET_INVALID (0x0fffffff)
+
+typedef ODP_HANDLE_T(odp_packet_seg_t);
+
+#define ODP_PACKET_SEG_INVALID _odp_cast_scalar(odp_packet_seg_t, NULL)
+
+typedef enum {
+ ODP_PACKET_GREEN = 0,
+ ODP_PACKET_YELLOW = 1,
+ ODP_PACKET_RED = 2,
+ ODP_PACKET_ALL_COLORS = 3,
+} odp_packet_color_t;
+
+#define ODP_NUM_PACKET_COLORS 3
+
+/**
+ * @}
+ */
+
+#endif
+
+/** @internal Packet header field offsets for inline functions */
+typedef struct _odp_packet_inline_offset_t {
+ /** @internal field offset */
+ size_t mb;
+ /** @internal field offset */
+ size_t pool;
+ /** @internal field offset */
+ size_t input;
+ /** @internal field offset */
+ size_t user_ptr;
+ /** @internal field offset */
+ size_t timestamp;
+ /** @internal field offset */
+ size_t input_flags;
+ /** @internal field offset */
+ unsigned int buf_addr;
+ /** @internal field offset */
+ unsigned int data;
+ /** @internal field offset */
+ unsigned int pkt_len;
+ /** @internal field offset */
+ unsigned int seg_len;
+ /** @internal field offset */
+ unsigned int nb_segs;
+ /** @internal field offset */
+ unsigned int udata_len;
+ /** @internal field offset */
+ unsigned int udata;
+ /** @internal field offset */
+ unsigned int rss;
+ /** @internal field offset */
+ unsigned int ol_flags;
+ /** @internal field offset */
+ uint64_t rss_flag;
+
+} _odp_packet_inline_offset_t;
+
+/** @internal Packet input & protocol flags */
+typedef union {
+ /** All input flags */
+ uint64_t all;
+
+ /** Individual input flags */
+ struct {
+ uint64_t dst_queue:1; /**< Dst queue present */
+
+ uint64_t timestamp:1; /**< Timestamp present */
+
+ uint64_t l2:1; /**< known L2 protocol present */
+ uint64_t l3:1; /**< known L3 protocol present */
+ uint64_t l4:1; /**< known L4 protocol present */
+
+ uint64_t eth:1; /**< Ethernet */
+ uint64_t eth_bcast:1; /**< Ethernet broadcast */
+ uint64_t eth_mcast:1; /**< Ethernet multicast */
+ uint64_t jumbo:1; /**< Jumbo frame */
+ uint64_t vlan:1; /**< VLAN hdr found */
+ uint64_t vlan_qinq:1; /**< Stacked VLAN found, QinQ */
+
+ uint64_t snap:1; /**< SNAP */
+ uint64_t arp:1; /**< ARP */
+
+ uint64_t ipv4:1; /**< IPv4 */
+ uint64_t ipv6:1; /**< IPv6 */
+ uint64_t ip_bcast:1; /**< IP broadcast */
+ uint64_t ip_mcast:1; /**< IP multicast */
+ uint64_t ipfrag:1; /**< IP fragment */
+ uint64_t ipopt:1; /**< IP optional headers */
+
+ uint64_t ipsec:1; /**< IPSec packet. Required by the
+ odp_packet_has_ipsec_set() func. */
+ uint64_t ipsec_ah:1; /**< IPSec authentication header */
+ uint64_t ipsec_esp:1; /**< IPSec encapsulating security
+ payload */
+ uint64_t udp:1; /**< UDP */
+ uint64_t tcp:1; /**< TCP */
+ uint64_t tcpopt:1; /**< TCP options present */
+ uint64_t sctp:1; /**< SCTP */
+ uint64_t icmp:1; /**< ICMP */
+
+ uint64_t color:2; /**< Packet color for traffic mgmt */
+ uint64_t nodrop:1; /**< Drop eligibility status */
+ };
+} _odp_packet_input_flags_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp/api/plat/pool_types.h b/platform/linux-dpdk/include/odp/api/plat/pool_types.h
new file mode 120000
index 000000000..1ea2b43b4
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/pool_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/pool_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/queue_types.h b/platform/linux-dpdk/include/odp/api/plat/queue_types.h
new file mode 120000
index 000000000..a47d16b0d
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/queue_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/queue_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/rwlock_recursive_types.h b/platform/linux-dpdk/include/odp/api/plat/rwlock_recursive_types.h
new file mode 120000
index 000000000..516efcdd8
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/rwlock_recursive_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/rwlock_recursive_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/rwlock_types.h b/platform/linux-dpdk/include/odp/api/plat/rwlock_types.h
new file mode 120000
index 000000000..286e6ea88
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/rwlock_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/rwlock_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/schedule_types.h b/platform/linux-dpdk/include/odp/api/plat/schedule_types.h
new file mode 120000
index 000000000..8d6af9b3f
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/schedule_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/schedule_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/shared_memory_types.h b/platform/linux-dpdk/include/odp/api/plat/shared_memory_types.h
new file mode 120000
index 000000000..936573e48
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/shared_memory_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/shared_memory_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/spinlock_recursive_types.h b/platform/linux-dpdk/include/odp/api/plat/spinlock_recursive_types.h
new file mode 120000
index 000000000..6c7dc4683
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/spinlock_recursive_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/spinlock_recursive_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/spinlock_types.h b/platform/linux-dpdk/include/odp/api/plat/spinlock_types.h
new file mode 120000
index 000000000..30ef7c85a
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/spinlock_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/static_inline.h.in b/platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
new file mode 100644
index 000000000..3cf004347
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
@@ -0,0 +1,43 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * Macro for static inline functions
+ */
+
+#ifndef ODP_PLAT_STATIC_INLINE_H_
+#define ODP_PLAT_STATIC_INLINE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @internal
+ * @def ODP_ABI_COMPAT
+ * Control ABI compatibility
+ */
+
+/**
+ * @internal
+ * @def _ODP_INLINE
+ * Define a function as inlined or not inlined (for ABI compatibility)
+ */
+#if @ODP_ABI_COMPAT@
+#define ODP_ABI_COMPAT 1
+#define _ODP_INLINE
+#else
+#define ODP_ABI_COMPAT 0
+#define _ODP_INLINE static inline
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp/api/plat/std_clib_inlines.h b/platform/linux-dpdk/include/odp/api/plat/std_clib_inlines.h
new file mode 100644
index 000000000..b305fe8a2
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/std_clib_inlines.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_PLAT_STD_CLIB_INLINE_H_
+#define ODP_PLAT_STD_CLIB_INLINE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/spec/std_types.h>
+#include <string.h>
+
+extern void* (*const dpdk_memcpy)(void*, const void*, size_t);
+
+_ODP_INLINE void *odp_memcpy(void *dst, const void *src, size_t num)
+{
+ return (*dpdk_memcpy)(dst, src, num);
+}
+
+_ODP_INLINE void *odp_memset(void *ptr, int value, size_t num)
+{
+ return memset(ptr, value, num);
+}
+
+_ODP_INLINE int odp_memcmp(const void *ptr1, const void *ptr2, size_t num)
+{
+ return memcmp(ptr1, ptr2, num);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp/api/plat/strong_types.h b/platform/linux-dpdk/include/odp/api/plat/strong_types.h
new file mode 120000
index 000000000..fe8d65176
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/strong_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/strong_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/sync_inlines.h b/platform/linux-dpdk/include/odp/api/plat/sync_inlines.h
new file mode 120000
index 000000000..1225fd384
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/sync_inlines.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/sync_inlines.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/thread_types.h b/platform/linux-dpdk/include/odp/api/plat/thread_types.h
new file mode 120000
index 000000000..a05d87900
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/thread_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/thread_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/thrmask_types.h b/platform/linux-dpdk/include/odp/api/plat/thrmask_types.h
new file mode 120000
index 000000000..bf40ebb5b
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/thrmask_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/thrmask_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/ticketlock_inlines.h b/platform/linux-dpdk/include/odp/api/plat/ticketlock_inlines.h
new file mode 120000
index 000000000..eebea5f64
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/ticketlock_inlines.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/ticketlock_inlines.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/ticketlock_inlines_api.h b/platform/linux-dpdk/include/odp/api/plat/ticketlock_inlines_api.h
new file mode 120000
index 000000000..63c076049
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/ticketlock_inlines_api.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/ticketlock_inlines_api.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/ticketlock_types.h b/platform/linux-dpdk/include/odp/api/plat/ticketlock_types.h
new file mode 120000
index 000000000..885299b93
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/ticketlock_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/ticketlock_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/time_types.h b/platform/linux-dpdk/include/odp/api/plat/time_types.h
new file mode 120000
index 000000000..b42bc83c2
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/time_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/time_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/timer_types.h b/platform/linux-dpdk/include/odp/api/plat/timer_types.h
new file mode 100644
index 000000000..8821bed60
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/timer_types.h
@@ -0,0 +1,51 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP timer service
+ */
+
+#ifndef ODP_TIMER_TYPES_H_
+#define ODP_TIMER_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/plat/strong_types.h>
+
+/** @addtogroup odp_timer
+ * @{
+ **/
+
+struct odp_timer_pool_s; /**< Forward declaration */
+
+typedef struct odp_timer_pool_s *odp_timer_pool_t;
+
+#define ODP_TIMER_POOL_INVALID NULL
+
+#define ODP_TIMER_POOL_NAME_LEN 32
+
+typedef ODP_HANDLE_T(odp_timer_t);
+
+#define ODP_TIMER_INVALID _odp_cast_scalar(odp_timer_t, 0xffffffff)
+
+typedef ODP_HANDLE_T(odp_timeout_t);
+
+#define ODP_TIMEOUT_INVALID _odp_cast_scalar(odp_timeout_t, 0xffffffff)
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp/api/plat/traffic_mngr_types.h b/platform/linux-dpdk/include/odp/api/plat/traffic_mngr_types.h
new file mode 120000
index 000000000..708f8ae56
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/traffic_mngr_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/traffic_mngr_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/version_types.h b/platform/linux-dpdk/include/odp/api/plat/version_types.h
new file mode 120000
index 000000000..5c41e4611
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/version_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/version_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/pool.h b/platform/linux-dpdk/include/odp/api/pool.h
new file mode 120000
index 000000000..dc61addfc
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/pool.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/pool.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/queue.h b/platform/linux-dpdk/include/odp/api/queue.h
new file mode 120000
index 000000000..de33df69d
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/queue.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/queue.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/random.h b/platform/linux-dpdk/include/odp/api/random.h
new file mode 120000
index 000000000..f686acb80
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/random.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/random.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/rwlock.h b/platform/linux-dpdk/include/odp/api/rwlock.h
new file mode 120000
index 000000000..8730e75e4
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/rwlock.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/rwlock.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/rwlock_recursive.h b/platform/linux-dpdk/include/odp/api/rwlock_recursive.h
new file mode 120000
index 000000000..7e8ef995d
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/rwlock_recursive.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/rwlock_recursive.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/schedule.h b/platform/linux-dpdk/include/odp/api/schedule.h
new file mode 120000
index 000000000..144acd72b
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/schedule.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/schedule.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/schedule_types.h b/platform/linux-dpdk/include/odp/api/schedule_types.h
new file mode 120000
index 000000000..4fcc59073
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/schedule_types.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/schedule_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/shared_memory.h b/platform/linux-dpdk/include/odp/api/shared_memory.h
new file mode 120000
index 000000000..2f79b2769
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/shared_memory.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/shared_memory.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/spinlock.h b/platform/linux-dpdk/include/odp/api/spinlock.h
new file mode 120000
index 000000000..276271a1d
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/spinlock.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/spinlock.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/spinlock_recursive.h b/platform/linux-dpdk/include/odp/api/spinlock_recursive.h
new file mode 120000
index 000000000..b738f8b13
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/spinlock_recursive.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/spinlock_recursive.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/std_clib.h b/platform/linux-dpdk/include/odp/api/std_clib.h
new file mode 100644
index 000000000..fea472543
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/std_clib.h
@@ -0,0 +1,28 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_PLAT_STD_CLIB_H_
+#define ODP_PLAT_STD_CLIB_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/spec/std_types.h>
+#include <string.h>
+
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 0
+#include <odp/api/plat/std_clib_inlines.h>
+#endif
+
+#include <odp/api/spec/std_clib.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp/api/std_types.h b/platform/linux-dpdk/include/odp/api/std_types.h
new file mode 120000
index 000000000..2cc6bb77b
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/std_types.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/std_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/sync.h b/platform/linux-dpdk/include/odp/api/sync.h
new file mode 120000
index 000000000..06b6852ff
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/sync.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/sync.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/system_info.h b/platform/linux-dpdk/include/odp/api/system_info.h
new file mode 120000
index 000000000..ce04866eb
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/system_info.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/system_info.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/thread.h b/platform/linux-dpdk/include/odp/api/thread.h
new file mode 120000
index 000000000..f3f731ed1
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/thread.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/thread.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/thrmask.h b/platform/linux-dpdk/include/odp/api/thrmask.h
new file mode 120000
index 000000000..709adaaf7
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/thrmask.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/thrmask.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/ticketlock.h b/platform/linux-dpdk/include/odp/api/ticketlock.h
new file mode 120000
index 000000000..a8a5d832f
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/ticketlock.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/ticketlock.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/time.h b/platform/linux-dpdk/include/odp/api/time.h
new file mode 120000
index 000000000..c0743d883
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/time.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/time.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/timer.h b/platform/linux-dpdk/include/odp/api/timer.h
new file mode 120000
index 000000000..c81bfbed9
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/timer.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/timer.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/traffic_mngr.h b/platform/linux-dpdk/include/odp/api/traffic_mngr.h
new file mode 120000
index 000000000..e9faa26d8
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/traffic_mngr.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/traffic_mngr.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/version.h b/platform/linux-dpdk/include/odp/api/version.h
new file mode 120000
index 000000000..da44655a4
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/version.h
@@ -0,0 +1 @@
+../../../../linux-generic/include/odp/api/version.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/drv b/platform/linux-dpdk/include/odp/drv
new file mode 120000
index 000000000..cdf2348ba
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/drv
@@ -0,0 +1 @@
+../../../linux-generic/include/odp/drv \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/visibility_begin.h b/platform/linux-dpdk/include/odp/visibility_begin.h
new file mode 120000
index 000000000..1ee971179
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/visibility_begin.h
@@ -0,0 +1 @@
+../../../linux-generic/include/odp/visibility_begin.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/visibility_end.h b/platform/linux-dpdk/include/odp/visibility_end.h
new file mode 120000
index 000000000..9628087c9
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/visibility_end.h
@@ -0,0 +1 @@
+../../../linux-generic/include/odp/visibility_end.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp_buffer_inlines.h b/platform/linux-dpdk/include/odp_buffer_inlines.h
new file mode 100644
index 000000000..c481390be
--- /dev/null
+++ b/platform/linux-dpdk/include/odp_buffer_inlines.h
@@ -0,0 +1,46 @@
+/* Copyright (c) 2014, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * Inline functions for ODP buffer mgmt routines - implementation internal
+ */
+
+#ifndef ODP_BUFFER_INLINES_H_
+#define ODP_BUFFER_INLINES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp_buffer_internal.h>
+
+static inline odp_buffer_t odp_hdr_to_buf(odp_buffer_hdr_t *hdr)
+{
+ return (odp_buffer_t)hdr;
+}
+
+static inline odp_buffer_hdr_t *buf_hdl_to_hdr(odp_buffer_t buf)
+{
+ return (odp_buffer_hdr_t *)(void *)buf;
+}
+
+static inline odp_event_type_t _odp_buffer_event_type(odp_buffer_t buf)
+{
+ return buf_hdl_to_hdr(buf)->event_type;
+}
+
+static inline void _odp_buffer_event_type_set(odp_buffer_t buf, int ev)
+{
+ buf_hdl_to_hdr(buf)->event_type = ev;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp_buffer_internal.h b/platform/linux-dpdk/include/odp_buffer_internal.h
new file mode 100644
index 000000000..b33a30da1
--- /dev/null
+++ b/platform/linux-dpdk/include/odp_buffer_internal.h
@@ -0,0 +1,116 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP buffer descriptor - implementation internal
+ */
+
+#ifndef ODP_BUFFER_INTERNAL_H_
+#define ODP_BUFFER_INTERNAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/std_types.h>
+#include <odp/api/atomic.h>
+#include <odp/api/pool.h>
+#include <odp/api/buffer.h>
+#include <odp/api/debug.h>
+#include <odp/api/align.h>
+#include <odp_align_internal.h>
+#include <odp_config_internal.h>
+#include <odp/api/byteorder.h>
+#include <odp/api/thread.h>
+#include <sys/types.h>
+#include <odp/api/event.h>
+#include <odp_forward_typedefs_internal.h>
+#include <odp_schedule_if.h>
+#include <stddef.h>
+
+/* DPDK */
+#include <rte_mbuf.h>
+
+ODP_STATIC_ASSERT(CONFIG_PACKET_SEG_LEN_MIN >= 256,
+ "ODP Segment size must be a minimum of 256 bytes");
+
+ODP_STATIC_ASSERT(CONFIG_PACKET_MAX_SEGS < 256,
+ "Maximum of 255 segments supported");
+
+typedef union odp_buffer_bits_t {
+ odp_buffer_t handle;
+} odp_buffer_bits_t;
+
+#define BUFFER_BURST_SIZE CONFIG_BURST_SIZE
+
+struct odp_buffer_hdr_t {
+ /* Underlying DPDK rte_mbuf */
+ struct rte_mbuf mb;
+ /* Handle union */
+ odp_buffer_bits_t handle;
+
+ /* ODP buffer type, not DPDK buf type */
+ int type;
+
+ /* Burst counts */
+ int burst_num;
+ int burst_first;
+
+ /* Next buf in a list */
+ struct odp_buffer_hdr_t *next;
+
+ /* User context pointer or u64 */
+ union {
+ uint64_t buf_u64;
+ void *buf_ctx;
+ const void *buf_cctx; /* const alias for ctx */
+ };
+
+ /* Event type. Maybe different than pool type (crypto compl event) */
+ odp_event_type_t event_type;
+
+ /* Burst table */
+ struct odp_buffer_hdr_t *burst[BUFFER_BURST_SIZE];
+
+ /* Pool handle */
+ odp_pool_t pool_hdl;
+
+ /* Total size of all allocated segs */
+ uint32_t totsize;
+ /* Index in the rte_mempool */
+ uint32_t index;
+};
+
+ODP_STATIC_ASSERT(BUFFER_BURST_SIZE < 256, "BUFFER_BURST_SIZE_TOO_LARGE");
+
+int odp_buffer_snprint(char *str, uint32_t n, odp_buffer_t buf);
+
+/*
+ * Buffer type
+ *
+ * @param buf Buffer handle
+ *
+ * @return Buffer type
+ */
+int _odp_buffer_type(odp_buffer_t buf);
+
+/*
+ * Buffer type set
+ *
+ * @param buf Buffer handle
+ * @param type New type value
+ *
+ */
+void _odp_buffer_type_set(odp_buffer_t buf, int type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp_config_internal.h b/platform/linux-dpdk/include/odp_config_internal.h
new file mode 100644
index 000000000..21db09b84
--- /dev/null
+++ b/platform/linux-dpdk/include/odp_config_internal.h
@@ -0,0 +1,139 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_CONFIG_INTERNAL_H_
+#define ODP_CONFIG_INTERNAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Maximum number of pools
+ */
+#define ODP_CONFIG_POOLS 256
+
+/*
+ * Maximum number of queues
+ */
+#define ODP_CONFIG_QUEUES 1024
+
+/*
+ * Maximum number of ordered locks per queue
+ */
+#define CONFIG_QUEUE_MAX_ORD_LOCKS 4
+
+/*
+ * Maximum number of packet IO resources
+ */
+#define ODP_CONFIG_PKTIO_ENTRIES 64
+
+/*
+ * Minimum buffer alignment
+ *
+ * This defines the minimum supported buffer alignment. Requests for values
+ * below this will be rounded up to this value.
+ */
+#define ODP_CONFIG_BUFFER_ALIGN_MIN 16
+
+/*
+ * Maximum buffer alignment
+ *
+ * This defines the maximum supported buffer alignment. Requests for values
+ * above this will fail.
+ */
+#define ODP_CONFIG_BUFFER_ALIGN_MAX (4 * 1024)
+
+/*
+ * Default packet headroom
+ *
+ * This defines the minimum number of headroom bytes that newly created packets
+ * have by default. The default apply to both ODP packet input and user
+ * allocated packets. Implementations may reserve a larger than minimum headroom
+ * size e.g. due to HW or a protocol specific alignment requirement.
+ *
+ * @internal In odp-linux implementation:
+ * The default value (66) allows a 1500-byte packet to be received into a single
+ * segment with Ethernet offset alignment and room for some header expansion.
+ */
+#define CONFIG_PACKET_HEADROOM 128
+
+/*
+ * Default packet tailroom
+ *
+ * This defines the minimum number of tailroom bytes that newly created packets
+ * have by default. The default apply to both ODP packet input and user
+ * allocated packets. Implementations are free to add to this as desired
+ * without restriction. Note that most implementations will automatically
+ * consider any unused portion of the last segment of a packet as tailroom
+ */
+#define CONFIG_PACKET_TAILROOM 0
+
+/*
+ * Maximum number of segments per packet
+ */
+#define CONFIG_PACKET_MAX_SEGS 60
+
+/*
+ * Minimum packet segment length
+ *
+ * This defines the minimum packet segment buffer length in bytes. The user
+ * defined segment length (seg_len in odp_pool_param_t) will be rounded up into
+ * this value.
+ */
+#define CONFIG_PACKET_SEG_LEN_MIN 1024
+
+/*
+ * Maximum packet segment length
+ *
+ * This defines the maximum packet segment buffer length in bytes. The user
+ * defined segment length (seg_len in odp_pool_param_t) must not be larger than
+ * this.
+ */
+#define CONFIG_PACKET_SEG_LEN_MAX (CONFIG_PACKET_MAX_SEGS * \
+ (CONFIG_PACKET_SEG_LEN_MIN - \
+ CONFIG_PACKET_HEADROOM - \
+ CONFIG_PACKET_TAILROOM))
+
+/* Maximum number of shared memory blocks.
+ *
+ * This the the number of separate SHM areas that can be reserved concurrently
+ */
+#define ODP_CONFIG_SHM_BLOCKS (ODP_CONFIG_POOLS + 48)
+
+/*
+ * Maximum event burst size
+ *
+ * This controls the burst size on various enqueue, dequeue, etc calls. Large
+ * burst size improves throughput, but may degrade QoS (increase latency).
+ */
+#define CONFIG_BURST_SIZE 16
+
+/*
+ * Maximum number of events in a pool
+ */
+#define CONFIG_POOL_MAX_NUM (1 * 1024 * 1024)
+
+/*
+ * Maximum number of events in a thread local pool cache
+ */
+#define CONFIG_POOL_CACHE_SIZE 256
+
+/*
+ * Size of the virtual address space pre-reserver for ISHM
+ *
+ * This is just virtual space preallocation size, not memory allocation.
+ * This address space is used by ISHM to map things at a common address in
+ * all ODP threads (when the _ODP_ISHM_SINGLE_VA flag is used).
+ * In bytes.
+ */
+#define ODP_CONFIG_ISHM_VA_PREALLOC_SZ (536870912L)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp_errno_define.h b/platform/linux-dpdk/include/odp_errno_define.h
new file mode 100644
index 000000000..914d41b40
--- /dev/null
+++ b/platform/linux-dpdk/include/odp_errno_define.h
@@ -0,0 +1,4 @@
+
+#include <rte_errno.h>
+
+#define __odp_errno (rte_errno)
diff --git a/platform/linux-dpdk/include/odp_packet_dpdk.h b/platform/linux-dpdk/include/odp_packet_dpdk.h
new file mode 100644
index 000000000..495d5e6f1
--- /dev/null
+++ b/platform/linux-dpdk/include/odp_packet_dpdk.h
@@ -0,0 +1,49 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_PACKET_DPDK_H
+#define ODP_PACKET_DPDK_H
+
+#include <stdint.h>
+#include <net/if.h>
+
+#include <protocols/eth.h>
+#include <odp/api/align.h>
+#include <odp/api/debug.h>
+#include <odp/api/packet.h>
+#include <odp_packet_internal.h>
+#include <odp/api/pool.h>
+#include <odp_pool_internal.h>
+#include <odp_buffer_internal.h>
+#include <odp/api/std_types.h>
+
+#include <rte_config.h>
+#include <rte_memory.h>
+#include <rte_memzone.h>
+#include <rte_launch.h>
+#include <rte_tailq.h>
+#include <rte_eal.h>
+#include <rte_per_lcore.h>
+#include <rte_lcore.h>
+#include <rte_branch_prediction.h>
+#include <rte_prefetch.h>
+#include <rte_cycles.h>
+#include <rte_errno.h>
+#include <rte_debug.h>
+#include <rte_log.h>
+#include <rte_byteorder.h>
+#include <rte_pci.h>
+#include <rte_random.h>
+#include <rte_ether.h>
+#include <rte_ethdev.h>
+#include <rte_hash.h>
+#include <rte_jhash.h>
+#include <rte_hash_crc.h>
+
+#define RTE_TEST_RX_DESC_DEFAULT 128
+#define RTE_TEST_TX_DESC_DEFAULT 512
+
+#endif
diff --git a/platform/linux-dpdk/include/odp_packet_internal.h b/platform/linux-dpdk/include/odp_packet_internal.h
new file mode 100644
index 000000000..481e4afb1
--- /dev/null
+++ b/platform/linux-dpdk/include/odp_packet_internal.h
@@ -0,0 +1,239 @@
+/* Copyright (c) 2014, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP packet descriptor - implementation internal
+ */
+
+#ifndef ODP_PACKET_INTERNAL_H_
+#define ODP_PACKET_INTERNAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/align.h>
+#include <odp_debug_internal.h>
+#include <odp/api/debug.h>
+#include <odp_buffer_internal.h>
+#include <odp_buffer_inlines.h>
+#include <odp_pool_internal.h>
+#include <odp/api/packet.h>
+#include <odp/api/packet_io.h>
+#include <odp/api/crypto.h>
+#include <odp_crypto_internal.h>
+#include <protocols/eth.h>
+#include <odp/api/plat/packet_types.h>
+
+#include <rte_acl_osdep.h>
+
+/** Minimum segment length expected by packet_parse_common() */
+#define PACKET_PARSE_SEG_LEN 96
+
+ODP_STATIC_ASSERT(sizeof(_odp_packet_input_flags_t) == sizeof(uint64_t),
+ "INPUT_FLAGS_SIZE_ERROR");
+
+/**
+ * Packet error flags
+ */
+typedef union {
+ /* All error flags */
+ uint32_t all;
+
+ struct {
+ /* Bitfield flags for each detected error */
+ uint32_t app_error:1; /**< Error bit for application use */
+ uint32_t frame_len:1; /**< Frame length error */
+ uint32_t snap_len:1; /**< Snap length error */
+ uint32_t l2_chksum:1; /**< L2 checksum error, checks TBD */
+ uint32_t ip_err:1; /**< IP error, checks TBD */
+ uint32_t tcp_err:1; /**< TCP error, checks TBD */
+ uint32_t udp_err:1; /**< UDP error, checks TBD */
+ };
+} error_flags_t;
+
+ODP_STATIC_ASSERT(sizeof(error_flags_t) == sizeof(uint32_t),
+ "ERROR_FLAGS_SIZE_ERROR");
+
+/**
+ * Packet output flags
+ */
+typedef union {
+ /* All output flags */
+ uint32_t all;
+
+ struct {
+ /** adjustment for traffic mgr */
+ uint32_t shaper_len_adj:8;
+
+ /* Bitfield flags for each output option */
+ uint32_t l3_chksum_set:1; /**< L3 chksum bit is valid */
+ uint32_t l3_chksum:1; /**< L3 chksum override */
+ uint32_t l4_chksum_set:1; /**< L3 chksum bit is valid */
+ uint32_t l4_chksum:1; /**< L4 chksum override */
+ };
+} output_flags_t;
+
+ODP_STATIC_ASSERT(sizeof(output_flags_t) == sizeof(uint32_t),
+ "OUTPUT_FLAGS_SIZE_ERROR");
+
+/**
+ * Packet parser metadata
+ */
+typedef struct {
+ _odp_packet_input_flags_t input_flags;
+ error_flags_t error_flags;
+ output_flags_t output_flags;
+
+ uint32_t l2_offset; /**< offset to L2 hdr, e.g. Eth */
+ uint32_t l3_offset; /**< offset to L3 hdr, e.g. IPv4, IPv6 */
+ uint32_t l4_offset; /**< offset to L4 hdr (TCP, UDP, SCTP, also ICMP) */
+} packet_parser_t;
+
+/**
+ * Internal Packet header
+ *
+ * To optimize fast path performance this struct is not initialized to zero in
+ * packet_init(). Because of this any new fields added must be reviewed for
+ * initialization requirements.
+ */
+typedef struct {
+ /* common buffer header */
+ odp_buffer_hdr_t buf_hdr;
+
+ /*
+ * Following members are initialized by packet_init()
+ */
+
+ packet_parser_t p;
+
+ odp_pktio_t input;
+
+ /*
+ * Members below are not initialized by packet_init()
+ */
+
+ /* User metadata size, it's right after odp_packet_hdr_t */
+ uint32_t uarea_size;
+
+ /* Timestamp value */
+ odp_time_t timestamp;
+
+ /* Classifier destination queue */
+ odp_queue_t dst_queue;
+
+ /* Result for crypto */
+ odp_crypto_generic_op_result_t op_result;
+} odp_packet_hdr_t __rte_cache_aligned;
+
+/**
+ * Return the packet header
+ */
+static inline odp_packet_hdr_t *odp_packet_hdr(odp_packet_t pkt)
+{
+ return (odp_packet_hdr_t *)(uintptr_t)pkt;
+}
+
+static inline struct rte_mbuf *pkt_to_mbuf(odp_packet_hdr_t *pkt_hdr)
+{
+ return &pkt_hdr->buf_hdr.mb;
+}
+
+static inline void copy_packet_parser_metadata(odp_packet_hdr_t *src_hdr,
+ odp_packet_hdr_t *dst_hdr)
+{
+ dst_hdr->p = src_hdr->p;
+}
+
+static inline void copy_packet_cls_metadata(odp_packet_hdr_t *src_hdr,
+ odp_packet_hdr_t *dst_hdr)
+{
+ dst_hdr->p = src_hdr->p;
+ dst_hdr->dst_queue = src_hdr->dst_queue;
+ dst_hdr->timestamp = src_hdr->timestamp;
+ dst_hdr->op_result = src_hdr->op_result;
+}
+
+static inline uint32_t packet_len(odp_packet_hdr_t *pkt_hdr)
+{
+ return rte_pktmbuf_pkt_len(&pkt_hdr->buf_hdr.mb);
+}
+
+static inline void packet_set_len(odp_packet_hdr_t *pkt_hdr, uint32_t len)
+{
+ rte_pktmbuf_pkt_len(&pkt_hdr->buf_hdr.mb) = len;
+}
+
+/* Forward declarations */
+int _odp_packet_copy_md_to_packet(odp_packet_t srcpkt, odp_packet_t dstpkt);
+
+/* Perform packet parse up to a given protocol layer */
+int packet_parse_layer(odp_packet_hdr_t *pkt_hdr,
+ odp_pktio_parser_layer_t layer);
+
+/* Reset parser metadata for a new parse */
+static inline void packet_parse_reset(odp_packet_hdr_t *pkt_hdr)
+{
+ /* Reset parser metadata before new parse */
+ pkt_hdr->p.error_flags.all = 0;
+ pkt_hdr->p.input_flags.all = 0;
+ pkt_hdr->p.output_flags.all = 0;
+ pkt_hdr->p.l2_offset = 0;
+ pkt_hdr->p.l3_offset = ODP_PACKET_OFFSET_INVALID;
+ pkt_hdr->p.l4_offset = ODP_PACKET_OFFSET_INVALID;
+}
+
+/* Convert a packet handle to a buffer handle */
+odp_buffer_t _odp_packet_to_buffer(odp_packet_t pkt);
+
+/* Convert a buffer handle to a packet handle */
+odp_packet_t _odp_packet_from_buffer(odp_buffer_t buf);
+
+static inline int packet_hdr_has_l2(odp_packet_hdr_t *pkt_hdr)
+{
+ return pkt_hdr->p.input_flags.l2;
+}
+
+static inline void packet_hdr_has_l2_set(odp_packet_hdr_t *pkt_hdr, int val)
+{
+ pkt_hdr->p.input_flags.l2 = val;
+}
+
+static inline int packet_hdr_has_eth(odp_packet_hdr_t *pkt_hdr)
+{
+ return pkt_hdr->p.input_flags.eth;
+}
+
+static inline int packet_hdr_has_ipv6(odp_packet_hdr_t *pkt_hdr)
+{
+ return pkt_hdr->p.input_flags.ipv6;
+}
+
+static inline void packet_set_ts(odp_packet_hdr_t *pkt_hdr, odp_time_t *ts)
+{
+ if (ts != NULL) {
+ pkt_hdr->timestamp = *ts;
+ pkt_hdr->p.input_flags.timestamp = 1;
+ }
+}
+
+int packet_parse_common(packet_parser_t *pkt_hdr, const uint8_t *ptr,
+ uint32_t pkt_len, uint32_t seg_len,
+ odp_pktio_parser_layer_t layer);
+
+
+/* We can't enforce tailroom reservation for received packets */
+ODP_STATIC_ASSERT(CONFIG_PACKET_TAILROOM == 0,
+ "ERROR: Tailroom has to be 0, DPDK doesn't support this");
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp_packet_io_internal.h b/platform/linux-dpdk/include/odp_packet_io_internal.h
new file mode 100644
index 000000000..9dc420c4b
--- /dev/null
+++ b/platform/linux-dpdk/include/odp_packet_io_internal.h
@@ -0,0 +1,214 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP packet IO - implementation internal
+ */
+
+#ifndef ODP_PACKET_IO_INTERNAL_H_
+#define ODP_PACKET_IO_INTERNAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/spinlock.h>
+#include <odp/api/ticketlock.h>
+#include <odp_classification_datamodel.h>
+#include <odp_align_internal.h>
+#include <odp_debug_internal.h>
+
+#include <odp_config_internal.h>
+#include <odp/api/hints.h>
+
+#define PKTIO_MAX_QUEUES 64
+#include <linux/if_ether.h>
+#include <odp_packet_dpdk.h>
+
+#define PKTIO_NAME_LEN 256
+
+#define PKTIN_INVALID ((odp_pktin_queue_t) {ODP_PKTIO_INVALID, 0})
+#define PKTOUT_INVALID ((odp_pktout_queue_t) {ODP_PKTIO_INVALID, 0})
+
+/* Forward declaration */
+struct pktio_if_ops;
+struct pkt_dpdk_t;
+
+typedef struct {
+ odp_queue_t loopq; /**< loopback queue for "loop" device */
+ odp_bool_t promisc; /**< promiscuous mode state */
+} pkt_loop_t;
+
+/** Packet socket using dpdk mmaped rings for both Rx and Tx */
+typedef struct {
+ odp_pktio_capability_t capa; /**< interface capabilities */
+
+ /********************************/
+ char ifname[32];
+ uint8_t min_rx_burst;
+ uint8_t portid;
+ odp_bool_t vdev_sysc_promisc; /**< promiscuous mode defined with
+ system call */
+ odp_pktin_hash_proto_t hash; /**< Packet input hash protocol */
+ odp_bool_t lockless_rx; /**< no locking for rx */
+ odp_bool_t lockless_tx; /**< no locking for tx */
+ odp_ticketlock_t rx_lock[PKTIO_MAX_QUEUES]; /**< RX queue locks */
+ odp_ticketlock_t tx_lock[PKTIO_MAX_QUEUES]; /**< TX queue locks */
+} pkt_dpdk_t;
+
+struct pktio_entry {
+ const struct pktio_if_ops *ops; /**< Implementation specific methods */
+ /* These two locks together lock the whole pktio device */
+ odp_ticketlock_t rxl; /**< RX ticketlock */
+ odp_ticketlock_t txl; /**< TX ticketlock */
+ int cls_enabled; /**< is classifier enabled */
+ odp_pktio_t handle; /**< pktio handle */
+ union {
+ pkt_loop_t pkt_loop; /**< Using loopback for IO */
+ pkt_dpdk_t pkt_dpdk; /**< using DPDK API for IO */
+ };
+ enum {
+ /* Not allocated */
+ PKTIO_STATE_FREE = 0,
+ /* Close pending on scheduler response. Next state after this
+ * is PKTIO_STATE_FREE. */
+ PKTIO_STATE_CLOSE_PENDING,
+ /* Open in progress.
+ Marker for all active states following under. */
+ PKTIO_STATE_ACTIVE,
+ /* Open completed */
+ PKTIO_STATE_OPENED,
+ /* Start completed */
+ PKTIO_STATE_STARTED,
+ /* Stop pending on scheduler response */
+ PKTIO_STATE_STOP_PENDING,
+ /* Stop completed */
+ PKTIO_STATE_STOPPED
+ } state;
+ odp_pktio_config_t config; /**< Device configuration */
+ classifier_t cls; /**< classifier linked with this pktio*/
+ odp_pktio_stats_t stats; /**< statistic counters for pktio */
+ char name[PKTIO_NAME_LEN]; /**< name of pktio provided to
+ pktio_open() */
+ odp_pool_t pool;
+ odp_pktio_param_t param;
+
+ /* Storage for queue handles
+ * Multi-queue support is pktio driver specific */
+ unsigned num_in_queue;
+ unsigned num_out_queue;
+
+ struct {
+ odp_queue_t queue;
+ odp_pktin_queue_t pktin;
+ } in_queue[PKTIO_MAX_QUEUES];
+
+ struct {
+ odp_queue_t queue;
+ odp_pktout_queue_t pktout;
+ } out_queue[PKTIO_MAX_QUEUES];
+};
+
+typedef union {
+ struct pktio_entry s;
+ uint8_t pad[ROUNDUP_CACHE_LINE(sizeof(struct pktio_entry))];
+} pktio_entry_t;
+
+typedef struct {
+ odp_spinlock_t lock;
+ pktio_entry_t entries[ODP_CONFIG_PKTIO_ENTRIES];
+} pktio_table_t;
+
+typedef struct pktio_if_ops {
+ const char *name;
+ void (*print)(pktio_entry_t *pktio_entry);
+ int (*init_global)(void);
+ int (*init_local)(void);
+ int (*term)(void);
+ int (*open)(odp_pktio_t pktio, pktio_entry_t *pktio_entry,
+ const char *devname, odp_pool_t pool);
+ int (*close)(pktio_entry_t *pktio_entry);
+ int (*start)(pktio_entry_t *pktio_entry);
+ int (*stop)(pktio_entry_t *pktio_entry);
+ int (*stats)(pktio_entry_t *pktio_entry, odp_pktio_stats_t *stats);
+ int (*stats_reset)(pktio_entry_t *pktio_entry);
+ uint64_t (*pktin_ts_res)(pktio_entry_t *pktio_entry);
+ odp_time_t (*pktin_ts_from_ns)(pktio_entry_t *pktio_entry, uint64_t ns);
+ int (*recv)(pktio_entry_t *entry, int index, odp_packet_t packets[],
+ int num);
+ int (*send)(pktio_entry_t *entry, int index,
+ const odp_packet_t packets[], int num);
+ uint32_t (*mtu_get)(pktio_entry_t *pktio_entry);
+ int (*promisc_mode_set)(pktio_entry_t *pktio_entry, int enable);
+ int (*promisc_mode_get)(pktio_entry_t *pktio_entry);
+ int (*mac_get)(pktio_entry_t *pktio_entry, void *mac_addr);
+ int (*link_status)(pktio_entry_t *pktio_entry);
+ int (*capability)(pktio_entry_t *pktio_entry,
+ odp_pktio_capability_t *capa);
+ int (*config)(pktio_entry_t *pktio_entry,
+ const odp_pktio_config_t *config);
+ int (*input_queues_config)(pktio_entry_t *pktio_entry,
+ const odp_pktin_queue_param_t *param);
+ int (*output_queues_config)(pktio_entry_t *pktio_entry,
+ const odp_pktout_queue_param_t *p);
+} pktio_if_ops_t;
+
+extern void *pktio_entry_ptr[];
+
+static inline int pktio_to_id(odp_pktio_t pktio)
+{
+ return _odp_typeval(pktio) - 1;
+}
+
+static inline pktio_entry_t *get_pktio_entry(odp_pktio_t pktio)
+{
+ if (odp_unlikely(pktio == ODP_PKTIO_INVALID))
+ return NULL;
+
+ if (odp_unlikely(_odp_typeval(pktio) > ODP_CONFIG_PKTIO_ENTRIES)) {
+ ODP_DBG("pktio limit %d/%d exceed\n",
+ _odp_typeval(pktio), ODP_CONFIG_PKTIO_ENTRIES);
+ return NULL;
+ }
+
+ return pktio_entry_ptr[pktio_to_id(pktio)];
+}
+
+static inline int pktio_cls_enabled(pktio_entry_t *entry)
+{
+ return entry->s.cls_enabled;
+}
+
+static inline void pktio_cls_enabled_set(pktio_entry_t *entry, int ena)
+{
+ entry->s.cls_enabled = ena;
+}
+
+/*
+ * Dummy single queue implementations of multi-queue API
+ */
+int single_capability(odp_pktio_capability_t *capa);
+int single_input_queues_config(pktio_entry_t *entry,
+ const odp_pktin_queue_param_t *param);
+int single_output_queues_config(pktio_entry_t *entry,
+ const odp_pktout_queue_param_t *param);
+int single_recv_queue(pktio_entry_t *entry, int index, odp_packet_t packets[],
+ int num);
+int single_send_queue(pktio_entry_t *entry, int index,
+ const odp_packet_t packets[], int num);
+
+extern const pktio_if_ops_t loopback_pktio_ops;
+extern const pktio_if_ops_t dpdk_pktio_ops;
+extern const pktio_if_ops_t * const pktio_if_ops[];
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-dpdk/include/odp_pool_internal.h b/platform/linux-dpdk/include/odp_pool_internal.h
new file mode 100644
index 000000000..0c157592c
--- /dev/null
+++ b/platform/linux-dpdk/include/odp_pool_internal.h
@@ -0,0 +1,95 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP buffer pool - internal header
+ */
+
+#ifndef ODP_POOL_INTERNAL_H_
+#define ODP_POOL_INTERNAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/std_types.h>
+#include <odp/api/pool.h>
+#include <odp_buffer_internal.h>
+#include <odp/api/packet_io.h>
+#include <odp/api/align.h>
+#include <odp/api/hints.h>
+#include <odp_config_internal.h>
+#include <odp/api/debug.h>
+#include <odp_debug_internal.h>
+#include <odp/api/plat/strong_types.h>
+#include <string.h>
+
+/* for DPDK */
+#include <rte_mempool.h>
+
+/* Use ticketlock instead of spinlock */
+#define POOL_USE_TICKETLOCK
+
+/* Extra error checks */
+/* #define POOL_ERROR_CHECK */
+
+
+#ifdef POOL_USE_TICKETLOCK
+#include <odp/api/ticketlock.h>
+#else
+#include <odp/api/spinlock.h>
+#endif
+
+
+struct pool_entry_s {
+#ifdef POOL_USE_TICKETLOCK
+ odp_ticketlock_t lock ODP_ALIGNED_CACHE;
+#else
+ odp_spinlock_t lock ODP_ALIGNED_CACHE;
+#endif
+ char name[ODP_POOL_NAME_LEN];
+ odp_pool_param_t params;
+ odp_pool_t pool_hdl;
+ struct rte_mempool *rte_mempool;
+};
+
+typedef union pool_entry_u {
+ struct pool_entry_s s;
+
+ uint8_t pad[ROUNDUP_CACHE_LINE(sizeof(struct pool_entry_s))];
+
+} pool_entry_t;
+
+extern void *pool_entry_ptr[];
+
+static inline uint32_t pool_handle_to_index(odp_pool_t pool_hdl)
+{
+ return _odp_typeval(pool_hdl);
+}
+
+static inline void *get_pool_entry(uint32_t pool_id)
+{
+ return pool_entry_ptr[pool_id];
+}
+
+static inline pool_entry_t *odp_pool_to_entry(odp_pool_t pool)
+{
+ return (pool_entry_t *)get_pool_entry(pool_handle_to_index(pool));
+}
+
+static inline odp_pool_t pool_index_to_handle(uint32_t pool_id)
+{
+ return _odp_cast_scalar(odp_pool_t, pool_id);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ODP_POOL_INTERNAL_H_ */
diff --git a/platform/linux-dpdk/include/odp_posix_extensions.h b/platform/linux-dpdk/include/odp_posix_extensions.h
new file mode 120000
index 000000000..420e11dd9
--- /dev/null
+++ b/platform/linux-dpdk/include/odp_posix_extensions.h
@@ -0,0 +1 @@
+../../linux-generic/include/odp_posix_extensions.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/protocols b/platform/linux-dpdk/include/protocols
new file mode 120000
index 000000000..39a0a7ad1
--- /dev/null
+++ b/platform/linux-dpdk/include/protocols
@@ -0,0 +1 @@
+../../linux-generic/include/protocols \ No newline at end of file
diff --git a/platform/linux-dpdk/m4/configure.m4 b/platform/linux-dpdk/m4/configure.m4
new file mode 100644
index 000000000..230ef6eff
--- /dev/null
+++ b/platform/linux-dpdk/m4/configure.m4
@@ -0,0 +1,152 @@
+# Enable -fvisibility=hidden if using a gcc that supports it
+OLD_CFLAGS="$CFLAGS"
+AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
+VISIBILITY_CFLAGS="-fvisibility=hidden"
+CFLAGS="$CFLAGS $VISIBILITY_CFLAGS"
+AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
+ [VISIBILITY_CFLAGS=""; AC_MSG_RESULT([no])]);
+
+AC_SUBST(VISIBILITY_CFLAGS)
+# Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed.
+CFLAGS=$OLD_CFLAGS
+
+AC_MSG_CHECKING(for GCC atomic builtins)
+AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [[int main() {
+ int v = 1;
+ __atomic_fetch_add(&v, 1, __ATOMIC_RELAXED);
+ __atomic_fetch_sub(&v, 1, __ATOMIC_RELAXED);
+ __atomic_store_n(&v, 1, __ATOMIC_RELAXED);
+ __atomic_load_n(&v, __ATOMIC_RELAXED);
+ return 0;
+ }
+ ]])],
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ echo "GCC-style __atomic builtins not supported by the compiler."
+ echo "Use newer version. For gcc > 4.7.0"
+ exit -1)
+
+dnl Check whether -latomic is needed
+use_libatomic=no
+
+AC_MSG_CHECKING(whether -latomic is needed for 64-bit atomic built-ins)
+AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([[
+ static int loc;
+ int main(void)
+ {
+ int prev = __atomic_exchange_n(&loc, 7, __ATOMIC_RELAXED);
+ return 0;
+ }
+ ]])],
+ [AC_MSG_RESULT(no)],
+ [AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(
+ [atomic], [__atomic_exchange_8],
+ [use_libatomic=yes],
+ [AC_MSG_CHECKING([__atomic_exchange_8 is not available])])
+ ])
+
+AC_MSG_CHECKING(whether -latomic is needed for 128-bit atomic built-ins)
+AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([[
+ static __int128 loc;
+ int main(void)
+ {
+ __int128 prev;
+ prev = __atomic_exchange_n(&loc, 7, __ATOMIC_RELAXED);
+ return 0;
+ }
+ ]])],
+ [AC_MSG_RESULT(no)],
+ [AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(
+ [atomic], [__atomic_exchange_16],
+ [use_libatomic=yes],
+ [AC_MSG_CHECKING([cannot detect support for 128-bit atomics])])
+ ])
+
+if test "x$use_libatomic" = "xyes"; then
+ ATOMIC_LIBS="-latomic"
+fi
+AC_SUBST([ATOMIC_LIBS])
+
+# linux-generic PCAP support is not relevant as the code doesn't use
+# linux-generic pktio at all. And DPDK has its own PCAP support anyway
+AM_CONDITIONAL([HAVE_PCAP], [false])
+m4_include([platform/linux-dpdk/m4/odp_pthread.m4])
+m4_include([platform/linux-dpdk/m4/odp_openssl.m4])
+
+##########################################################################
+# DPDK build variables
+##########################################################################
+DPDK_DRIVER_DIR=/usr/lib/$(uname -m)-linux-gnu
+AS_CASE($host_cpu, [x86_64], [AM_CPPFLAGS="$AM_CPPFLAGS -msse4.2"])
+if test ${DPDK_DEFAULT_DIR} = 1; then
+ AM_CPPFLAGS="$AM_CPPFLAGS -I/usr/include/dpdk"
+else
+ DPDK_DRIVER_DIR=$SDK_INSTALL_PATH/lib
+ AM_CPPFLAGS="$AM_CPPFLAGS -I$SDK_INSTALL_PATH/include"
+ AM_LDFLAGS="$AM_LDFLAGS -L$SDK_INSTALL_PATH/lib"
+fi
+
+# Check if we should link against the static or dynamic DPDK library
+AC_ARG_ENABLE([shared-dpdk],
+ [ --enable-shared-dpdk link against the shared DPDK library],
+ [if test "x$enableval" = "xyes"; then
+ shared_dpdk=true
+ fi])
+AM_CONDITIONAL([SHARED_DPDK], [test x$shared_dpdk = xtrue])
+
+##########################################################################
+# Save and set temporary compilation flags
+##########################################################################
+OLD_LDFLAGS=$LDFLAGS
+OLD_CPPFLAGS=$CPPFLAGS
+LDFLAGS="$AM_LDFLAGS $LDFLAGS"
+CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
+
+##########################################################################
+# Check for DPDK availability
+##########################################################################
+AC_CHECK_HEADERS([rte_config.h], [],
+ [AC_MSG_FAILURE(["can't find DPDK headers"])])
+
+AC_SEARCH_LIBS([rte_eal_init], [dpdk], [],
+ [AC_MSG_ERROR([DPDK libraries required])], [-ldl])
+
+##########################################################################
+# In case of static linking DPDK pmd drivers are not linked unless the
+# --whole-archive option is used. No spaces are allowed between the
+# --whole-arhive flags.
+##########################################################################
+if test "x$shared_dpdk" = "xtrue"; then
+ LIBS="$LIBS -Wl,--no-as-needed,-ldpdk,-as-needed -ldl -lm -lpcap"
+else
+ DPDK_PMD=--whole-archive,
+ for filename in $DPDK_DRIVER_DIR/*.a; do
+ cur_driver=`echo $(basename "$filename" .a) | \
+ sed -n 's/^\(librte_pmd_\)/-lrte_pmd_/p' | sed -n 's/$/,/p'`
+ # rte_pmd_nfp has external dependencies which break linking
+ if test "$cur_driver" = "-lrte_pmd_nfp,"; then
+ echo "skip linking rte_pmd_nfp"
+ else
+ DPDK_PMD+=$cur_driver
+ fi
+ done
+ DPDK_PMD+=--no-whole-archive
+
+ LIBS="$LIBS -ldpdk -ldl -lm -lpcap"
+ AM_LDFLAGS="$AM_LDFLAGS -Wl,$DPDK_PMD"
+fi
+
+##########################################################################
+# Restore old saved variables
+##########################################################################
+LDFLAGS=$OLD_LDFLAGS
+CPPFLAGS=$OLD_CPPFLAGS
+
+AC_CONFIG_FILES([platform/linux-dpdk/Makefile
+ platform/linux-dpdk/include/odp/api/plat/static_inline.h])
diff --git a/platform/linux-dpdk/m4/odp_openssl.m4 b/platform/linux-dpdk/m4/odp_openssl.m4
new file mode 120000
index 000000000..94939eaa3
--- /dev/null
+++ b/platform/linux-dpdk/m4/odp_openssl.m4
@@ -0,0 +1 @@
+../../linux-generic/m4/odp_openssl.m4 \ No newline at end of file
diff --git a/platform/linux-dpdk/m4/odp_pthread.m4 b/platform/linux-dpdk/m4/odp_pthread.m4
new file mode 120000
index 000000000..e24304ae3
--- /dev/null
+++ b/platform/linux-dpdk/m4/odp_pthread.m4
@@ -0,0 +1 @@
+../../linux-generic/m4/odp_pthread.m4 \ No newline at end of file
diff --git a/platform/linux-dpdk/odp_buffer.c b/platform/linux-dpdk/odp_buffer.c
new file mode 100644
index 000000000..5207f2530
--- /dev/null
+++ b/platform/linux-dpdk/odp_buffer.c
@@ -0,0 +1,108 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/api/buffer.h>
+#include <odp_buffer_internal.h>
+#include <odp_buffer_inlines.h>
+#include <odp_debug_internal.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <inttypes.h>
+
+odp_buffer_t odp_buffer_from_event(odp_event_t ev)
+{
+ return (odp_buffer_t)ev;
+}
+
+odp_event_t odp_buffer_to_event(odp_buffer_t buf)
+{
+ return (odp_event_t)buf;
+}
+
+void *odp_buffer_addr(odp_buffer_t buf)
+{
+ odp_buffer_hdr_t *hdr = buf_hdl_to_hdr(buf);
+
+ return hdr->mb.buf_addr;
+}
+
+uint32_t odp_buffer_size(odp_buffer_t buf)
+{
+ odp_buffer_hdr_t *hdr = buf_hdl_to_hdr(buf);
+ struct rte_mbuf *mbuf = (struct rte_mbuf *)hdr;
+
+ return mbuf->buf_len;
+}
+
+int _odp_buffer_type(odp_buffer_t buf)
+{
+ odp_buffer_hdr_t *hdr = buf_hdl_to_hdr(buf);
+
+ return hdr->type;
+}
+
+void _odp_buffer_type_set(odp_buffer_t buf, int type)
+{
+ odp_buffer_hdr_t *hdr = buf_hdl_to_hdr(buf);
+
+ hdr->type = type;
+}
+
+int odp_buffer_is_valid(odp_buffer_t buf)
+{
+ /* We could call rte_mbuf_sanity_check, but that panics
+ * and aborts the program */
+ return buf != ODP_BUFFER_INVALID;
+}
+
+int odp_buffer_snprint(char *str, uint32_t n, odp_buffer_t buf)
+{
+ odp_buffer_hdr_t *hdr;
+ int len = 0;
+
+ if (!odp_buffer_is_valid(buf)) {
+ ODP_PRINT("Buffer is not valid.\n");
+ return len;
+ }
+
+ hdr = buf_hdl_to_hdr(buf);
+
+ len += snprintf(&str[len], n-len,
+ "Buffer\n");
+ len += snprintf(&str[len], n-len,
+ " pool %p\n", hdr->mb.pool);
+ len += snprintf(&str[len], n-len,
+ " phy_addr %"PRIu64"\n", hdr->mb.buf_physaddr);
+ len += snprintf(&str[len], n-len,
+ " addr %p\n", hdr->mb.buf_addr);
+ len += snprintf(&str[len], n-len,
+ " size %u\n", hdr->mb.buf_len);
+ len += snprintf(&str[len], n-len,
+ " ref_count %i\n",
+ rte_mbuf_refcnt_read(&hdr->mb));
+ len += snprintf(&str[len], n-len,
+ " odp type %i\n", hdr->type);
+
+ return len;
+}
+
+void odp_buffer_print(odp_buffer_t buf)
+{
+ int max_len = 512;
+ char str[max_len];
+ int len;
+
+ len = odp_buffer_snprint(str, max_len-1, buf);
+ str[len] = 0;
+
+ ODP_PRINT("\n%s\n", str);
+}
+
+uint64_t odp_buffer_to_u64(odp_buffer_t hdl)
+{
+ return _odp_pri(hdl);
+}
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c
new file mode 100644
index 000000000..d95b15780
--- /dev/null
+++ b/platform/linux-dpdk/odp_crypto.c
@@ -0,0 +1,1290 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/api/crypto.h>
+#include <odp_internal.h>
+#include <odp/api/atomic.h>
+#include <odp/api/spinlock.h>
+#include <odp/api/sync.h>
+#include <odp/api/debug.h>
+#include <odp/api/align.h>
+#include <odp/api/shared_memory.h>
+#include <odp_crypto_internal.h>
+#include <odp_debug_internal.h>
+#include <odp/api/hints.h>
+#include <odp/api/random.h>
+#include <odp_packet_internal.h>
+#include <rte_crypto.h>
+#include <rte_cryptodev.h>
+
+#include <string.h>
+#include <math.h>
+
+#include <openssl/rand.h>
+
+/* default number supported by DPDK crypto */
+#define MAX_SESSIONS 2048
+#define NB_MBUF 8192
+
+typedef struct crypto_session_entry_s crypto_session_entry_t;
+struct crypto_session_entry_s {
+ struct crypto_session_entry_s *next;
+ uint64_t rte_session;
+ odp_bool_t do_cipher_first;
+ struct rte_crypto_sym_xform cipher_xform;
+ struct rte_crypto_sym_xform auth_xform;
+ struct {
+ uint8_t *data;
+ uint16_t length;
+ } iv;
+ odp_queue_t compl_queue; /**< Async mode completion
+ event queue */
+ odp_pool_t output_pool; /**< Output buffer pool */
+};
+
+struct crypto_global_s {
+ odp_spinlock_t lock;
+ uint8_t enabled_crypto_devs;
+ uint8_t enabled_crypto_dev_ids[RTE_CRYPTO_MAX_DEVS];
+ crypto_session_entry_t *free;
+ crypto_session_entry_t sessions[MAX_SESSIONS];
+ int is_crypto_dev_initialized;
+ struct rte_mempool *crypto_op_pool;
+};
+
+typedef struct crypto_global_s crypto_global_t;
+static crypto_global_t *global;
+static odp_shm_t crypto_global_shm;
+
+static odp_crypto_generic_op_result_t *get_op_result_from_event(odp_event_t ev)
+{
+ return &(odp_packet_hdr(odp_packet_from_event(ev))->op_result);
+}
+
+static inline int is_valid_size(uint16_t length, uint16_t min,
+ uint16_t max, uint16_t increment)
+{
+ uint16_t supp_size = min;
+
+ if (length < supp_size)
+ return -1;
+
+ for (; supp_size <= max; supp_size += increment) {
+ if (length == supp_size)
+ return 0;
+ }
+
+ return -1;
+}
+
+static int cipher_alg_odp_to_rte(odp_cipher_alg_t cipher_alg,
+ struct rte_crypto_sym_xform *cipher_xform)
+{
+ int rc = 0;
+
+ switch (cipher_alg) {
+ case ODP_CIPHER_ALG_NULL:
+ cipher_xform->cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+ break;
+ case ODP_CIPHER_ALG_DES:
+ case ODP_CIPHER_ALG_3DES_CBC:
+ cipher_xform->cipher.algo = RTE_CRYPTO_CIPHER_3DES_CBC;
+ break;
+ case ODP_CIPHER_ALG_AES_CBC:
+#if ODP_DEPRECATED_API
+ case ODP_CIPHER_ALG_AES128_CBC:
+#endif
+ cipher_xform->cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
+ break;
+ case ODP_CIPHER_ALG_AES_GCM:
+#if ODP_DEPRECATED_API
+ case ODP_CIPHER_ALG_AES128_GCM:
+#endif
+ cipher_xform->cipher.algo = RTE_CRYPTO_CIPHER_AES_GCM;
+ break;
+ default:
+ rc = -1;
+ }
+
+ return rc;
+}
+
+static int auth_alg_odp_to_rte(odp_auth_alg_t auth_alg,
+ struct rte_crypto_sym_xform *auth_xform)
+{
+ int rc = 0;
+
+ /* Process based on auth */
+ switch (auth_alg) {
+ case ODP_AUTH_ALG_NULL:
+ auth_xform->auth.algo = RTE_CRYPTO_AUTH_NULL;
+ break;
+ case ODP_AUTH_ALG_MD5_HMAC:
+#if ODP_DEPRECATED_API
+ case ODP_AUTH_ALG_MD5_96:
+#endif
+ auth_xform->auth.algo = RTE_CRYPTO_AUTH_MD5_HMAC;
+ auth_xform->auth.digest_length = 12;
+ break;
+ case ODP_AUTH_ALG_SHA256_HMAC:
+#if ODP_DEPRECATED_API
+ case ODP_AUTH_ALG_SHA256_128:
+#endif
+ auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA256_HMAC;
+ auth_xform->auth.digest_length = 16;
+ break;
+ case ODP_AUTH_ALG_SHA1_HMAC:
+ auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC;
+ auth_xform->auth.digest_length = 20;
+ break;
+ case ODP_AUTH_ALG_SHA512_HMAC:
+ auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA512_HMAC;
+ auth_xform->auth.digest_length = 64;
+ break;
+ case ODP_AUTH_ALG_AES_GCM:
+#if ODP_DEPRECATED_API
+ case ODP_AUTH_ALG_AES128_GCM:
+#endif
+ auth_xform->auth.algo = RTE_CRYPTO_AUTH_AES_GCM;
+ auth_xform->auth.digest_length = 16;
+ break;
+ default:
+ rc = -1;
+ }
+
+ return rc;
+}
+
+static crypto_session_entry_t *alloc_session(void)
+{
+ crypto_session_entry_t *session = NULL;
+
+ odp_spinlock_lock(&global->lock);
+ session = global->free;
+ if (session) {
+ global->free = session->next;
+ session->next = NULL;
+ }
+ odp_spinlock_unlock(&global->lock);
+
+ return session;
+}
+
+static void free_session(crypto_session_entry_t *session)
+{
+ odp_spinlock_lock(&global->lock);
+ session->next = global->free;
+ global->free = session;
+ odp_spinlock_unlock(&global->lock);
+}
+
+int odp_crypto_init_global(void)
+{
+ size_t mem_size;
+ int idx;
+ int16_t cdev_id, cdev_count;
+ int rc = -1;
+ unsigned cache_size = 0;
+ unsigned nb_queue_pairs = 0, queue_pair;
+
+ /* Calculate the memory size we need */
+ mem_size = sizeof(*global);
+ mem_size += (MAX_SESSIONS * sizeof(crypto_session_entry_t));
+
+ /* Allocate our globally shared memory */
+ crypto_global_shm = odp_shm_reserve("crypto_pool", mem_size,
+ ODP_CACHE_LINE_SIZE, 0);
+
+ if (crypto_global_shm != ODP_SHM_INVALID) {
+ global = odp_shm_addr(crypto_global_shm);
+
+ if (global == NULL) {
+ ODP_ERR("Failed to find the reserved shm block");
+ return -1;
+ }
+ } else {
+ ODP_ERR("Shared memory reserve failed.\n");
+ return -1;
+ }
+
+ /* Clear it out */
+ memset(global, 0, mem_size);
+
+ /* Initialize free list and lock */
+ for (idx = 0; idx < MAX_SESSIONS; idx++) {
+ global->sessions[idx].next = global->free;
+ global->free = &global->sessions[idx];
+ }
+
+ global->enabled_crypto_devs = 0;
+ odp_spinlock_init(&global->lock);
+
+ odp_spinlock_lock(&global->lock);
+ if (global->is_crypto_dev_initialized)
+ return 0;
+
+ if (RTE_MEMPOOL_CACHE_MAX_SIZE > 0) {
+ unsigned j;
+
+ j = ceil((double)NB_MBUF / RTE_MEMPOOL_CACHE_MAX_SIZE);
+ j = RTE_MAX(j, 2UL);
+ for (; j <= (NB_MBUF / 2); ++j)
+ if ((NB_MBUF % j) == 0) {
+ cache_size = NB_MBUF / j;
+ break;
+ }
+ if (odp_unlikely(cache_size > RTE_MEMPOOL_CACHE_MAX_SIZE ||
+ (uint32_t)cache_size * 1.5 > NB_MBUF)) {
+ ODP_ERR("cache_size calc failure: %d\n", cache_size);
+ cache_size = 0;
+ }
+ }
+
+ cdev_count = rte_cryptodev_count();
+ if (cdev_count == 0) {
+ printf("No crypto devices available\n");
+ return 0;
+ }
+
+ for (cdev_id = cdev_count - 1; cdev_id >= 0; cdev_id--) {
+ struct rte_cryptodev_info dev_info;
+
+ rte_cryptodev_info_get(cdev_id, &dev_info);
+ nb_queue_pairs = odp_cpu_count();
+ if (nb_queue_pairs > dev_info.max_nb_queue_pairs)
+ nb_queue_pairs = dev_info.max_nb_queue_pairs;
+
+ struct rte_cryptodev_qp_conf qp_conf;
+
+ struct rte_cryptodev_config conf = {
+ .nb_queue_pairs = nb_queue_pairs,
+ .socket_id = SOCKET_ID_ANY,
+ .session_mp = {
+ .nb_objs = NB_MBUF,
+ .cache_size = cache_size
+ }
+ };
+
+ rc = rte_cryptodev_configure(cdev_id, &conf);
+ if (rc < 0) {
+ ODP_ERR("Failed to configure cryptodev %u", cdev_id);
+ return -1;
+ }
+
+ qp_conf.nb_descriptors = NB_MBUF;
+
+ for (queue_pair = 0; queue_pair < nb_queue_pairs - 1;
+ queue_pair++) {
+ rc = rte_cryptodev_queue_pair_setup(cdev_id,
+ queue_pair,
+ &qp_conf,
+ SOCKET_ID_ANY);
+ if (rc < 0) {
+ ODP_ERR("Fail to setup queue pair %u on dev %u",
+ queue_pair, cdev_id);
+ return -1;
+ }
+ }
+
+ rc = rte_cryptodev_start(cdev_id);
+ if (rc < 0) {
+ ODP_ERR("Failed to start device %u: error %d\n",
+ cdev_id, rc);
+ return -1;
+ }
+
+ global->enabled_crypto_devs++;
+ global->enabled_crypto_dev_ids[
+ global->enabled_crypto_devs - 1] = cdev_id;
+ }
+
+ /* create crypto op pool */
+ global->crypto_op_pool = rte_crypto_op_pool_create("crypto_op_pool",
+ RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+ NB_MBUF, cache_size, 0,
+ rte_socket_id());
+
+ if (global->crypto_op_pool == NULL) {
+ ODP_ERR("Cannot create crypto op pool\n");
+ return -1;
+ }
+
+ global->is_crypto_dev_initialized = 1;
+ odp_spinlock_unlock(&global->lock);
+
+ return 0;
+}
+
+int odp_crypto_capability(odp_crypto_capability_t *capability)
+{
+ uint8_t i, cdev_id, cdev_count;
+ const struct rte_cryptodev_capabilities *cap;
+ enum rte_crypto_auth_algorithm cap_auth_algo;
+ enum rte_crypto_cipher_algorithm cap_cipher_algo;
+
+ if (NULL == capability)
+ return -1;
+
+ /* Initialize crypto capability structure */
+ memset(capability, 0, sizeof(odp_crypto_capability_t));
+
+ cdev_count = rte_cryptodev_count();
+ if (cdev_count == 0) {
+ ODP_ERR("No crypto devices available\n");
+ return -1;
+ }
+
+ for (cdev_id = 0; cdev_id < cdev_count; cdev_id++) {
+ struct rte_cryptodev_info dev_info;
+
+ rte_cryptodev_info_get(cdev_id, &dev_info);
+ i = 0;
+ cap = &dev_info.capabilities[i];
+ if ((dev_info.feature_flags &
+ RTE_CRYPTODEV_FF_HW_ACCELERATED)) {
+ odp_crypto_cipher_algos_t *hw_ciphers;
+
+ hw_ciphers = &capability->hw_ciphers;
+ while (cap->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+ cap_cipher_algo = cap->sym.cipher.algo;
+ if (cap->sym.xform_type ==
+ RTE_CRYPTO_SYM_XFORM_CIPHER) {
+ if (cap_cipher_algo ==
+ RTE_CRYPTO_CIPHER_NULL) {
+ hw_ciphers->bit.null = 1;
+ }
+ if (cap_cipher_algo ==
+ RTE_CRYPTO_CIPHER_3DES_CBC) {
+ hw_ciphers->bit.trides_cbc = 1;
+ hw_ciphers->bit.des = 1;
+ }
+ if (cap_cipher_algo ==
+ RTE_CRYPTO_CIPHER_AES_CBC) {
+ hw_ciphers->bit.aes_cbc = 1;
+#if ODP_DEPRECATED_API
+ hw_ciphers->bit.aes128_cbc = 1;
+#endif
+ }
+ if (cap_cipher_algo ==
+ RTE_CRYPTO_CIPHER_AES_GCM) {
+ hw_ciphers->bit.aes_gcm = 1;
+#if ODP_DEPRECATED_API
+ hw_ciphers->bit.aes128_gcm = 1;
+#endif
+ }
+ }
+
+ cap_auth_algo = cap->sym.auth.algo;
+ if (cap->sym.xform_type ==
+ RTE_CRYPTO_SYM_XFORM_AUTH) {
+ odp_crypto_auth_algos_t *hw_auths;
+
+ hw_auths = &capability->hw_auths;
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_NULL) {
+ hw_auths->bit.null = 1;
+ }
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_AES_GCM) {
+ hw_auths->bit.aes_gcm = 1;
+#if ODP_DEPRECATED_API
+ hw_auths->bit.aes128_gcm = 1;
+#endif
+ }
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_MD5_HMAC) {
+ hw_auths->bit.md5_hmac = 1;
+#if ODP_DEPRECATED_API
+ hw_auths->bit.md5_96 = 1;
+#endif
+ }
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_SHA256_HMAC) {
+ hw_auths->bit.sha256_hmac = 1;
+#if ODP_DEPRECATED_API
+ hw_auths->bit.sha256_128 = 1;
+#endif
+ }
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_SHA1_HMAC) {
+ hw_auths->bit.sha1_hmac = 1;
+ }
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_SHA512_HMAC) {
+ hw_auths->bit.sha512_hmac = 1;
+ }
+ }
+ cap = &dev_info.capabilities[++i];
+ }
+ } else {
+ while (cap->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+ odp_crypto_cipher_algos_t *ciphers;
+
+ ciphers = &capability->ciphers;
+ cap_cipher_algo = cap->sym.cipher.algo;
+ if (cap->sym.xform_type ==
+ RTE_CRYPTO_SYM_XFORM_CIPHER) {
+ if (cap_cipher_algo ==
+ RTE_CRYPTO_CIPHER_NULL) {
+ ciphers->bit.null = 1;
+ }
+ if (cap_cipher_algo ==
+ RTE_CRYPTO_CIPHER_3DES_CBC) {
+ ciphers->bit.trides_cbc = 1;
+ ciphers->bit.des = 1;
+ }
+ if (cap_cipher_algo ==
+ RTE_CRYPTO_CIPHER_AES_CBC) {
+ ciphers->bit.aes_cbc = 1;
+#if ODP_DEPRECATED_API
+ ciphers->bit.aes128_cbc = 1;
+#endif
+ }
+ if (cap_cipher_algo ==
+ RTE_CRYPTO_CIPHER_AES_GCM) {
+ ciphers->bit.aes_gcm = 1;
+#if ODP_DEPRECATED_API
+ ciphers->bit.aes128_gcm = 1;
+#endif
+ }
+ }
+
+ cap_auth_algo = cap->sym.auth.algo;
+ if (cap->sym.xform_type ==
+ RTE_CRYPTO_SYM_XFORM_AUTH) {
+ odp_crypto_auth_algos_t *auths;
+
+ auths = &capability->auths;
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_NULL) {
+ auths->bit.null = 1;
+ }
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_AES_GCM) {
+ auths->bit.aes_gcm = 1;
+#if ODP_DEPRECATED_API
+ auths->bit.aes128_gcm = 1;
+#endif
+ }
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_MD5_HMAC) {
+ auths->bit.md5_hmac = 1;
+#if ODP_DEPRECATED_API
+ auths->bit.md5_96 = 1;
+#endif
+ }
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_SHA256_HMAC) {
+ auths->bit.sha256_hmac = 1;
+#if ODP_DEPRECATED_API
+ auths->bit.sha256_128 = 1;
+#endif
+ }
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_SHA1_HMAC) {
+ auths->bit.sha1_hmac = 1;
+ }
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_SHA512_HMAC) {
+ auths->bit.sha512_hmac = 1;
+ }
+ }
+ cap = &dev_info.capabilities[++i];
+ }
+ }
+
+ /* Read from the device with the lowest max_nb_sessions */
+ if (capability->max_sessions > dev_info.sym.max_nb_sessions)
+ capability->max_sessions = dev_info.sym.max_nb_sessions;
+
+ if (capability->max_sessions == 0)
+ capability->max_sessions = dev_info.sym.max_nb_sessions;
+ }
+
+ /* Make sure the session count doesn't exceed MAX_SESSIONS */
+ if (capability->max_sessions > MAX_SESSIONS)
+ capability->max_sessions = MAX_SESSIONS;
+
+ return 0;
+}
+
+int odp_crypto_cipher_capability(odp_cipher_alg_t cipher,
+ odp_crypto_cipher_capability_t dst[],
+ int num_copy)
+{
+ odp_crypto_cipher_capability_t src[num_copy];
+ int idx = 0, rc = 0;
+ int size = sizeof(odp_crypto_cipher_capability_t);
+
+ uint8_t i, cdev_id, cdev_count;
+ const struct rte_cryptodev_capabilities *cap;
+ enum rte_crypto_cipher_algorithm cap_cipher_algo;
+ struct rte_crypto_sym_xform cipher_xform;
+
+ rc = cipher_alg_odp_to_rte(cipher, &cipher_xform);
+
+ /* Check result */
+ if (rc)
+ return -1;
+
+ cdev_count = rte_cryptodev_count();
+ if (cdev_count == 0) {
+ ODP_ERR("No crypto devices available\n");
+ return -1;
+ }
+
+ for (cdev_id = 0; cdev_id < cdev_count; cdev_id++) {
+ struct rte_cryptodev_info dev_info;
+
+ rte_cryptodev_info_get(cdev_id, &dev_info);
+ i = 0;
+ cap = &dev_info.capabilities[i];
+ while (cap->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+ cap_cipher_algo = cap->sym.cipher.algo;
+ if (cap->sym.xform_type ==
+ RTE_CRYPTO_SYM_XFORM_CIPHER) {
+ if (cap_cipher_algo == cipher_xform.cipher.algo)
+ break;
+ }
+ cap = &dev_info.capabilities[++i];
+ }
+
+ if (cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED)
+ continue;
+
+ uint32_t key_size_min = cap->sym.cipher.key_size.min;
+ uint32_t key_size_max = cap->sym.cipher.key_size.max;
+ uint32_t key_inc = cap->sym.cipher.key_size.increment;
+ uint32_t iv_size_max = cap->sym.cipher.iv_size.max;
+ uint32_t iv_size_min = cap->sym.cipher.iv_size.min;
+ uint32_t iv_inc = cap->sym.cipher.iv_size.increment;
+
+ for (uint32_t key_len = key_size_min; key_len <= key_size_max;
+ key_len += key_inc) {
+ for (uint32_t iv_size = iv_size_min;
+ iv_size <= iv_size_max; iv_size += iv_inc) {
+ src[idx].key_len = key_len;
+ src[idx].iv_len = iv_size;
+ idx++;
+ if (iv_inc == 0)
+ break;
+ }
+
+ if (key_inc == 0)
+ break;
+ }
+ }
+
+ if (idx < num_copy)
+ num_copy = idx;
+
+ memcpy(dst, src, num_copy * size);
+
+ return idx;
+}
+
+int odp_crypto_auth_capability(odp_auth_alg_t auth,
+ odp_crypto_auth_capability_t dst[],
+ int num_copy)
+{
+ odp_crypto_auth_capability_t src[num_copy];
+ int idx = 0, rc = 0;
+ int size = sizeof(odp_crypto_auth_capability_t);
+
+ uint8_t i, cdev_id, cdev_count;
+ const struct rte_cryptodev_capabilities *cap;
+ enum rte_crypto_auth_algorithm cap_auth_algo;
+ struct rte_crypto_sym_xform auth_xform;
+
+ rc = auth_alg_odp_to_rte(auth, &auth_xform);
+
+ /* Check result */
+ if (rc)
+ return -1;
+
+ cdev_count = rte_cryptodev_count();
+ if (cdev_count == 0) {
+ ODP_ERR("No crypto devices available\n");
+ return -1;
+ }
+
+ for (cdev_id = 0; cdev_id < cdev_count; cdev_id++) {
+ struct rte_cryptodev_info dev_info;
+
+ rte_cryptodev_info_get(cdev_id, &dev_info);
+ i = 0;
+ cap = &dev_info.capabilities[i];
+ while (cap->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+ cap_auth_algo = cap->sym.auth.algo;
+ if (cap->sym.xform_type ==
+ RTE_CRYPTO_SYM_XFORM_CIPHER) {
+ if (cap_auth_algo == auth_xform.auth.algo)
+ break;
+ }
+ cap = &dev_info.capabilities[++i];
+ }
+
+ if (cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED)
+ continue;
+
+ uint8_t key_size_min = cap->sym.auth.key_size.min;
+ uint8_t key_size_max = cap->sym.auth.key_size.max;
+ uint8_t increment = cap->sym.auth.key_size.increment;
+ uint8_t digest_size_max = cap->sym.auth.digest_size.max;
+
+ if (key_size_min == key_size_max) {
+ src[idx].key_len = key_size_min;
+ src[idx].digest_len = digest_size_max;
+ src[idx].aad_len.min = cap->sym.auth.aad_size.min;
+ src[idx].aad_len.max = cap->sym.auth.aad_size.max;
+ src[idx].aad_len.inc = cap->sym.auth.aad_size.increment;
+ idx++;
+ } else {
+ for (uint8_t key_len = key_size_min;
+ key_len <= key_size_max;
+ key_len += increment) {
+ idx = (key_len - key_size_min) / increment;
+ src[idx].key_len = key_len;
+ src[idx].digest_len = digest_size_max;
+ src[idx].aad_len.min =
+ cap->sym.auth.aad_size.min;
+ src[idx].aad_len.max =
+ cap->sym.auth.aad_size.max;
+ src[idx].aad_len.inc =
+ cap->sym.auth.aad_size.increment;
+ idx++;
+ }
+ }
+ }
+
+ if (idx < num_copy)
+ num_copy = idx;
+
+ memcpy(dst, src, num_copy * size);
+
+ return idx;
+}
+
+static int get_crypto_dev(struct rte_crypto_sym_xform *cipher_xform,
+ struct rte_crypto_sym_xform *auth_xform,
+ uint16_t iv_length, uint8_t *dev_id)
+{
+ uint8_t cdev_id, id;
+ const struct rte_cryptodev_capabilities *cap;
+ enum rte_crypto_cipher_algorithm cap_cipher_algo;
+ enum rte_crypto_auth_algorithm cap_auth_algo;
+ enum rte_crypto_cipher_algorithm app_cipher_algo;
+ enum rte_crypto_auth_algorithm app_auth_algo;
+
+ for (id = 0; id < global->enabled_crypto_devs; id++) {
+ struct rte_cryptodev_info dev_info;
+ int i = 0;
+
+ cdev_id = global->enabled_crypto_dev_ids[id];
+ rte_cryptodev_info_get(cdev_id, &dev_info);
+ app_cipher_algo = cipher_xform->cipher.algo;
+ cap = &dev_info.capabilities[i];
+ while (cap->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+ cap_cipher_algo = cap->sym.cipher.algo;
+ if (cap->sym.xform_type ==
+ RTE_CRYPTO_SYM_XFORM_CIPHER) {
+ if (cap_cipher_algo == app_cipher_algo)
+ break;
+ }
+ cap = &dev_info.capabilities[++i];
+ }
+
+ if (cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED)
+ continue;
+
+ /* Check if key size is supported by the algorithm. */
+ if (cipher_xform->cipher.key.length) {
+ if (is_valid_size(cipher_xform->cipher.key.length,
+ cap->sym.cipher.key_size.min,
+ cap->sym.cipher.key_size.max,
+ cap->sym.cipher.key_size.
+ increment) != 0) {
+ ODP_ERR("Unsupported cipher key length\n");
+ return -1;
+ }
+ /* No size provided, use minimum size. */
+ } else
+ cipher_xform->cipher.key.length =
+ cap->sym.cipher.key_size.min;
+
+ /* Check if iv length is supported by the algorithm. */
+ if (iv_length) {
+ if (is_valid_size(iv_length,
+ cap->sym.cipher.iv_size.min,
+ cap->sym.cipher.iv_size.max,
+ cap->sym.cipher.iv_size.
+ increment) != 0) {
+ ODP_ERR("Unsupported iv length\n");
+ return -1;
+ }
+ }
+
+ i = 0;
+ app_auth_algo = auth_xform->auth.algo;
+ cap = &dev_info.capabilities[i];
+ while (cap->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+ cap_auth_algo = cap->sym.auth.algo;
+ if ((cap->sym.xform_type ==
+ RTE_CRYPTO_SYM_XFORM_AUTH) &
+ (cap_auth_algo == app_auth_algo)) {
+ break;
+ }
+
+ cap = &dev_info.capabilities[++i];
+ }
+
+ if (cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED)
+ continue;
+
+ /* Check if key size is supported by the algorithm. */
+ if (auth_xform->auth.key.length) {
+ if (is_valid_size(auth_xform->auth.key.length,
+ cap->sym.auth.key_size.min,
+ cap->sym.auth.key_size.max,
+ cap->sym.auth.key_size.
+ increment) != 0) {
+ ODP_ERR("Unsupported auth key length\n");
+ return -1;
+ }
+ /* No size provided, use minimum size. */
+ } else
+ auth_xform->auth.key.length =
+ cap->sym.auth.key_size.min;
+
+ /* Check if digest size is supported by the algorithm. */
+ if (auth_xform->auth.digest_length) {
+ if (is_valid_size(auth_xform->auth.digest_length,
+ cap->sym.auth.digest_size.min,
+ cap->sym.auth.digest_size.max,
+ cap->sym.auth.digest_size.
+ increment) != 0) {
+ ODP_ERR("Unsupported digest length\n");
+ return -1;
+ }
+ /* No size provided, use minimum size. */
+ } else
+ auth_xform->auth.digest_length =
+ cap->sym.auth.digest_size.min;
+
+ memcpy(dev_id, &cdev_id, sizeof(cdev_id));
+ return 0;
+ }
+
+ return -1;
+}
+
+int odp_crypto_session_create(odp_crypto_session_param_t *param,
+ odp_crypto_session_t *session_out,
+ odp_crypto_ses_create_err_t *status)
+{
+ int rc = 0;
+ uint8_t cdev_id = 0;
+ struct rte_crypto_sym_xform cipher_xform;
+ struct rte_crypto_sym_xform auth_xform;
+ struct rte_crypto_sym_xform *first_xform;
+ struct rte_cryptodev_sym_session *session;
+ crypto_session_entry_t *entry;
+
+ *session_out = ODP_CRYPTO_SESSION_INVALID;
+
+ if (rte_cryptodev_count() == 0) {
+ ODP_ERR("No crypto devices available\n");
+ return -1;
+ }
+
+ /* Allocate memory for this session */
+ entry = alloc_session();
+ if (entry == NULL) {
+ ODP_ERR("Failed to allocate a session entry");
+ return -1;
+ }
+
+ /* Default to successful result */
+ *status = ODP_CRYPTO_SES_CREATE_ERR_NONE;
+
+ /* Cipher Data */
+ cipher_xform.cipher.key.data = rte_malloc("crypto key",
+ param->cipher_key.length, 0);
+ if (cipher_xform.cipher.key.data == NULL) {
+ ODP_ERR("Failed to allocate memory for cipher key\n");
+ /* remove the crypto_session_entry_t */
+ memset(entry, 0, sizeof(*entry));
+ free_session(entry);
+ return -1;
+ }
+
+ cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+ cipher_xform.next = NULL;
+ cipher_xform.cipher.key.length = param->cipher_key.length;
+ memcpy(cipher_xform.cipher.key.data,
+ param->cipher_key.data,
+ param->cipher_key.length);
+
+ /* Authentication Data */
+ auth_xform.auth.key.data = rte_malloc("auth key",
+ param->auth_key.length, 0);
+ if (auth_xform.auth.key.data == NULL) {
+ ODP_ERR("Failed to allocate memory for auth key\n");
+ /* remove the crypto_session_entry_t */
+ memset(entry, 0, sizeof(*entry));
+ free_session(entry);
+ return -1;
+ }
+ auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+ auth_xform.next = NULL;
+ auth_xform.auth.key.length = param->auth_key.length;
+ memcpy(auth_xform.auth.key.data,
+ param->auth_key.data,
+ param->auth_key.length);
+
+ /* Derive order */
+ if (ODP_CRYPTO_OP_ENCODE == param->op)
+ entry->do_cipher_first = param->auth_cipher_text;
+ else
+ entry->do_cipher_first = !param->auth_cipher_text;
+
+ /* Process based on cipher */
+ /* Derive order */
+ if (entry->do_cipher_first) {
+ cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+ auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
+ first_xform = &cipher_xform;
+ first_xform->next = &auth_xform;
+ } else {
+ cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT;
+ auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;
+ first_xform = &auth_xform;
+ first_xform->next = &cipher_xform;
+ }
+
+ rc = cipher_alg_odp_to_rte(param->cipher_alg, &cipher_xform);
+
+ /* Check result */
+ if (rc) {
+ *status = ODP_CRYPTO_SES_CREATE_ERR_INV_CIPHER;
+ return -1;
+ }
+
+ rc = auth_alg_odp_to_rte(param->auth_alg, &auth_xform);
+
+ /* Check result */
+ if (rc) {
+ *status = ODP_CRYPTO_SES_CREATE_ERR_INV_AUTH;
+ /* remove the crypto_session_entry_t */
+ memset(entry, 0, sizeof(*entry));
+ free_session(entry);
+ return -1;
+ }
+
+ rc = get_crypto_dev(&cipher_xform,
+ &auth_xform,
+ param->iv.length,
+ &cdev_id);
+
+ if (rc) {
+ ODP_ERR("Couldn't find a crypto device");
+ /* remove the crypto_session_entry_t */
+ memset(entry, 0, sizeof(*entry));
+ free_session(entry);
+ return -1;
+ }
+
+ /* Setup session */
+ session = rte_cryptodev_sym_session_create(cdev_id, first_xform);
+
+ if (session == NULL)
+ /* remove the crypto_session_entry_t */
+ memset(entry, 0, sizeof(*entry));
+ free_session(entry);
+ return -1;
+
+ entry->rte_session = (intptr_t)session;
+ entry->cipher_xform = cipher_xform;
+ entry->auth_xform = auth_xform;
+ entry->iv.length = param->iv.length;
+ entry->iv.data = param->iv.data;
+ entry->output_pool = param->output_pool;
+ entry->compl_queue = param->compl_queue;
+
+ /* We're happy */
+ *session_out = (intptr_t)entry;
+
+ return 0;
+}
+
+int odp_crypto_session_destroy(odp_crypto_session_t session)
+{
+ struct rte_cryptodev_sym_session *rte_session = NULL;
+ crypto_session_entry_t *entry;
+
+ entry = (crypto_session_entry_t *)session;
+
+ rte_session =
+ (struct rte_cryptodev_sym_session *)
+ (intptr_t)entry->rte_session;
+
+ rte_session = rte_cryptodev_sym_session_free(rte_session->dev_id,
+ rte_session);
+
+ if (rte_session != NULL)
+ return -1;
+
+ /* remove the crypto_session_entry_t */
+ memset(entry, 0, sizeof(*entry));
+ free_session(entry);
+
+ return 0;
+}
+
+int odp_crypto_operation(odp_crypto_op_param_t *param,
+ odp_bool_t *posted,
+ odp_crypto_op_result_t *result)
+{
+ odp_crypto_alg_err_t rc_cipher = ODP_CRYPTO_ALG_ERR_NONE;
+ odp_crypto_alg_err_t rc_auth = ODP_CRYPTO_ALG_ERR_NONE;
+ struct rte_crypto_sym_xform cipher_xform;
+ struct rte_crypto_sym_xform auth_xform;
+ struct rte_cryptodev_sym_session *rte_session = NULL;
+ odp_crypto_op_result_t local_result;
+ crypto_session_entry_t *entry;
+ uint8_t *data_addr, *aad_head;
+ struct rte_crypto_op *op;
+ uint16_t rc;
+ uint32_t aad_len;
+ odp_bool_t allocated = false;
+
+ entry = (crypto_session_entry_t *)(intptr_t)param->session;
+ if (entry == NULL)
+ return -1;
+
+ rte_session =
+ (struct rte_cryptodev_sym_session *)
+ (intptr_t)entry->rte_session;
+
+ if (rte_session == NULL)
+ return -1;
+
+ cipher_xform = entry->cipher_xform;
+ auth_xform = entry->auth_xform;
+
+ /* Resolve output buffer */
+ if (ODP_PACKET_INVALID == param->out_pkt &&
+ ODP_POOL_INVALID != entry->output_pool) {
+ param->out_pkt = odp_packet_alloc(entry->output_pool,
+ odp_packet_len(param->pkt));
+ allocated = true;
+ }
+
+ if (param->pkt != param->out_pkt) {
+ if (odp_unlikely(ODP_PACKET_INVALID == param->out_pkt))
+ ODP_ABORT();
+ int ret;
+
+ ret = odp_packet_copy_from_pkt(param->out_pkt,
+ 0,
+ param->pkt,
+ 0,
+ odp_packet_len(param->pkt));
+ if (odp_unlikely(ret < 0))
+ goto err;
+
+ _odp_packet_copy_md_to_packet(param->pkt, param->out_pkt);
+ odp_packet_free(param->pkt);
+ param->pkt = ODP_PACKET_INVALID;
+ }
+
+ data_addr = odp_packet_data(param->out_pkt);
+
+ odp_spinlock_init(&global->lock);
+ odp_spinlock_lock(&global->lock);
+ op = rte_crypto_op_alloc(global->crypto_op_pool,
+ RTE_CRYPTO_OP_TYPE_SYMMETRIC);
+ if (op == NULL) {
+ ODP_ERR("Failed to allocate crypto operation");
+ goto err;
+ }
+
+ odp_spinlock_unlock(&global->lock);
+
+ /* Set crypto operation data parameters */
+ rte_crypto_op_attach_sym_session(op, rte_session);
+ op->sym->auth.digest.data = data_addr + param->hash_result_offset;
+ op->sym->auth.digest.phys_addr =
+ rte_pktmbuf_mtophys_offset((struct rte_mbuf *)param->out_pkt,
+ odp_packet_len(param->out_pkt) -
+ auth_xform.auth.digest_length);
+ op->sym->auth.digest.length = auth_xform.auth.digest_length;
+
+ /* For SNOW3G algorithms, offset/length must be in bits */
+ if (auth_xform.auth.algo == RTE_CRYPTO_AUTH_SNOW3G_UIA2) {
+ op->sym->auth.data.offset = param->auth_range.offset << 3;
+ op->sym->auth.data.length = param->auth_range.length << 3;
+ } else {
+ op->sym->auth.data.offset = param->auth_range.offset;
+ op->sym->auth.data.length = param->auth_range.length;
+ }
+
+ aad_head = param->aad.ptr;
+ aad_len = param->aad.length;
+
+ if (aad_len > 0) {
+ op->sym->auth.aad.data = rte_malloc("aad", aad_len, 0);
+ if (op->sym->auth.aad.data == NULL) {
+ rte_crypto_op_free(op);
+ ODP_ERR("Failed to allocate memory for AAD");
+ goto err;
+ }
+
+ memcpy(op->sym->auth.aad.data, aad_head, aad_len);
+ op->sym->auth.aad.phys_addr =
+ rte_malloc_virt2phy(op->sym->auth.aad.data);
+ op->sym->auth.aad.length = aad_len;
+ }
+
+ if (entry->iv.length == 0) {
+ rte_crypto_op_free(op);
+ ODP_ERR("Wrong IV length");
+ goto err;
+ }
+
+ op->sym->cipher.iv.data = rte_malloc("iv", entry->iv.length, 0);
+ if (op->sym->cipher.iv.data == NULL) {
+ rte_crypto_op_free(op);
+ ODP_ERR("Failed to allocate memory for IV");
+ goto err;
+ }
+
+ if (param->override_iv_ptr) {
+ memcpy(op->sym->cipher.iv.data,
+ param->override_iv_ptr,
+ entry->iv.length);
+ } else if (entry->iv.data) {
+ memcpy(op->sym->cipher.iv.data,
+ entry->iv.data,
+ entry->iv.length);
+
+ op->sym->cipher.iv.phys_addr =
+ rte_malloc_virt2phy(op->sym->cipher.iv.data);
+ op->sym->cipher.iv.length = entry->iv.length;
+ } else {
+ rc_cipher = ODP_CRYPTO_ALG_ERR_IV_INVALID;
+ }
+
+ /* For SNOW3G algorithms, offset/length must be in bits */
+ if (cipher_xform.cipher.algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2) {
+ op->sym->cipher.data.offset = param->cipher_range.offset << 3;
+ op->sym->cipher.data.length = param->cipher_range.length << 3;
+
+ } else {
+ op->sym->cipher.data.offset = param->cipher_range.offset;
+ op->sym->cipher.data.length = param->cipher_range.length;
+ }
+
+ if (rc_cipher == ODP_CRYPTO_ALG_ERR_NONE &&
+ rc_auth == ODP_CRYPTO_ALG_ERR_NONE) {
+ int queue_pair = odp_cpu_id();
+
+ op->sym->m_src = (struct rte_mbuf *)param->out_pkt;
+ rc = rte_cryptodev_enqueue_burst(rte_session->dev_id,
+ queue_pair, &op, 1);
+ if (rc == 0) {
+ rte_crypto_op_free(op);
+ ODP_ERR("Failed to enqueue packet");
+ goto err;
+ }
+
+ rc = rte_cryptodev_dequeue_burst(rte_session->dev_id,
+ queue_pair, &op, 1);
+
+ if (rc == 0) {
+ rte_crypto_op_free(op);
+ ODP_ERR("Failed to dequeue packet");
+ goto err;
+ }
+
+ param->out_pkt = (odp_packet_t)op->sym->m_src;
+ }
+
+ /* Fill in result */
+ local_result.ctx = param->ctx;
+ local_result.pkt = param->out_pkt;
+ local_result.cipher_status.alg_err = rc_cipher;
+ local_result.cipher_status.hw_err = ODP_CRYPTO_HW_ERR_NONE;
+ local_result.auth_status.alg_err = rc_auth;
+ local_result.auth_status.hw_err = ODP_CRYPTO_HW_ERR_NONE;
+ local_result.ok =
+ (rc_cipher == ODP_CRYPTO_ALG_ERR_NONE) &&
+ (rc_auth == ODP_CRYPTO_ALG_ERR_NONE);
+
+ rte_crypto_op_free(op);
+
+ /* If specified during creation post event to completion queue */
+ if (ODP_QUEUE_INVALID != entry->compl_queue) {
+ odp_event_t completion_event;
+ odp_crypto_generic_op_result_t *op_result;
+
+ completion_event = odp_packet_to_event(param->out_pkt);
+ _odp_buffer_event_type_set(
+ odp_buffer_from_event(completion_event),
+ ODP_EVENT_CRYPTO_COMPL);
+ /* Asynchronous, build result (no HW so no errors) and send it*/
+ op_result = get_op_result_from_event(completion_event);
+ op_result->magic = OP_RESULT_MAGIC;
+ op_result->result = local_result;
+ if (odp_queue_enq(entry->compl_queue, completion_event)) {
+ odp_event_free(completion_event);
+ goto err;
+ }
+
+ /* Indicate to caller operation was async */
+ *posted = 1;
+ } else {
+ /* Synchronous, simply return results */
+ if (!result)
+ goto err;
+ *result = local_result;
+
+ /* Indicate to caller operation was sync */
+ *posted = 0;
+ }
+ return 0;
+
+err:
+ if (allocated) {
+ odp_packet_free(param->out_pkt);
+ param->out_pkt = ODP_PACKET_INVALID;
+ }
+
+ return -1;
+}
+
+int odp_crypto_term_global(void)
+{
+ int rc = 0;
+ int ret;
+ int count = 0;
+ crypto_session_entry_t *session;
+
+ odp_spinlock_init(&global->lock);
+ odp_spinlock_lock(&global->lock);
+ for (session = global->free; session != NULL; session = session->next)
+ count++;
+ if (count != MAX_SESSIONS) {
+ ODP_ERR("crypto sessions still active\n");
+ rc = -1;
+ }
+
+ if (global->crypto_op_pool != NULL)
+ rte_mempool_free(global->crypto_op_pool);
+
+ odp_spinlock_unlock(&global->lock);
+
+ ret = odp_shm_free(crypto_global_shm);
+ if (ret < 0) {
+ ODP_ERR("shm free failed for crypto_pool\n");
+ rc = -1;
+ }
+
+ return rc;
+}
+
+odp_random_kind_t odp_random_max_kind(void)
+{
+ return ODP_RANDOM_CRYPTO;
+}
+
+int32_t odp_random_data(uint8_t *buf, uint32_t len, odp_random_kind_t kind)
+{
+ int rc;
+
+ switch (kind) {
+ case ODP_RANDOM_BASIC:
+ RAND_pseudo_bytes(buf, len);
+ return len;
+
+ case ODP_RANDOM_CRYPTO:
+ rc = RAND_bytes(buf, len);
+ return (1 == rc) ? (int)len /*success*/: -1 /*failure*/;
+
+ case ODP_RANDOM_TRUE:
+ default:
+ return -1;
+ }
+}
+
+int32_t odp_random_test_data(uint8_t *buf, uint32_t len, uint64_t *seed)
+{
+ union {
+ uint32_t rand_word;
+ uint8_t rand_byte[4];
+ } u;
+ uint32_t i = 0, j;
+ uint32_t seed32 = (*seed) & 0xffffffff;
+
+ while (i < len) {
+ u.rand_word = rand_r(&seed32);
+
+ for (j = 0; j < 4 && i < len; j++, i++)
+ *buf++ = u.rand_byte[j];
+ }
+
+ *seed = seed32;
+ return len;
+}
+
+odp_crypto_compl_t odp_crypto_compl_from_event(odp_event_t ev)
+{
+ /* This check not mandated by the API specification */
+ if (odp_event_type(ev) != ODP_EVENT_CRYPTO_COMPL)
+ ODP_ABORT("Event not a crypto completion");
+ return (odp_crypto_compl_t)ev;
+}
+
+odp_event_t odp_crypto_compl_to_event(odp_crypto_compl_t completion_event)
+{
+ return (odp_event_t)completion_event;
+}
+
+void odp_crypto_compl_result(odp_crypto_compl_t completion_event,
+ odp_crypto_op_result_t *result)
+{
+ odp_event_t ev = odp_crypto_compl_to_event(completion_event);
+ odp_crypto_generic_op_result_t *op_result;
+
+ op_result = get_op_result_from_event(ev);
+
+ if (OP_RESULT_MAGIC != op_result->magic)
+ ODP_ABORT();
+
+ memcpy(result, &op_result->result, sizeof(*result));
+}
+
+void odp_crypto_compl_free(odp_crypto_compl_t completion_event)
+{
+ _odp_buffer_event_type_set(
+ odp_buffer_from_event((odp_event_t)completion_event),
+ ODP_EVENT_PACKET);
+}
+
+void odp_crypto_session_param_init(odp_crypto_session_param_t *param)
+{
+ memset(param, 0, sizeof(odp_crypto_session_param_t));
+}
+
+uint64_t odp_crypto_session_to_u64(odp_crypto_session_t hdl)
+{
+ return (uint64_t)hdl;
+}
+
+uint64_t odp_crypto_compl_to_u64(odp_crypto_compl_t hdl)
+{
+ return _odp_pri(hdl);
+}
diff --git a/platform/linux-dpdk/odp_errno.c b/platform/linux-dpdk/odp_errno.c
new file mode 100644
index 000000000..5fb698f26
--- /dev/null
+++ b/platform/linux-dpdk/odp_errno.c
@@ -0,0 +1,35 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/api/errno.h>
+#include <odp_internal.h>
+#include <string.h>
+#include <stdio.h>
+#include <odp_debug_internal.h>
+#include <rte_errno.h>
+
+int odp_errno(void)
+{
+ return rte_errno;
+}
+
+void odp_errno_zero(void)
+{
+ rte_errno = 0;
+}
+
+void odp_errno_print(const char *str)
+{
+ if (str != NULL)
+ printf("%s ", str);
+
+ ODP_PRINT("%s\n", strerror(rte_errno));
+}
+
+const char *odp_errno_str(int errnum)
+{
+ return strerror(errnum);
+}
diff --git a/platform/linux-dpdk/odp_init.c b/platform/linux-dpdk/odp_init.c
new file mode 100644
index 000000000..6cea393bc
--- /dev/null
+++ b/platform/linux-dpdk/odp_init.c
@@ -0,0 +1,545 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp_posix_extensions.h>
+#include <odp_packet_dpdk.h>
+#include <odp/api/init.h>
+#include <odp_debug_internal.h>
+#include <odp/api/debug.h>
+#include <unistd.h>
+#include <odp_internal.h>
+#include <odp_schedule_if.h>
+#include <string.h>
+#include <stdio.h>
+#include <linux/limits.h>
+#include <dirent.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#define _ODP_FILES_FMT "odp-%d-"
+#define _ODP_TMPDIR "/tmp"
+
+#define MEMPOOL_OPS(hdl) extern void mp_hdlr_init_##hdl(void);
+MEMPOOL_OPS(ops_mp_mc)
+MEMPOOL_OPS(ops_sp_sc)
+MEMPOOL_OPS(ops_mp_sc)
+MEMPOOL_OPS(ops_sp_mc)
+MEMPOOL_OPS(ops_stack)
+
+#ifndef RTE_BUILD_SHARED_LIB
+/*
+ * This function is not called from anywhere, it's only purpose is to make sure
+ * that if ODP and DPDK are statically linked to an application, the GCC
+ * constructors of mempool handlers are linked as well. Otherwise the linker
+ * would omit them. It's not an issue with dynamic linking. */
+void refer_constructors(void);
+void refer_constructors(void) {
+ mp_hdlr_init_ops_mp_mc();
+ mp_hdlr_init_ops_sp_sc();
+ mp_hdlr_init_ops_mp_sc();
+ mp_hdlr_init_ops_sp_mc();
+ mp_hdlr_init_ops_stack();
+}
+#endif
+
+static void print_dpdk_env_help(void)
+{
+ char prgname[] = "odpdpdk";
+ char help_str[] = "--help";
+ char *dpdk_argv[] = {prgname, help_str};
+ int dpdk_argc = 2;
+
+ ODP_ERR("Neither (char *)platform_params were provided to "
+ "odp_init_global(),\n");
+ ODP_ERR("nor ODP_PLATFORM_PARAMS environment variable were "
+ "specified.\n");
+ ODP_ERR("A string of DPDK command line arguments should be provided");
+ ODP_ERR("Example: export ODP_PLATFORM_PARAMS=\"-n 4 --no-huge\"\n");
+ ODP_ERR("Note: -c argument substitutes automatically from odp coremask\n");
+ rte_eal_init(dpdk_argc, dpdk_argv);
+}
+
+
+static int odp_init_dpdk(const char *cmdline)
+{
+ char **dpdk_argv;
+ int dpdk_argc;
+ char *full_cmdline;
+ int i, cmdlen;
+ odp_cpumask_t mask;
+ char mask_str[ODP_CPUMASK_STR_SIZE];
+ int32_t masklen;
+ cpu_set_t original_cpuset;
+
+ if (cmdline == NULL) {
+ cmdline = getenv("ODP_PLATFORM_PARAMS");
+ if (cmdline == NULL) {
+ print_dpdk_env_help();
+ return -1;
+ }
+ }
+
+ CPU_ZERO(&original_cpuset);
+ i = pthread_getaffinity_np(pthread_self(),
+ sizeof(original_cpuset), &original_cpuset);
+ if (i != 0) {
+ ODP_ERR("Failed to read thread affinity: %d\n", i);
+ return -1;
+ }
+
+ odp_cpumask_zero(&mask);
+ for (i = 0; i < CPU_SETSIZE; i++) {
+ if (CPU_ISSET(i, &original_cpuset)) {
+ odp_cpumask_set(&mask, i);
+ break;
+ }
+ }
+ masklen = odp_cpumask_to_str(&mask, mask_str, ODP_CPUMASK_STR_SIZE);
+
+ if (masklen < 0) {
+ ODP_ERR("CPU mask error: d\n", masklen);
+ return -1;
+ }
+
+ /* masklen includes the terminating null as well */
+ full_cmdline = calloc(1, strlen("odpdpdk -c ") + masklen +
+ strlen(" ") + strlen(cmdline));
+
+ /* first argument is facility log, simply bind it to odpdpdk for now.*/
+ cmdlen = sprintf(full_cmdline, "odpdpdk -c %s %s", mask_str, cmdline);
+
+ for (i = 0, dpdk_argc = 1; i < cmdlen; ++i) {
+ if (isspace(full_cmdline[i])) {
+ ++dpdk_argc;
+ }
+ }
+ dpdk_argv = malloc(dpdk_argc * sizeof(char *));
+
+ dpdk_argc = rte_strsplit(full_cmdline, strlen(full_cmdline), dpdk_argv,
+ dpdk_argc, ' ');
+ for (i = 0; i < dpdk_argc; ++i)
+ ODP_DBG("arg[%d]: %s\n", i, dpdk_argv[i]);
+ fflush(stdout);
+
+ i = rte_eal_init(dpdk_argc, dpdk_argv);
+ free(dpdk_argv);
+ free(full_cmdline);
+ if (i < 0) {
+ ODP_ERR("Cannot init the Intel DPDK EAL!\n");
+ return -1;
+ } else if (i + 1 != dpdk_argc) {
+ ODP_DBG("Some DPDK args were not processed!\n");
+ ODP_DBG("Passed: %d Consumed %d\n", dpdk_argc, i + 1);
+ }
+ ODP_DBG("rte_eal_init OK\n");
+
+ i = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t),
+ &original_cpuset);
+ if (i)
+ ODP_ERR("Failed to reset thread affinity: %d\n", i);
+
+ return 0;
+}
+
+struct odp_global_data_s odp_global_data;
+
+/* remove all files staring with "odp-<pid>" from a directory "dir" */
+static int cleanup_files(const char *dirpath, int odp_pid)
+{
+ struct dirent *e;
+ DIR *dir;
+ char prefix[PATH_MAX];
+ char *fullpath;
+ int d_len = strlen(dirpath);
+ int p_len;
+ int f_len;
+
+ dir = opendir(dirpath);
+ if (!dir) {
+ /* ok if the dir does not exist. no much to delete then! */
+ ODP_DBG("opendir failed for %s: %s\n",
+ dirpath, strerror(errno));
+ return 0;
+ }
+ snprintf(prefix, PATH_MAX, _ODP_FILES_FMT, odp_pid);
+ p_len = strlen(prefix);
+ while ((e = readdir(dir)) != NULL) {
+ if (strncmp(e->d_name, prefix, p_len) == 0) {
+ f_len = strlen(e->d_name);
+ fullpath = malloc(d_len + f_len + 2);
+ if (fullpath == NULL) {
+ closedir(dir);
+ return -1;
+ }
+ snprintf(fullpath, PATH_MAX, "%s/%s",
+ dirpath, e->d_name);
+ ODP_DBG("deleting obsolete file: %s\n", fullpath);
+ if (unlink(fullpath))
+ ODP_ERR("unlink failed for %s: %s\n",
+ fullpath, strerror(errno));
+ free(fullpath);
+ }
+ }
+ closedir(dir);
+
+ return 0;
+}
+
+int odp_init_global(odp_instance_t *instance,
+ const odp_init_t *params,
+ const odp_platform_init_t *platform_params)
+{
+ char *hpdir;
+
+ memset(&odp_global_data, 0, sizeof(struct odp_global_data_s));
+ odp_global_data.main_pid = getpid();
+
+ enum init_stage stage = NO_INIT;
+ odp_global_data.log_fn = odp_override_log;
+ odp_global_data.abort_fn = odp_override_abort;
+
+ if (params != NULL) {
+ if (params->log_fn != NULL)
+ odp_global_data.log_fn = params->log_fn;
+ if (params->abort_fn != NULL)
+ odp_global_data.abort_fn = params->abort_fn;
+ }
+
+ cleanup_files(_ODP_TMPDIR, odp_global_data.main_pid);
+
+ if (odp_cpumask_init_global(params)) {
+ ODP_ERR("ODP cpumask init failed.\n");
+ goto init_failed;
+ }
+ stage = CPUMASK_INIT;
+
+ if (odp_init_dpdk((const char *)platform_params)) {
+ ODP_ERR("ODP dpdk init failed.\n");
+ return -1;
+ }
+
+ if (odp_time_init_global()) {
+ ODP_ERR("ODP time init failed.\n");
+ goto init_failed;
+ }
+ stage = TIME_INIT;
+
+ if (odp_system_info_init()) {
+ ODP_ERR("ODP system_info init failed.\n");
+ goto init_failed;
+ }
+ hpdir = odp_global_data.hugepage_info.default_huge_page_dir;
+ /* cleanup obsolete huge page files, if any */
+ if (hpdir)
+ cleanup_files(hpdir, odp_global_data.main_pid);
+ stage = SYSINFO_INIT;
+
+ if (_odp_fdserver_init_global()) {
+ ODP_ERR("ODP fdserver init failed.\n");
+ goto init_failed;
+ }
+ stage = FDSERVER_INIT;
+
+ if (_odp_ishm_init_global()) {
+ ODP_ERR("ODP ishm init failed.\n");
+ goto init_failed;
+ }
+ stage = ISHM_INIT;
+
+ if (odp_thread_init_global()) {
+ ODP_ERR("ODP thread init failed.\n");
+ goto init_failed;
+ }
+ stage = THREAD_INIT;
+
+ if (odp_pool_init_global()) {
+ ODP_ERR("ODP pool init failed.\n");
+ goto init_failed;
+ }
+ stage = POOL_INIT;
+
+ if (odp_queue_init_global()) {
+ ODP_ERR("ODP queue init failed.\n");
+ goto init_failed;
+ }
+ stage = QUEUE_INIT;
+
+ if (sched_fn->init_global()) {
+ ODP_ERR("ODP schedule init failed.\n");
+ goto init_failed;
+ }
+ stage = SCHED_INIT;
+
+ if (odp_pktio_init_global()) {
+ ODP_ERR("ODP packet io init failed.\n");
+ goto init_failed;
+ }
+ stage = PKTIO_INIT;
+
+ if (odp_timer_init_global()) {
+ ODP_ERR("ODP timer init failed.\n");
+ goto init_failed;
+ }
+ stage = TIMER_INIT;
+
+ if (odp_crypto_init_global()) {
+ ODP_ERR("ODP crypto init failed.\n");
+ goto init_failed;
+ }
+ stage = CRYPTO_INIT;
+
+ if (odp_classification_init_global()) {
+ ODP_ERR("ODP classification init failed.\n");
+ goto init_failed;
+ }
+ stage = CLASSIFICATION_INIT;
+
+ if (odp_tm_init_global()) {
+ ODP_ERR("ODP traffic manager init failed\n");
+ goto init_failed;
+ }
+ stage = TRAFFIC_MNGR_INIT;
+
+ if (_odp_int_name_tbl_init_global()) {
+ ODP_ERR("ODP name table init failed\n");
+ goto init_failed;
+ }
+
+ /* Dummy support for single instance */
+ *instance = (odp_instance_t)odp_global_data.main_pid;
+
+ return 0;
+
+init_failed:
+ _odp_term_global(stage);
+ return -1;
+}
+
+int odp_term_global(odp_instance_t instance)
+{
+ if (instance != (odp_instance_t)odp_global_data.main_pid) {
+ ODP_ERR("Bad instance.\n");
+ return -1;
+ }
+ return _odp_term_global(ALL_INIT);
+}
+
+int _odp_term_global(enum init_stage stage)
+{
+ int rc = 0;
+
+ switch (stage) {
+ case ALL_INIT:
+ case NAME_TABLE_INIT:
+ if (_odp_int_name_tbl_term_global()) {
+ ODP_ERR("Name table term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case TRAFFIC_MNGR_INIT:
+ if (odp_tm_term_global()) {
+ ODP_ERR("TM term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case CLASSIFICATION_INIT:
+ if (odp_classification_term_global()) {
+ ODP_ERR("ODP classification term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case CRYPTO_INIT:
+ if (odp_crypto_term_global()) {
+ ODP_ERR("ODP crypto term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case TIMER_INIT:
+ if (odp_timer_term_global()) {
+ ODP_ERR("ODP timer term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case PKTIO_INIT:
+ if (odp_pktio_term_global()) {
+ ODP_ERR("ODP pktio term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case SCHED_INIT:
+ if (sched_fn->term_global()) {
+ ODP_ERR("ODP schedule term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case QUEUE_INIT:
+ if (odp_queue_term_global()) {
+ ODP_ERR("ODP queue term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case POOL_INIT:
+ if (odp_pool_term_global()) {
+ ODP_ERR("ODP buffer pool term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case THREAD_INIT:
+ if (odp_thread_term_global()) {
+ ODP_ERR("ODP thread term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case ISHM_INIT:
+ if (_odp_ishm_term_global()) {
+ ODP_ERR("ODP ishm term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case FDSERVER_INIT:
+ if (_odp_fdserver_term_global()) {
+ ODP_ERR("ODP fdserver term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case SYSINFO_INIT:
+ if (odp_system_info_term()) {
+ ODP_ERR("ODP system info term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case TIME_INIT:
+ if (odp_time_term_global()) {
+ ODP_ERR("ODP time term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case CPUMASK_INIT:
+ if (odp_cpumask_term_global()) {
+ ODP_ERR("ODP cpumask term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case NO_INIT:
+ ;
+ }
+
+ return rc;
+}
+
+int odp_init_local(odp_instance_t instance, odp_thread_type_t thr_type)
+{
+ enum init_stage stage = NO_INIT;
+
+ if (instance != (odp_instance_t)odp_global_data.main_pid) {
+ ODP_ERR("Bad instance.\n");
+ goto init_fail;
+ }
+
+ if (_odp_ishm_init_local()) {
+ ODP_ERR("ODP ishm local init failed.\n");
+ goto init_fail;
+ }
+ stage = ISHM_INIT;
+
+ if (odp_thread_init_local(thr_type)) {
+ ODP_ERR("ODP thread local init failed.\n");
+ goto init_fail;
+ }
+ stage = THREAD_INIT;
+
+ if (odp_pktio_init_local()) {
+ ODP_ERR("ODP packet io local init failed.\n");
+ goto init_fail;
+ }
+ stage = PKTIO_INIT;
+
+ if (odp_pool_init_local()) {
+ ODP_ERR("ODP pool local init failed.\n");
+ goto init_fail;
+ }
+ stage = POOL_INIT;
+
+ if (sched_fn->init_local()) {
+ ODP_ERR("ODP schedule local init failed.\n");
+ goto init_fail;
+ }
+ /* stage = SCHED_INIT; */
+
+ return 0;
+
+init_fail:
+ _odp_term_local(stage);
+ return -1;
+}
+
+int odp_term_local(void)
+{
+ return _odp_term_local(ALL_INIT);
+}
+
+int _odp_term_local(enum init_stage stage)
+{
+ int rc = 0;
+ int rc_thd = 0;
+
+ switch (stage) {
+ case ALL_INIT:
+
+ case SCHED_INIT:
+ if (sched_fn->term_local()) {
+ ODP_ERR("ODP schedule local term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case POOL_INIT:
+ if (odp_pool_term_local()) {
+ ODP_ERR("ODP buffer pool local term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ case THREAD_INIT:
+ rc_thd = odp_thread_term_local();
+ if (rc_thd < 0) {
+ ODP_ERR("ODP thread local term failed.\n");
+ rc = -1;
+ } else {
+ if (!rc)
+ rc = rc_thd;
+ }
+ /* Fall through */
+
+ case ISHM_INIT:
+ if (_odp_ishm_term_local()) {
+ ODP_ERR("ODP ishm local term failed.\n");
+ rc = -1;
+ }
+ /* Fall through */
+
+ default:
+ break;
+ }
+
+ return rc;
+}
diff --git a/platform/linux-dpdk/odp_packet.c b/platform/linux-dpdk/odp_packet.c
new file mode 100644
index 000000000..0d05e23f2
--- /dev/null
+++ b/platform/linux-dpdk/odp_packet.c
@@ -0,0 +1,1518 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/api/plat/packet_inlines.h>
+#include <odp/api/packet.h>
+#include <odp_packet_internal.h>
+#include <odp_debug_internal.h>
+#include <odp/api/hints.h>
+#include <odp/api/byteorder.h>
+
+#include <protocols/eth.h>
+#include <protocols/ip.h>
+#include <protocols/tcp.h>
+#include <protocols/udp.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <inttypes.h>
+
+#include <odp/visibility_begin.h>
+
+/* Fill in packet header field offsets for inline functions */
+
+const _odp_packet_inline_offset_t _odp_packet_inline ODP_ALIGNED_CACHE = {
+ .mb = offsetof(odp_packet_hdr_t, buf_hdr.mb),
+ .pool = offsetof(odp_packet_hdr_t, buf_hdr.pool_hdl),
+ .input = offsetof(odp_packet_hdr_t, input),
+ .user_ptr = offsetof(odp_packet_hdr_t, buf_hdr.buf_ctx),
+ .timestamp = offsetof(odp_packet_hdr_t, timestamp),
+ .input_flags = offsetof(odp_packet_hdr_t, p.input_flags),
+ .buf_addr = offsetof(odp_packet_hdr_t, buf_hdr.mb) +
+ offsetof(const struct rte_mbuf, buf_addr),
+ .data = offsetof(odp_packet_hdr_t, buf_hdr.mb) +
+ offsetof(struct rte_mbuf, data_off),
+ .pkt_len = offsetof(odp_packet_hdr_t, buf_hdr.mb) +
+ (size_t)&rte_pktmbuf_pkt_len((struct rte_mbuf *)0),
+ .seg_len = offsetof(odp_packet_hdr_t, buf_hdr.mb) +
+ (size_t)&rte_pktmbuf_data_len((struct rte_mbuf *)0),
+ .nb_segs = offsetof(odp_packet_hdr_t, buf_hdr.mb) +
+ offsetof(struct rte_mbuf, nb_segs),
+ .udata_len = offsetof(odp_packet_hdr_t, uarea_size),
+ .udata = sizeof(odp_packet_hdr_t),
+ .rss = offsetof(odp_packet_hdr_t, buf_hdr.mb) +
+ offsetof(struct rte_mbuf, hash.rss),
+ .ol_flags = offsetof(odp_packet_hdr_t, buf_hdr.mb) +
+ offsetof(struct rte_mbuf, ol_flags),
+ .rss_flag = PKT_RX_RSS_HASH
+};
+
+#include <odp/visibility_end.h>
+
+struct rte_mbuf dummy;
+ODP_STATIC_ASSERT(sizeof(dummy.data_off) == sizeof(uint16_t),
+ "data_off should be uint16_t");
+ODP_STATIC_ASSERT(sizeof(dummy.pkt_len) == sizeof(uint32_t),
+ "pkt_len should be uint32_t");
+ODP_STATIC_ASSERT(sizeof(dummy.data_len) == sizeof(uint16_t),
+ "data_len should be uint16_t");
+ODP_STATIC_ASSERT(sizeof(dummy.hash.rss) == sizeof(uint32_t),
+ "hash.rss should be uint32_t");
+ODP_STATIC_ASSERT(sizeof(dummy.ol_flags) == sizeof(uint64_t),
+ "ol_flags should be uint64_t");
+/*
+ *
+ * Alloc and free
+ * ********************************************************
+ *
+ */
+
+static inline odp_buffer_t buffer_handle(odp_packet_hdr_t *pkt_hdr)
+{
+ return pkt_hdr->buf_hdr.handle.handle;
+}
+
+static inline odp_packet_hdr_t *buf_to_packet_hdr(odp_buffer_t buf)
+{
+ return (odp_packet_hdr_t *)buf_hdl_to_hdr(buf);
+}
+
+static odp_packet_t packet_alloc(pool_entry_t* pool, uint32_t len)
+{
+ odp_packet_t pkt;
+ uintmax_t totsize = RTE_PKTMBUF_HEADROOM + len;
+ odp_packet_hdr_t *pkt_hdr;
+ struct rte_mbuf *mbuf;
+
+ if (pool->s.params.type != ODP_POOL_PACKET)
+ return ODP_PACKET_INVALID;
+
+ mbuf = rte_pktmbuf_alloc(pool->s.rte_mempool);
+ if (mbuf == NULL) {
+ rte_errno = ENOMEM;
+ return ODP_PACKET_INVALID;
+ }
+ pkt_hdr = (odp_packet_hdr_t *)mbuf;
+ pkt_hdr->buf_hdr.totsize = mbuf->buf_len;
+
+ if (mbuf->buf_len < totsize) {
+ intmax_t needed = totsize - mbuf->buf_len;
+ struct rte_mbuf *curseg = mbuf;
+
+ do {
+ struct rte_mbuf *nextseg =
+ rte_pktmbuf_alloc(pool->s.rte_mempool);
+
+ if (nextseg == NULL) {
+ rte_pktmbuf_free(mbuf);
+ return ODP_PACKET_INVALID;
+ }
+
+ curseg->next = nextseg;
+ curseg = nextseg;
+ curseg->data_off = 0;
+ pkt_hdr->buf_hdr.totsize += curseg->buf_len;
+ needed -= curseg->buf_len;
+ } while (needed > 0);
+ }
+
+ pkt = (odp_packet_t)mbuf;
+
+ if (odp_packet_reset(pkt, len) != 0)
+ return ODP_PACKET_INVALID;
+
+ return pkt;
+}
+
+odp_packet_t odp_packet_alloc(odp_pool_t pool_hdl, uint32_t len)
+{
+ pool_entry_t *pool = odp_pool_to_entry(pool_hdl);
+
+ return packet_alloc(pool, len);
+}
+
+int odp_packet_alloc_multi(odp_pool_t pool_hdl, uint32_t len,
+ odp_packet_t pkt[], int num)
+{
+ int i;
+ pool_entry_t *pool = odp_pool_to_entry(pool_hdl);
+
+ for (i = 0; i < num; i++) {
+ pkt[i] = packet_alloc(pool, len);
+ if (pkt[i] == ODP_PACKET_INVALID)
+ return rte_errno == ENOMEM ? i : -EINVAL;
+ }
+ return i;
+}
+
+void odp_packet_free(odp_packet_t pkt)
+{
+ struct rte_mbuf *mbuf = (struct rte_mbuf *)pkt;
+ rte_pktmbuf_free(mbuf);
+}
+
+void odp_packet_free_multi(const odp_packet_t pkt[], int num)
+{
+ int i;
+
+ for (i = 0; i < num; i++) {
+ struct rte_mbuf *mbuf = (struct rte_mbuf *)pkt[i];
+
+ rte_pktmbuf_free(mbuf);
+ }
+}
+
+int odp_packet_reset(odp_packet_t pkt, uint32_t len)
+{
+ odp_packet_hdr_t *const pkt_hdr = odp_packet_hdr(pkt);
+ struct rte_mbuf *ms, *mb = &pkt_hdr->buf_hdr.mb;
+ uint8_t nb_segs = 0;
+ int32_t lenleft = len;
+
+ if (RTE_PKTMBUF_HEADROOM + len > odp_packet_buf_len(pkt)) {
+ ODP_DBG("Not enought head room for that packet %d/%d\n",
+ RTE_PKTMBUF_HEADROOM + len,
+ odp_packet_buf_len(pkt));
+ return -1;
+ }
+
+ pkt_hdr->p.input_flags.all = 0;
+ pkt_hdr->p.output_flags.all = 0;
+ pkt_hdr->p.error_flags.all = 0;
+
+ pkt_hdr->p.l2_offset = 0;
+ pkt_hdr->p.l3_offset = ODP_PACKET_OFFSET_INVALID;
+ pkt_hdr->p.l4_offset = ODP_PACKET_OFFSET_INVALID;
+
+ pkt_hdr->buf_hdr.next = NULL;
+
+ pkt_hdr->input = ODP_PKTIO_INVALID;
+
+ mb->port = 0xff;
+ mb->pkt_len = len;
+ mb->data_off = RTE_PKTMBUF_HEADROOM;
+ mb->vlan_tci = 0;
+ nb_segs = 1;
+
+ if (RTE_PKTMBUF_HEADROOM + lenleft <= mb->buf_len) {
+ mb->data_len = lenleft;
+ } else {
+ mb->data_len = mb->buf_len - RTE_PKTMBUF_HEADROOM;
+ lenleft -= mb->data_len;
+ ms = mb->next;
+ while (lenleft > 0) {
+ nb_segs++;
+ ms->data_len = lenleft <= ms->buf_len ?
+ lenleft : ms->buf_len;
+ lenleft -= ms->buf_len;
+ ms = ms->next;
+ }
+ }
+
+ mb->nb_segs = nb_segs;
+ return 0;
+}
+
+odp_packet_t _odp_packet_from_buffer(odp_buffer_t buf)
+{
+ if (odp_unlikely(buf == ODP_BUFFER_INVALID))
+ return ODP_PACKET_INVALID;
+
+ return (odp_packet_t)buf_to_packet_hdr(buf);
+}
+
+odp_buffer_t _odp_packet_to_buffer(odp_packet_t pkt)
+{
+ if (odp_unlikely(pkt == ODP_PACKET_INVALID))
+ return ODP_BUFFER_INVALID;
+
+ return buffer_handle(odp_packet_hdr(pkt));
+}
+
+odp_packet_t odp_packet_from_event(odp_event_t ev)
+{
+ if (odp_unlikely(ev == ODP_EVENT_INVALID))
+ return ODP_PACKET_INVALID;
+
+ return (odp_packet_t)buf_to_packet_hdr((odp_buffer_t)ev);
+}
+
+odp_event_t odp_packet_to_event(odp_packet_t pkt)
+{
+ if (odp_unlikely(pkt == ODP_PACKET_INVALID))
+ return ODP_EVENT_INVALID;
+
+ return (odp_event_t)buffer_handle(odp_packet_hdr(pkt));
+}
+
+uint32_t odp_packet_buf_len(odp_packet_t pkt)
+{
+ return odp_packet_hdr(pkt)->buf_hdr.totsize;
+}
+
+void *odp_packet_tail(odp_packet_t pkt)
+{
+ struct rte_mbuf *mb = &(odp_packet_hdr(pkt)->buf_hdr.mb);
+ mb = rte_pktmbuf_lastseg(mb);
+ return (void *)(rte_pktmbuf_mtod(mb, char *) + mb->data_len);
+}
+
+void *odp_packet_push_head(odp_packet_t pkt, uint32_t len)
+{
+ struct rte_mbuf *mb = &(odp_packet_hdr(pkt)->buf_hdr.mb);
+ return (void *)rte_pktmbuf_prepend(mb, len);
+}
+
+static void _copy_head_metadata(struct rte_mbuf *newhead,
+ struct rte_mbuf *oldhead)
+{
+ odp_packet_t pkt = (odp_packet_t)newhead;
+ uint32_t saved_index = odp_packet_hdr(pkt)->buf_hdr.index;
+
+ rte_mbuf_refcnt_set(newhead, rte_mbuf_refcnt_read(oldhead));
+ newhead->port = oldhead->port;
+ newhead->ol_flags = oldhead->ol_flags;
+ newhead->packet_type = oldhead->packet_type;
+ newhead->vlan_tci = oldhead->vlan_tci;
+ newhead->hash.rss = 0;
+ newhead->seqn = oldhead->seqn;
+ newhead->vlan_tci_outer = oldhead->vlan_tci_outer;
+ newhead->udata64 = oldhead->udata64;
+ memcpy(&newhead->tx_offload, &oldhead->tx_offload,
+ sizeof(odp_packet_hdr_t) -
+ offsetof(struct rte_mbuf, tx_offload));
+ odp_packet_hdr(pkt)->buf_hdr.handle.handle =
+ (odp_buffer_t)newhead;
+ odp_packet_hdr(pkt)->buf_hdr.index = saved_index;
+}
+
+int odp_packet_extend_head(odp_packet_t *pkt, uint32_t len, void **data_ptr,
+ uint32_t *seg_len)
+{
+ struct rte_mbuf *mb = &(odp_packet_hdr(*pkt)->buf_hdr.mb);
+ int addheadsize = len - rte_pktmbuf_headroom(mb);
+
+ if (addheadsize > 0) {
+ struct rte_mbuf *newhead, *t;
+ uint32_t totsize_change;
+ int i;
+
+ newhead = rte_pktmbuf_alloc(mb->pool);
+ if (newhead == NULL)
+ return -1;
+
+ newhead->data_len = addheadsize % newhead->buf_len;
+ newhead->pkt_len = addheadsize;
+ newhead->data_off = newhead->buf_len - newhead->data_len;
+ newhead->nb_segs = addheadsize / newhead->buf_len + 1;
+ t = newhead;
+
+ for (i = 0; i < newhead->nb_segs - 1; --i) {
+ t->next = rte_pktmbuf_alloc(mb->pool);
+
+ if (t->next == NULL) {
+ rte_pktmbuf_free(newhead);
+ return -1;
+ }
+ /* The intermediate segments are fully used */
+ t->data_len = t->buf_len;
+ t->data_off = 0;
+ }
+ totsize_change = newhead->nb_segs * newhead->buf_len;
+ if (rte_pktmbuf_chain(newhead, mb)) {
+ rte_pktmbuf_free(newhead);
+ return -1;
+ }
+ /* Expand the original head segment*/
+ newhead->pkt_len += rte_pktmbuf_headroom(mb);
+ mb->data_off = 0;
+ mb->data_len = mb->buf_len;
+ _copy_head_metadata(newhead, mb);
+ mb = newhead;
+ *pkt = (odp_packet_t)newhead;
+ odp_packet_hdr(*pkt)->buf_hdr.totsize += totsize_change;
+ } else {
+ rte_pktmbuf_prepend(mb, len);
+ }
+
+ if (data_ptr)
+ *data_ptr = odp_packet_data(*pkt);
+ if (seg_len)
+ *seg_len = mb->data_len;
+
+ return 0;
+}
+
+void *odp_packet_pull_head(odp_packet_t pkt, uint32_t len)
+{
+ struct rte_mbuf *mb = &(odp_packet_hdr(pkt)->buf_hdr.mb);
+ return (void *)rte_pktmbuf_adj(mb, len);
+}
+
+int odp_packet_trunc_head(odp_packet_t *pkt, uint32_t len, void **data_ptr,
+ uint32_t *seg_len)
+{
+ struct rte_mbuf *mb = &(odp_packet_hdr(*pkt)->buf_hdr.mb);
+
+ if (odp_packet_len(*pkt) < len)
+ return -1;
+
+ if (len > mb->data_len) {
+ struct rte_mbuf *newhead = mb, *prev = NULL;
+ uint32_t left = len;
+ uint32_t totsize_change = 0;
+
+ while (newhead->next != NULL) {
+ if (newhead->data_len > left)
+ break;
+ left -= newhead->data_len;
+ totsize_change += newhead->buf_len;
+ prev = newhead;
+ newhead = newhead->next;
+ --mb->nb_segs;
+ }
+ newhead->data_off += left;
+ newhead->nb_segs = mb->nb_segs;
+ newhead->pkt_len = mb->pkt_len - len;
+ newhead->data_len -= left;
+ _copy_head_metadata(newhead, mb);
+ prev->next = NULL;
+ rte_pktmbuf_free(mb);
+ *pkt = (odp_packet_t)newhead;
+ odp_packet_hdr(*pkt)->buf_hdr.totsize -= totsize_change;
+ } else {
+ rte_pktmbuf_adj(mb, len);
+ }
+
+ if (data_ptr)
+ *data_ptr = odp_packet_data(*pkt);
+ if (seg_len)
+ *seg_len = mb->data_len;
+
+ return 0;
+}
+
+void *odp_packet_push_tail(odp_packet_t pkt, uint32_t len)
+{
+ struct rte_mbuf *mb = &(odp_packet_hdr(pkt)->buf_hdr.mb);
+
+ return (void *)rte_pktmbuf_append(mb, len);
+}
+
+int odp_packet_extend_tail(odp_packet_t *pkt, uint32_t len, void **data_ptr,
+ uint32_t *seg_len)
+{
+ struct rte_mbuf *mb = &(odp_packet_hdr(*pkt)->buf_hdr.mb);
+ int newtailsize = len - odp_packet_tailroom(*pkt);
+ uint32_t old_pkt_len = odp_packet_len(*pkt);
+
+ if (data_ptr)
+ *data_ptr = odp_packet_tail(*pkt);
+
+ if (newtailsize > 0) {
+ struct rte_mbuf *newtail = rte_pktmbuf_alloc(mb->pool);
+ struct rte_mbuf *t;
+ struct rte_mbuf *m_last = rte_pktmbuf_lastseg(mb);
+ int i;
+
+ if (newtail == NULL)
+ return -1;
+ newtail->data_off = 0;
+ newtail->pkt_len = newtailsize;
+ if (newtailsize > newtail->buf_len)
+ newtail->data_len = newtail->buf_len;
+ else
+ newtail->data_len = newtailsize;
+ newtail->nb_segs = newtailsize / newtail->buf_len + 1;
+ t = newtail;
+
+ for (i = 0; i < newtail->nb_segs - 1; ++i) {
+ t->next = rte_pktmbuf_alloc(mb->pool);
+
+ if (t->next == NULL) {
+ rte_pktmbuf_free(newtail);
+ return -1;
+ }
+ t = t->next;
+ t->data_off = 0;
+ /* The last segment's size is not trivial*/
+ t->data_len = i == newtail->nb_segs - 2 ?
+ newtailsize % newtail->buf_len :
+ t->buf_len;
+ }
+ if (rte_pktmbuf_chain(mb, newtail)) {
+ rte_pktmbuf_free(newtail);
+ return -1;
+ }
+ /* Expand the original tail */
+ m_last->data_len = m_last->buf_len - m_last->data_off;
+ mb->pkt_len += len - newtailsize;
+ odp_packet_hdr(*pkt)->buf_hdr.totsize +=
+ newtail->nb_segs * newtail->buf_len;
+ } else {
+ rte_pktmbuf_append(mb, len);
+ }
+
+ if (seg_len)
+ odp_packet_offset(*pkt, old_pkt_len, seg_len, NULL);
+
+ return 0;
+}
+
+void *odp_packet_pull_tail(odp_packet_t pkt, uint32_t len)
+{
+ struct rte_mbuf *mb = &(odp_packet_hdr(pkt)->buf_hdr.mb);
+
+ if (rte_pktmbuf_trim(mb, len))
+ return NULL;
+ else
+ return odp_packet_tail(pkt);
+}
+
+int odp_packet_trunc_tail(odp_packet_t *pkt, uint32_t len, void **tail_ptr,
+ uint32_t *tailroom)
+{
+ struct rte_mbuf *mb = &(odp_packet_hdr(*pkt)->buf_hdr.mb);
+
+ if (odp_packet_len(*pkt) < len)
+ return -1;
+
+ if (rte_pktmbuf_trim(mb, len)) {
+ struct rte_mbuf *reverse[mb->nb_segs];
+ struct rte_mbuf *t = mb;
+ int i;
+
+ for (i = 0; i < mb->nb_segs; ++i) {
+ reverse[i] = t;
+ t = t->next;
+ }
+ for (i = mb->nb_segs - 1; i >= 0 && len > 0; --i) {
+ t = reverse[i];
+ if (len >= t->data_len) {
+ len -= t->data_len;
+ mb->pkt_len -= t->data_len;
+ t->data_len = 0;
+ if (i > 0) {
+ rte_pktmbuf_free_seg(t);
+ --mb->nb_segs;
+ reverse[i - 1]->next = NULL;
+ }
+ } else {
+ t->data_len -= len;
+ mb->pkt_len -= len;
+ len = 0;
+ }
+ }
+ }
+
+ if (tail_ptr)
+ *tail_ptr = odp_packet_tail(*pkt);
+ if (tailroom)
+ *tailroom = odp_packet_tailroom(*pkt);
+
+ return 0;
+}
+
+void *odp_packet_offset(odp_packet_t pkt, uint32_t offset, uint32_t *len,
+ odp_packet_seg_t *seg)
+{
+ struct rte_mbuf *mb = &(odp_packet_hdr(pkt)->buf_hdr.mb);
+
+ do {
+ if (mb->data_len > offset) {
+ break;
+ } else {
+ offset -= mb->data_len;
+ mb = mb->next;
+ }
+ } while (mb);
+
+ if (mb) {
+ if (len)
+ *len = mb->data_len - offset;
+ if (seg)
+ *seg = (odp_packet_seg_t)(uintptr_t)mb;
+ return (void *)(rte_pktmbuf_mtod(mb, char *) + offset);
+ } else {
+ return NULL;
+ }
+}
+
+/*
+ *
+ * Meta-data
+ * ********************************************************
+ *
+ */
+
+int odp_packet_input_index(odp_packet_t pkt)
+{
+ return odp_pktio_index(odp_packet_hdr(pkt)->input);
+}
+
+void odp_packet_user_ptr_set(odp_packet_t pkt, const void *ctx)
+{
+ odp_packet_hdr(pkt)->buf_hdr.buf_cctx = ctx;
+}
+
+static inline void *packet_offset_to_ptr(odp_packet_t pkt, uint32_t *len,
+ const size_t offset)
+{
+ if (odp_unlikely(offset == ODP_PACKET_OFFSET_INVALID))
+ return NULL;
+
+ if (len)
+ return odp_packet_offset(pkt, offset, len, NULL);
+ else
+ return odp_packet_offset(pkt, offset, NULL, NULL);
+}
+
+void *odp_packet_l2_ptr(odp_packet_t pkt, uint32_t *len)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ if (!packet_hdr_has_l2(pkt_hdr))
+ return NULL;
+ return packet_offset_to_ptr(pkt, len, pkt_hdr->p.l2_offset);
+}
+
+uint32_t odp_packet_l2_offset(odp_packet_t pkt)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ if (!packet_hdr_has_l2(pkt_hdr))
+ return ODP_PACKET_OFFSET_INVALID;
+ return pkt_hdr->p.l2_offset;
+}
+
+int odp_packet_l2_offset_set(odp_packet_t pkt, uint32_t offset)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ if (odp_unlikely(offset >= (odp_packet_len(pkt) - 1)))
+ return -1;
+
+ packet_hdr_has_l2_set(pkt_hdr, 1);
+ pkt_hdr->p.l2_offset = offset;
+ return 0;
+}
+
+void *odp_packet_l3_ptr(odp_packet_t pkt, uint32_t *len)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ return packet_offset_to_ptr(pkt, len, pkt_hdr->p.l3_offset);
+}
+
+uint32_t odp_packet_l3_offset(odp_packet_t pkt)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ return pkt_hdr->p.l3_offset;
+}
+
+int odp_packet_l3_offset_set(odp_packet_t pkt, uint32_t offset)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ if (odp_unlikely(offset >= (odp_packet_len(pkt) - 1)))
+ return -1;
+
+ pkt_hdr->p.l3_offset = offset;
+ return 0;
+}
+
+void *odp_packet_l4_ptr(odp_packet_t pkt, uint32_t *len)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ return packet_offset_to_ptr(pkt, len, pkt_hdr->p.l4_offset);
+}
+
+uint32_t odp_packet_l4_offset(odp_packet_t pkt)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ return pkt_hdr->p.l4_offset;
+}
+
+int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ if (odp_unlikely(offset >= (odp_packet_len(pkt) - 1)))
+ return -1;
+
+ pkt_hdr->p.l4_offset = offset;
+ return 0;
+}
+
+void odp_packet_ts_set(odp_packet_t pkt, odp_time_t timestamp)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ pkt_hdr->timestamp = timestamp;
+ pkt_hdr->p.input_flags.timestamp = 1;
+}
+
+/*
+ *
+ * Segment level
+ * ********************************************************
+ *
+ */
+
+void *odp_packet_seg_data(odp_packet_t pkt ODP_UNUSED, odp_packet_seg_t seg)
+{
+ return odp_packet_data((odp_packet_t)(uintptr_t)seg);
+}
+
+uint32_t odp_packet_seg_data_len(odp_packet_t pkt ODP_UNUSED,
+ odp_packet_seg_t seg)
+{
+ return odp_packet_seg_len((odp_packet_t)(uintptr_t)seg);
+}
+
+/*
+ *
+ * Manipulation
+ * ********************************************************
+ *
+ */
+
+int odp_packet_add_data(odp_packet_t *pkt_ptr, uint32_t offset, uint32_t len)
+{
+ odp_packet_t pkt = *pkt_ptr;
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+ uint32_t pktlen = odp_packet_len(pkt);
+ odp_packet_t newpkt;
+
+ if (offset > pktlen)
+ return -1;
+
+ newpkt = odp_packet_alloc(pkt_hdr->buf_hdr.pool_hdl, pktlen + len);
+
+ if (newpkt == ODP_PACKET_INVALID)
+ return -1;
+
+ if (odp_packet_copy_from_pkt(newpkt, 0, pkt, 0, offset) != 0 ||
+ odp_packet_copy_from_pkt(newpkt, offset + len, pkt, offset,
+ pktlen - offset) != 0) {
+ odp_packet_free(newpkt);
+ return -1;
+ }
+
+ _odp_packet_copy_md_to_packet(pkt, newpkt);
+ odp_packet_free(pkt);
+ *pkt_ptr = newpkt;
+
+ return 1;
+}
+
+int odp_packet_rem_data(odp_packet_t *pkt_ptr, uint32_t offset, uint32_t len)
+{
+ odp_packet_t pkt = *pkt_ptr;
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+ uint32_t pktlen = odp_packet_len(pkt);
+ odp_packet_t newpkt;
+
+ if (offset > pktlen || offset + len > pktlen)
+ return -1;
+
+ newpkt = odp_packet_alloc(pkt_hdr->buf_hdr.pool_hdl, pktlen - len);
+
+ if (newpkt == ODP_PACKET_INVALID)
+ return -1;
+
+ if (odp_packet_copy_from_pkt(newpkt, 0, pkt, 0, offset) != 0 ||
+ odp_packet_copy_from_pkt(newpkt, offset, pkt, offset + len,
+ pktlen - offset - len) != 0) {
+ odp_packet_free(newpkt);
+ return -1;
+ }
+
+ _odp_packet_copy_md_to_packet(pkt, newpkt);
+ odp_packet_free(pkt);
+ *pkt_ptr = newpkt;
+
+ return 1;
+}
+
+int odp_packet_align(odp_packet_t *pkt, uint32_t offset, uint32_t len,
+ uint32_t align)
+{
+ int rc;
+ uint32_t shift;
+ uint32_t seglen = 0; /* GCC */
+ void *addr = odp_packet_offset(*pkt, offset, &seglen, NULL);
+ uint64_t uaddr = (uint64_t)(uintptr_t)addr;
+ uint64_t misalign;
+
+ if (align > ODP_CACHE_LINE_SIZE)
+ return -1;
+
+ if (seglen >= len) {
+ misalign = align <= 1 ? 0 :
+ ROUNDUP_ALIGN(uaddr, align) - uaddr;
+ if (misalign == 0)
+ return 0;
+ shift = align - misalign;
+ } else {
+ if (len > odp_packet_seg_len(*pkt))
+ return -1;
+ shift = len - seglen;
+ uaddr -= shift;
+ misalign = align <= 1 ? 0 :
+ ROUNDUP_ALIGN(uaddr, align) - uaddr;
+ if (misalign)
+ shift += align - misalign;
+ }
+
+ rc = odp_packet_extend_head(pkt, shift, NULL, NULL);
+ if (rc < 0)
+ return rc;
+
+ (void)odp_packet_move_data(*pkt, 0, shift,
+ odp_packet_len(*pkt) - shift);
+
+ (void)odp_packet_trunc_tail(pkt, shift, NULL, NULL);
+ return 1;
+}
+
+int odp_packet_concat(odp_packet_t *dst, odp_packet_t src)
+{
+ odp_packet_hdr_t *dst_hdr = odp_packet_hdr(*dst);
+ odp_packet_hdr_t *src_hdr = odp_packet_hdr(src);
+ struct rte_mbuf *mb_dst = pkt_to_mbuf(dst_hdr);
+ struct rte_mbuf *mb_src = pkt_to_mbuf(src_hdr);
+ odp_packet_t new_dst;
+ odp_pool_t pool;
+ uint32_t dst_len;
+ uint32_t src_len;
+
+ if (odp_likely(!rte_pktmbuf_chain(mb_dst, mb_src))) {
+ dst_hdr->buf_hdr.totsize += src_hdr->buf_hdr.totsize;
+ return 0;
+ }
+
+ /* Fall back to using standard copy operations after maximum number of
+ * segments has been reached. */
+ dst_len = odp_packet_len(*dst);
+ src_len = odp_packet_len(src);
+ pool = odp_packet_pool(*dst);
+
+ new_dst = odp_packet_copy(*dst, pool);
+ if (odp_unlikely(new_dst == ODP_PACKET_INVALID))
+ return -1;
+
+ if (odp_packet_extend_tail(&new_dst, src_len, NULL, NULL) >= 0) {
+ (void)odp_packet_copy_from_pkt(new_dst, dst_len,
+ src, 0, src_len);
+ odp_packet_free(*dst);
+ odp_packet_free(src);
+ *dst = new_dst;
+ return 1;
+ }
+
+ odp_packet_free(new_dst);
+ return -1;
+}
+
+int odp_packet_split(odp_packet_t *pkt, uint32_t len, odp_packet_t *tail)
+{
+ uint32_t pktlen = odp_packet_len(*pkt);
+
+ if (len >= pktlen || tail == NULL)
+ return -1;
+
+ *tail = odp_packet_copy_part(*pkt, len, pktlen - len,
+ odp_packet_pool(*pkt));
+
+ if (*tail == ODP_PACKET_INVALID)
+ return -1;
+
+ return odp_packet_trunc_tail(pkt, pktlen - len, NULL, NULL);
+}
+
+/*
+ *
+ * Copy
+ * ********************************************************
+ *
+ */
+
+odp_packet_t odp_packet_copy(odp_packet_t pkt, odp_pool_t pool)
+{
+ uint32_t pktlen = odp_packet_len(pkt);
+ odp_packet_t newpkt = odp_packet_alloc(pool, pktlen);
+
+ if (newpkt != ODP_PACKET_INVALID) {
+ if (_odp_packet_copy_md_to_packet(pkt, newpkt) ||
+ odp_packet_copy_from_pkt(newpkt, 0, pkt, 0, pktlen)) {
+ odp_packet_free(newpkt);
+ newpkt = ODP_PACKET_INVALID;
+ }
+ }
+
+ return newpkt;
+}
+
+odp_packet_t odp_packet_copy_part(odp_packet_t pkt, uint32_t offset,
+ uint32_t len, odp_pool_t pool)
+{
+ uint32_t pktlen = odp_packet_len(pkt);
+ odp_packet_t newpkt;
+
+ if (offset >= pktlen || offset + len > pktlen)
+ return ODP_PACKET_INVALID;
+
+ newpkt = odp_packet_alloc(pool, len);
+ if (newpkt != ODP_PACKET_INVALID)
+ odp_packet_copy_from_pkt(newpkt, 0, pkt, offset, len);
+
+ return newpkt;
+}
+
+int odp_packet_copy_to_mem(odp_packet_t pkt, uint32_t offset,
+ uint32_t len, void *dst)
+{
+ void *mapaddr;
+ uint32_t seglen = 0; /* GCC */
+ uint32_t cpylen;
+ uint8_t *dstaddr = (uint8_t *)dst;
+
+ if (offset + len > odp_packet_len(pkt))
+ return -1;
+
+ while (len > 0) {
+ mapaddr = odp_packet_offset(pkt, offset, &seglen, NULL);
+ cpylen = len > seglen ? seglen : len;
+ memcpy(dstaddr, mapaddr, cpylen);
+ offset += cpylen;
+ dstaddr += cpylen;
+ len -= cpylen;
+ }
+
+ return 0;
+}
+
+int odp_packet_copy_from_mem(odp_packet_t pkt, uint32_t offset,
+ uint32_t len, const void *src)
+{
+ void *mapaddr;
+ uint32_t seglen = 0; /* GCC */
+ uint32_t cpylen;
+ const uint8_t *srcaddr = (const uint8_t *)src;
+
+ if (offset + len > odp_packet_len(pkt))
+ return -1;
+
+ while (len > 0) {
+ mapaddr = odp_packet_offset(pkt, offset, &seglen, NULL);
+ cpylen = len > seglen ? seglen : len;
+ memcpy(mapaddr, srcaddr, cpylen);
+ offset += cpylen;
+ srcaddr += cpylen;
+ len -= cpylen;
+ }
+
+ return 0;
+}
+
+int odp_packet_copy_from_pkt(odp_packet_t dst, uint32_t dst_offset,
+ odp_packet_t src, uint32_t src_offset,
+ uint32_t len)
+{
+ odp_packet_hdr_t *dst_hdr = odp_packet_hdr(dst);
+ odp_packet_hdr_t *src_hdr = odp_packet_hdr(src);
+ void *dst_map;
+ void *src_map;
+ uint32_t cpylen, minseg;
+ uint32_t dst_seglen = 0; /* GCC */
+ uint32_t src_seglen = 0; /* GCC */
+ int overlap;
+
+ if (dst_offset + len > odp_packet_len(dst) ||
+ src_offset + len > odp_packet_len(src))
+ return -1;
+
+ overlap = (dst_hdr == src_hdr &&
+ ((dst_offset <= src_offset &&
+ dst_offset + len >= src_offset) ||
+ (src_offset <= dst_offset &&
+ src_offset + len >= dst_offset)));
+
+ if (overlap && src_offset < dst_offset) {
+ odp_packet_t temp =
+ odp_packet_copy_part(src, src_offset, len,
+ odp_packet_pool(src));
+ if (temp == ODP_PACKET_INVALID)
+ return -1;
+ odp_packet_copy_from_pkt(dst, dst_offset, temp, 0, len);
+ odp_packet_free(temp);
+ return 0;
+ }
+
+ while (len > 0) {
+ dst_map = odp_packet_offset(dst, dst_offset, &dst_seglen, NULL);
+ src_map = odp_packet_offset(src, src_offset, &src_seglen, NULL);
+
+ minseg = dst_seglen > src_seglen ? src_seglen : dst_seglen;
+ cpylen = len > minseg ? minseg : len;
+
+ if (overlap)
+ memmove(dst_map, src_map, cpylen);
+ else
+ memcpy(dst_map, src_map, cpylen);
+
+ dst_offset += cpylen;
+ src_offset += cpylen;
+ len -= cpylen;
+ }
+
+ return 0;
+}
+
+int odp_packet_copy_data(odp_packet_t pkt, uint32_t dst_offset,
+ uint32_t src_offset, uint32_t len)
+{
+ return odp_packet_copy_from_pkt(pkt, dst_offset,
+ pkt, src_offset, len);
+}
+
+int odp_packet_move_data(odp_packet_t pkt, uint32_t dst_offset,
+ uint32_t src_offset, uint32_t len)
+{
+ return odp_packet_copy_from_pkt(pkt, dst_offset,
+ pkt, src_offset, len);
+}
+
+/*
+ *
+ * Debugging
+ * ********************************************************
+ *
+ */
+
+void odp_packet_print(odp_packet_t pkt)
+{
+ odp_packet_seg_t seg;
+ int max_len = 512;
+ char str[max_len];
+ uint8_t *p;
+ int len = 0;
+ int n = max_len - 1;
+ odp_packet_hdr_t *hdr = odp_packet_hdr(pkt);
+ odp_buffer_t buf = _odp_packet_to_buffer(pkt);
+
+ len += snprintf(&str[len], n - len, "Packet ");
+ len += odp_buffer_snprint(&str[len], n - len, buf);
+ len += snprintf(&str[len], n - len, " input_flags 0x%" PRIx64 "\n",
+ hdr->p.input_flags.all);
+ len += snprintf(&str[len], n - len, " error_flags 0x%" PRIx32 "\n",
+ hdr->p.error_flags.all);
+ len += snprintf(&str[len], n - len, " output_flags 0x%" PRIx32 "\n",
+ hdr->p.output_flags.all);
+ len += snprintf(&str[len], n - len,
+ " l2_offset %" PRIu32 "\n", hdr->p.l2_offset);
+ len += snprintf(&str[len], n - len,
+ " l3_offset %" PRIu32 "\n", hdr->p.l3_offset);
+ len += snprintf(&str[len], n - len,
+ " l4_offset %" PRIu32 "\n", hdr->p.l4_offset);
+ len += snprintf(&str[len], n - len,
+ " frame_len %" PRIu32 "\n",
+ hdr->buf_hdr.mb.pkt_len);
+ len += snprintf(&str[len], n - len,
+ " input %" PRIu64 "\n",
+ odp_pktio_to_u64(hdr->input));
+ len += snprintf(&str[len], n - len,
+ " headroom %" PRIu32 "\n",
+ odp_packet_headroom(pkt));
+ len += snprintf(&str[len], n - len,
+ " tailroom %" PRIu32 "\n",
+ odp_packet_tailroom(pkt));
+ len += snprintf(&str[len], n - len,
+ " num_segs %i\n", odp_packet_num_segs(pkt));
+
+ seg = odp_packet_first_seg(pkt);
+
+ while (seg != ODP_PACKET_SEG_INVALID) {
+ len += snprintf(&str[len], n - len,
+ " seg_len %" PRIu32 "\n",
+ odp_packet_seg_data_len(pkt, seg));
+
+ seg = odp_packet_next_seg(pkt, seg);
+ }
+
+ str[len] = '\0';
+
+ ODP_PRINT("\n%s\n", str);
+ rte_pktmbuf_dump(stdout, &hdr->buf_hdr.mb, 32);
+
+ p = odp_packet_data(pkt);
+ ODP_ERR("00000000: %02X %02X %02X %02X %02X %02X %02X %02X\n",
+ p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
+ ODP_ERR("00000008: %02X %02X %02X %02X %02X %02X %02X %02X\n",
+ p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]);
+}
+
+int odp_packet_is_valid(odp_packet_t pkt)
+{
+ odp_buffer_t buf = _odp_packet_to_buffer(pkt);
+
+ return odp_buffer_is_valid(buf);
+}
+
+/*
+ *
+ * Internal Use Routines
+ * ********************************************************
+ *
+ */
+
+int _odp_packet_copy_md_to_packet(odp_packet_t srcpkt, odp_packet_t dstpkt)
+{
+ odp_packet_hdr_t *srchdr = odp_packet_hdr(srcpkt);
+ odp_packet_hdr_t *dsthdr = odp_packet_hdr(dstpkt);
+ uint32_t src_size = odp_packet_user_area_size(srcpkt);
+ uint32_t dst_size = odp_packet_user_area_size(dstpkt);
+
+ dsthdr->input = srchdr->input;
+ dsthdr->dst_queue = srchdr->dst_queue;
+ dsthdr->buf_hdr.buf_u64 = srchdr->buf_hdr.buf_u64;
+
+ dsthdr->buf_hdr.mb.port = srchdr->buf_hdr.mb.port;
+ dsthdr->buf_hdr.mb.ol_flags = srchdr->buf_hdr.mb.ol_flags;
+ dsthdr->buf_hdr.mb.packet_type = srchdr->buf_hdr.mb.packet_type;
+ dsthdr->buf_hdr.mb.vlan_tci = srchdr->buf_hdr.mb.vlan_tci;
+ dsthdr->buf_hdr.mb.hash = srchdr->buf_hdr.mb.hash;
+ dsthdr->buf_hdr.mb.vlan_tci_outer = srchdr->buf_hdr.mb.vlan_tci_outer;
+ dsthdr->buf_hdr.mb.tx_offload = srchdr->buf_hdr.mb.tx_offload;
+
+ if (dst_size != 0)
+ memcpy(odp_packet_user_area(dstpkt),
+ odp_packet_user_area(srcpkt),
+ dst_size <= src_size ? dst_size : src_size);
+
+ copy_packet_parser_metadata(srchdr, dsthdr);
+
+ /* Metadata copied, but return indication of whether the packet
+ * user area was truncated in the process. Note this can only
+ * happen when copying between different pools.
+ */
+ return dst_size < src_size;
+}
+
+/**
+ * Parser helper function for IPv4
+ */
+static inline uint8_t parse_ipv4(packet_parser_t *prs, const uint8_t **parseptr,
+ uint32_t *offset, uint32_t frame_len)
+{
+ const _odp_ipv4hdr_t *ipv4 = (const _odp_ipv4hdr_t *)*parseptr;
+ uint8_t ver = _ODP_IPV4HDR_VER(ipv4->ver_ihl);
+ uint8_t ihl = _ODP_IPV4HDR_IHL(ipv4->ver_ihl);
+ uint16_t frag_offset;
+ uint32_t dstaddr = odp_be_to_cpu_32(ipv4->dst_addr);
+ uint32_t l3_len = odp_be_to_cpu_16(ipv4->tot_len);
+
+ if (odp_unlikely(ihl < _ODP_IPV4HDR_IHL_MIN) ||
+ odp_unlikely(ver != 4) ||
+ (l3_len > frame_len - *offset)) {
+ prs->error_flags.ip_err = 1;
+ return 0;
+ }
+
+ *offset += ihl * 4;
+ *parseptr += ihl * 4;
+
+ if (odp_unlikely(ihl > _ODP_IPV4HDR_IHL_MIN))
+ prs->input_flags.ipopt = 1;
+
+ /* A packet is a fragment if:
+ * "more fragments" flag is set (all fragments except the last)
+ * OR
+ * "fragment offset" field is nonzero (all fragments except the first)
+ */
+ frag_offset = odp_be_to_cpu_16(ipv4->frag_offset);
+ if (odp_unlikely(_ODP_IPV4HDR_IS_FRAGMENT(frag_offset)))
+ prs->input_flags.ipfrag = 1;
+
+ /* Handle IPv4 broadcast / multicast */
+ prs->input_flags.ip_bcast = (dstaddr == 0xffffffff);
+ prs->input_flags.ip_mcast = (dstaddr >> 28) == 0xd;
+
+ return ipv4->proto;
+}
+
+/**
+ * Parser helper function for IPv6
+ */
+static inline uint8_t parse_ipv6(packet_parser_t *prs, const uint8_t **parseptr,
+ uint32_t *offset, uint32_t frame_len,
+ uint32_t seg_len)
+{
+ const _odp_ipv6hdr_t *ipv6 = (const _odp_ipv6hdr_t *)*parseptr;
+ const _odp_ipv6hdr_ext_t *ipv6ext;
+ uint32_t dstaddr0 = odp_be_to_cpu_32(ipv6->dst_addr.u8[0]);
+ uint32_t l3_len = odp_be_to_cpu_16(ipv6->payload_len) +
+ _ODP_IPV6HDR_LEN;
+
+ /* Basic sanity checks on IPv6 header */
+ if ((odp_be_to_cpu_32(ipv6->ver_tc_flow) >> 28) != 6 ||
+ l3_len > frame_len - *offset) {
+ prs->error_flags.ip_err = 1;
+ return 0;
+ }
+
+ /* IPv6 broadcast / multicast flags */
+ prs->input_flags.ip_mcast = (dstaddr0 & 0xff000000) == 0xff000000;
+ prs->input_flags.ip_bcast = 0;
+
+ /* Skip past IPv6 header */
+ *offset += sizeof(_odp_ipv6hdr_t);
+ *parseptr += sizeof(_odp_ipv6hdr_t);
+
+ /* Skip past any IPv6 extension headers */
+ if (ipv6->next_hdr == _ODP_IPPROTO_HOPOPTS ||
+ ipv6->next_hdr == _ODP_IPPROTO_ROUTE) {
+ prs->input_flags.ipopt = 1;
+
+ do {
+ ipv6ext = (const _odp_ipv6hdr_ext_t *)*parseptr;
+ uint16_t extlen = 8 + ipv6ext->ext_len * 8;
+
+ *offset += extlen;
+ *parseptr += extlen;
+ } while ((ipv6ext->next_hdr == _ODP_IPPROTO_HOPOPTS ||
+ ipv6ext->next_hdr == _ODP_IPPROTO_ROUTE) &&
+ *offset < seg_len);
+
+ if (*offset >= prs->l3_offset +
+ odp_be_to_cpu_16(ipv6->payload_len)) {
+ prs->error_flags.ip_err = 1;
+ return 0;
+ }
+
+ if (ipv6ext->next_hdr == _ODP_IPPROTO_FRAG)
+ prs->input_flags.ipfrag = 1;
+
+ return ipv6ext->next_hdr;
+ }
+
+ if (odp_unlikely(ipv6->next_hdr == _ODP_IPPROTO_FRAG)) {
+ prs->input_flags.ipopt = 1;
+ prs->input_flags.ipfrag = 1;
+ }
+
+ return ipv6->next_hdr;
+}
+
+/**
+ * Parser helper function for TCP
+ */
+static inline void parse_tcp(packet_parser_t *prs,
+ const uint8_t **parseptr, uint32_t *offset)
+{
+ const _odp_tcphdr_t *tcp = (const _odp_tcphdr_t *)*parseptr;
+
+ if (tcp->hl < sizeof(_odp_tcphdr_t) / sizeof(uint32_t))
+ prs->error_flags.tcp_err = 1;
+ else if ((uint32_t)tcp->hl * 4 > sizeof(_odp_tcphdr_t))
+ prs->input_flags.tcpopt = 1;
+
+ if (offset)
+ *offset += (uint32_t)tcp->hl * 4;
+ *parseptr += (uint32_t)tcp->hl * 4;
+}
+
+/**
+ * Parser helper function for UDP
+ */
+static inline void parse_udp(packet_parser_t *prs,
+ const uint8_t **parseptr, uint32_t *offset)
+{
+ const _odp_udphdr_t *udp = (const _odp_udphdr_t *)*parseptr;
+ uint32_t udplen = odp_be_to_cpu_16(udp->length);
+
+ if (odp_unlikely(udplen < sizeof(_odp_udphdr_t)))
+ prs->error_flags.udp_err = 1;
+
+ if (offset)
+ *offset += sizeof(_odp_udphdr_t);
+ *parseptr += sizeof(_odp_udphdr_t);
+}
+
+/**
+ * Parse common packet headers up to given layer
+ *
+ * The function expects at least PACKET_PARSE_SEG_LEN bytes of data to be
+ * available from the ptr.
+ */
+int packet_parse_common(packet_parser_t *prs, const uint8_t *ptr,
+ uint32_t frame_len, uint32_t seg_len,
+ odp_pktio_parser_layer_t layer)
+{
+ uint32_t offset;
+ uint16_t ethtype;
+ const uint8_t *parseptr;
+ uint8_t ip_proto;
+ const _odp_ethhdr_t *eth;
+ uint16_t macaddr0, macaddr2, macaddr4;
+ const _odp_vlanhdr_t *vlan;
+
+ if (layer == ODP_PKTIO_PARSER_LAYER_NONE)
+ return 0;
+
+ /* We only support Ethernet for now */
+ prs->input_flags.eth = 1;
+ /* Assume valid L2 header, no CRC/FCS check in SW */
+ prs->input_flags.l2 = 1;
+ /* Detect jumbo frames */
+ if (frame_len > _ODP_ETH_LEN_MAX)
+ prs->input_flags.jumbo = 1;
+
+ offset = sizeof(_odp_ethhdr_t);
+ eth = (const _odp_ethhdr_t *)ptr;
+
+ /* Handle Ethernet broadcast/multicast addresses */
+ macaddr0 = odp_be_to_cpu_16(*((const uint16_t *)(const void *)eth));
+ prs->input_flags.eth_mcast = (macaddr0 & 0x0100) == 0x0100;
+
+ if (macaddr0 == 0xffff) {
+ macaddr2 =
+ odp_be_to_cpu_16(*((const uint16_t *)
+ (const void *)eth + 1));
+ macaddr4 =
+ odp_be_to_cpu_16(*((const uint16_t *)
+ (const void *)eth + 2));
+ prs->input_flags.eth_bcast =
+ (macaddr2 == 0xffff) && (macaddr4 == 0xffff);
+ } else {
+ prs->input_flags.eth_bcast = 0;
+ }
+
+ /* Get Ethertype */
+ ethtype = odp_be_to_cpu_16(eth->type);
+ parseptr = (const uint8_t *)(eth + 1);
+
+ /* Check for SNAP vs. DIX */
+ if (ethtype < _ODP_ETH_LEN_MAX) {
+ prs->input_flags.snap = 1;
+ if (ethtype > frame_len - offset) {
+ prs->error_flags.snap_len = 1;
+ goto parse_exit;
+ }
+ ethtype = odp_be_to_cpu_16(*((const uint16_t *)(uintptr_t)
+ (parseptr + 6)));
+ offset += 8;
+ parseptr += 8;
+ }
+
+ /* Parse the VLAN header(s), if present */
+ if (ethtype == _ODP_ETHTYPE_VLAN_OUTER) {
+ prs->input_flags.vlan_qinq = 1;
+ prs->input_flags.vlan = 1;
+
+ vlan = (const _odp_vlanhdr_t *)parseptr;
+ ethtype = odp_be_to_cpu_16(vlan->type);
+ offset += sizeof(_odp_vlanhdr_t);
+ parseptr += sizeof(_odp_vlanhdr_t);
+ }
+
+ if (ethtype == _ODP_ETHTYPE_VLAN) {
+ prs->input_flags.vlan = 1;
+ vlan = (const _odp_vlanhdr_t *)parseptr;
+ ethtype = odp_be_to_cpu_16(vlan->type);
+ offset += sizeof(_odp_vlanhdr_t);
+ parseptr += sizeof(_odp_vlanhdr_t);
+ }
+
+ if (layer == ODP_PKTIO_PARSER_LAYER_L2)
+ return prs->error_flags.all != 0;
+
+ /* Set l3_offset+flag only for known ethtypes */
+ prs->l3_offset = offset;
+ prs->input_flags.l3 = 1;
+
+ /* Parse Layer 3 headers */
+ switch (ethtype) {
+ case _ODP_ETHTYPE_IPV4:
+ prs->input_flags.ipv4 = 1;
+ ip_proto = parse_ipv4(prs, &parseptr, &offset, frame_len);
+ break;
+
+ case _ODP_ETHTYPE_IPV6:
+ prs->input_flags.ipv6 = 1;
+ ip_proto = parse_ipv6(prs, &parseptr, &offset, frame_len,
+ seg_len);
+ break;
+
+ case _ODP_ETHTYPE_ARP:
+ prs->input_flags.arp = 1;
+ ip_proto = 255; /* Reserved invalid by IANA */
+ break;
+
+ default:
+ prs->input_flags.l3 = 0;
+ prs->l3_offset = ODP_PACKET_OFFSET_INVALID;
+ ip_proto = 255; /* Reserved invalid by IANA */
+ }
+
+ if (layer == ODP_PKTIO_PARSER_LAYER_L3)
+ return prs->error_flags.all != 0;
+
+ /* Set l4_offset+flag only for known ip_proto */
+ prs->l4_offset = offset;
+ prs->input_flags.l4 = 1;
+
+ /* Parse Layer 4 headers */
+ switch (ip_proto) {
+ case _ODP_IPPROTO_ICMPv4:
+ /* Fall through */
+
+ case _ODP_IPPROTO_ICMPv6:
+ prs->input_flags.icmp = 1;
+ break;
+
+ case _ODP_IPPROTO_TCP:
+ if (odp_unlikely(offset + _ODP_TCPHDR_LEN > seg_len))
+ return -1;
+ prs->input_flags.tcp = 1;
+ parse_tcp(prs, &parseptr, NULL);
+ break;
+
+ case _ODP_IPPROTO_UDP:
+ if (odp_unlikely(offset + _ODP_UDPHDR_LEN > seg_len))
+ return -1;
+ prs->input_flags.udp = 1;
+ parse_udp(prs, &parseptr, NULL);
+ break;
+
+ case _ODP_IPPROTO_AH:
+ prs->input_flags.ipsec = 1;
+ prs->input_flags.ipsec_ah = 1;
+ break;
+
+ case _ODP_IPPROTO_ESP:
+ prs->input_flags.ipsec = 1;
+ prs->input_flags.ipsec_esp = 1;
+ break;
+
+ case _ODP_IPPROTO_SCTP:
+ prs->input_flags.sctp = 1;
+ break;
+
+ default:
+ prs->input_flags.l4 = 0;
+ prs->l4_offset = ODP_PACKET_OFFSET_INVALID;
+ break;
+ }
+parse_exit:
+ return prs->error_flags.all != 0;
+}
+/**
+ * Simple packet parser
+ */
+int packet_parse_layer(odp_packet_hdr_t *pkt_hdr,
+ odp_pktio_parser_layer_t layer)
+{
+ uint32_t seg_len = odp_packet_seg_len((odp_packet_t)pkt_hdr);
+ uint32_t len = packet_len(pkt_hdr);
+ void *base = odp_packet_data((odp_packet_t)pkt_hdr);
+
+ return packet_parse_common(&pkt_hdr->p, base, len, seg_len, layer);
+}
+
+uint64_t odp_packet_to_u64(odp_packet_t hdl)
+{
+ return _odp_pri(hdl);
+}
+
+uint64_t odp_packet_seg_to_u64(odp_packet_seg_t hdl)
+{
+ return _odp_pri(hdl);
+}
+
+odp_packet_t odp_packet_ref_static(odp_packet_t pkt)
+{
+ return odp_packet_copy(pkt, odp_packet_pool(pkt));
+}
+
+odp_packet_t odp_packet_ref(odp_packet_t pkt, uint32_t offset)
+{
+ odp_packet_t new;
+ int ret;
+
+ new = odp_packet_copy(pkt, odp_packet_pool(pkt));
+
+ if (new == ODP_PACKET_INVALID) {
+ ODP_ERR("copy failed\n");
+ return ODP_PACKET_INVALID;
+ }
+
+ ret = odp_packet_trunc_head(&new, offset, NULL, NULL);
+
+ if (ret < 0) {
+ ODP_ERR("trunk_head failed\n");
+ odp_packet_free(new);
+ return ODP_PACKET_INVALID;
+ }
+
+ return new;
+}
+
+odp_packet_t odp_packet_ref_pkt(odp_packet_t pkt, uint32_t offset,
+ odp_packet_t hdr)
+{
+ odp_packet_t new;
+ int ret;
+
+ new = odp_packet_copy(pkt, odp_packet_pool(pkt));
+
+ if (new == ODP_PACKET_INVALID) {
+ ODP_ERR("copy failed\n");
+ return ODP_PACKET_INVALID;
+ }
+
+ if (offset) {
+ ret = odp_packet_trunc_head(&new, offset, NULL, NULL);
+
+ if (ret < 0) {
+ ODP_ERR("trunk_head failed\n");
+ odp_packet_free(new);
+ return ODP_PACKET_INVALID;
+ }
+ }
+
+ ret = odp_packet_concat(&hdr, new);
+
+ if (ret < 0) {
+ ODP_ERR("concat failed\n");
+ odp_packet_free(new);
+ return ODP_PACKET_INVALID;
+ }
+
+ return hdr;
+}
+
+int odp_packet_has_ref(odp_packet_t pkt)
+{
+ (void)pkt;
+
+ return 0;
+}
+
+uint32_t odp_packet_unshared_len(odp_packet_t pkt)
+{
+ return odp_packet_len(pkt);
+}
+
+/* Include non-inlined versions of API functions */
+#if ODP_ABI_COMPAT == 1
+#include <odp/api/plat/packet_inlines_api.h>
+#endif
diff --git a/platform/linux-dpdk/odp_packet_dpdk.c b/platform/linux-dpdk/odp_packet_dpdk.c
new file mode 100644
index 000000000..d056a8242
--- /dev/null
+++ b/platform/linux-dpdk/odp_packet_dpdk.c
@@ -0,0 +1,712 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp_posix_extensions.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <poll.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <linux/ethtool.h>
+#include <linux/sockios.h>
+
+#include <odp/api/cpu.h>
+#include <odp/api/hints.h>
+#include <odp/api/thread.h>
+
+#include <odp/api/system_info.h>
+#include <odp_debug_internal.h>
+#include <odp_classification_internal.h>
+#include <odp_packet_io_internal.h>
+#include <odp_packet_dpdk.h>
+#include <net/if.h>
+#include <math.h>
+
+/* Ops for all implementation of pktio.
+ * Order matters. The first implementation to setup successfully
+ * will be picked.
+ * Array must be NULL terminated */
+const pktio_if_ops_t * const pktio_if_ops[] = {
+ &loopback_pktio_ops,
+ &dpdk_pktio_ops,
+ NULL
+};
+
+extern pktio_table_t *pktio_tbl;
+
+static uint32_t mtu_get_pkt_dpdk(pktio_entry_t *pktio_entry);
+
+/* Test if s has only digits or not. Dpdk pktio uses only digits.*/
+static int _dpdk_netdev_is_valid(const char *s)
+{
+ while (*s) {
+ if (!isdigit(*s))
+ return 0;
+ s++;
+ }
+
+ return 1;
+}
+
+static void rss_conf_to_hash_proto(struct rte_eth_rss_conf *rss_conf,
+ const odp_pktin_hash_proto_t *hash_proto)
+{
+ memset(rss_conf, 0, sizeof(struct rte_eth_rss_conf));
+
+ if (hash_proto->proto.ipv4_udp)
+ rss_conf->rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
+ if (hash_proto->proto.ipv4_tcp)
+ rss_conf->rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
+ if (hash_proto->proto.ipv4)
+ rss_conf->rss_hf |= ETH_RSS_IPV4 | ETH_RSS_FRAG_IPV4 |
+ ETH_RSS_NONFRAG_IPV4_OTHER;
+ if (hash_proto->proto.ipv6_udp)
+ rss_conf->rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP |
+ ETH_RSS_IPV6_UDP_EX;
+ if (hash_proto->proto.ipv6_tcp)
+ rss_conf->rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP |
+ ETH_RSS_IPV6_TCP_EX;
+ if (hash_proto->proto.ipv6)
+ rss_conf->rss_hf |= ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 |
+ ETH_RSS_NONFRAG_IPV6_OTHER |
+ ETH_RSS_IPV6_EX;
+ rss_conf->rss_key = NULL;
+}
+
+static void _dpdk_print_port_mac(uint8_t portid)
+{
+ struct ether_addr eth_addr;
+
+ memset(&eth_addr, 0, sizeof(eth_addr));
+ rte_eth_macaddr_get(portid, &eth_addr);
+ ODP_DBG("Port %u, MAC address: %02X:%02X:%02X:%02X:%02X:%02X\n",
+ (unsigned)portid,
+ eth_addr.addr_bytes[0],
+ eth_addr.addr_bytes[1],
+ eth_addr.addr_bytes[2],
+ eth_addr.addr_bytes[3],
+ eth_addr.addr_bytes[4],
+ eth_addr.addr_bytes[5]);
+}
+
+static int input_queues_config_pkt_dpdk(pktio_entry_t *pktio_entry,
+ const odp_pktin_queue_param_t *p)
+{
+ odp_pktin_mode_t mode = pktio_entry->s.param.in_mode;
+
+ /**
+ * Scheduler synchronizes input queue polls. Only single thread
+ * at a time polls a queue */
+ if (mode == ODP_PKTIN_MODE_SCHED ||
+ p->op_mode == ODP_PKTIO_OP_MT_UNSAFE)
+ pktio_entry->s.pkt_dpdk.lockless_rx = 1;
+ else
+ pktio_entry->s.pkt_dpdk.lockless_rx = 0;
+
+ if (p->hash_enable && p->num_queues > 1) {
+ pktio_entry->s.pkt_dpdk.hash = p->hash_proto;
+ } else {
+ pktio_entry->s.pkt_dpdk.hash.proto.ipv4_udp = 1;
+ pktio_entry->s.pkt_dpdk.hash.proto.ipv4_tcp = 1;
+ pktio_entry->s.pkt_dpdk.hash.proto.ipv4 = 1;
+ pktio_entry->s.pkt_dpdk.hash.proto.ipv6_udp = 1;
+ pktio_entry->s.pkt_dpdk.hash.proto.ipv6_tcp = 1;
+ pktio_entry->s.pkt_dpdk.hash.proto.ipv6 = 1;
+ }
+
+ return 0;
+}
+
+static int output_queues_config_pkt_dpdk(pktio_entry_t *pktio_entry,
+ const odp_pktout_queue_param_t *p)
+{
+ pkt_dpdk_t *pkt_dpdk = &pktio_entry->s.pkt_dpdk;
+
+ if (p->op_mode == ODP_PKTIO_OP_MT_UNSAFE)
+ pkt_dpdk->lockless_tx = 1;
+ else
+ pkt_dpdk->lockless_tx = 0;
+
+ return 0;
+}
+
+static int setup_pkt_dpdk(odp_pktio_t pktio ODP_UNUSED, pktio_entry_t *pktio_entry,
+ const char *netdev, odp_pool_t pool ODP_UNUSED)
+{
+ uint8_t portid = 0;
+ struct rte_eth_dev_info dev_info;
+ pkt_dpdk_t * const pkt_dpdk = &pktio_entry->s.pkt_dpdk;
+ int i;
+
+ if (!_dpdk_netdev_is_valid(netdev)) {
+ ODP_DBG("Interface name should only contain numbers!: %s\n",
+ netdev);
+ return -1;
+ }
+
+ portid = atoi(netdev);
+ pkt_dpdk->portid = portid;
+ memset(&dev_info, 0, sizeof(struct rte_eth_dev_info));
+ rte_eth_dev_info_get(portid, &dev_info);
+ if (dev_info.driver_name == NULL) {
+ ODP_DBG("No driver found for interface: %s\n", netdev);
+ return -1;
+ }
+ if (!strcmp(dev_info.driver_name, "rte_ixgbe_pmd"))
+ pkt_dpdk->min_rx_burst = 4;
+ else
+ pkt_dpdk->min_rx_burst = 0;
+
+ _dpdk_print_port_mac(portid);
+
+ pkt_dpdk->capa.max_input_queues = RTE_MIN(dev_info.max_rx_queues,
+ PKTIO_MAX_QUEUES);
+ pkt_dpdk->capa.max_output_queues = RTE_MIN(dev_info.max_tx_queues,
+ PKTIO_MAX_QUEUES);
+
+ for (i = 0; i < PKTIO_MAX_QUEUES; i++) {
+ odp_ticketlock_init(&pkt_dpdk->rx_lock[i]);
+ odp_ticketlock_init(&pkt_dpdk->tx_lock[i]);
+ }
+ return 0;
+}
+
+static int close_pkt_dpdk(pktio_entry_t *pktio_entry)
+{
+ pkt_dpdk_t * const pkt_dpdk = &pktio_entry->s.pkt_dpdk;
+
+ if (pktio_entry->s.state == PKTIO_STATE_STOPPED)
+ rte_eth_dev_close(pkt_dpdk->portid);
+ return 0;
+}
+
+static int start_pkt_dpdk(pktio_entry_t *pktio_entry)
+{
+ int ret, i;
+ pkt_dpdk_t * const pkt_dpdk = &pktio_entry->s.pkt_dpdk;
+ uint8_t portid = pkt_dpdk->portid;
+ int sid = rte_eth_dev_socket_id(pkt_dpdk->portid);
+ int socket_id = sid < 0 ? 0 : sid;
+ uint16_t nbrxq, nbtxq;
+ pool_entry_t *pool_entry =
+ get_pool_entry(_odp_typeval(pktio_entry->s.pool));
+ uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
+ uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+ struct rte_eth_rss_conf rss_conf;
+
+ /* DPDK doesn't support nb_rx_q/nb_tx_q being 0 */
+ if (!pktio_entry->s.num_in_queue)
+ pktio_entry->s.num_in_queue = 1;
+ if (!pktio_entry->s.num_out_queue)
+ pktio_entry->s.num_out_queue = 1;
+
+ rss_conf_to_hash_proto(&rss_conf, &pkt_dpdk->hash);
+
+ struct rte_eth_conf port_conf = {
+ .rxmode = {
+ .mq_mode = ETH_MQ_RX_RSS,
+ .split_hdr_size = 0,
+ .header_split = 0, /**< Header Split */
+ .hw_ip_checksum = 0, /**< IP checksum offload */
+ .hw_vlan_filter = 0, /**< VLAN filtering */
+ .jumbo_frame = 1, /**< Jumbo Frame Support */
+ .hw_strip_crc = 0, /**< CRC stripp by hardware */
+ },
+ .rx_adv_conf = {
+ .rss_conf = rss_conf,
+ },
+ .txmode = {
+ .mq_mode = ETH_MQ_TX_NONE,
+ },
+ };
+
+ /* rx packet len same size as pool segment minus headroom and double
+ * VLAN tag
+ */
+ port_conf.rxmode.max_rx_pkt_len =
+ rte_pktmbuf_data_room_size(pool_entry->s.rte_mempool) -
+ 2 * 4 - RTE_PKTMBUF_HEADROOM;
+
+ nbtxq = pktio_entry->s.num_out_queue;
+ nbrxq = pktio_entry->s.num_in_queue;
+
+ ret = rte_eth_dev_configure(portid, nbrxq, nbtxq, &port_conf);
+ if (ret < 0) {
+ ODP_ERR("Cannot configure device: err=%d, port=%u\n",
+ ret, (unsigned)portid);
+ return -1;
+ }
+
+ if (nb_rxd + nb_txd > pool_entry->s.params.pkt.num / 4) {
+ double downrate = (double)(pool_entry->s.params.pkt.num / 4) /
+ (double)(nb_rxd + nb_txd);
+ nb_rxd >>= (int)ceil(downrate);
+ nb_txd >>= (int)ceil(downrate);
+ ODP_DBG("downrate %f\n", downrate);
+ ODP_DBG("Descriptors scaled down. RX: %u TX: %u pool: %u\n",
+ nb_rxd, nb_txd, pool_entry->s.params.pkt.num);
+ }
+ /* init one RX queue on each port */
+ for (i = 0; i < nbrxq; i++) {
+ ret = rte_eth_rx_queue_setup(portid, i, nb_rxd, socket_id,
+ NULL,
+ pool_entry->s.rte_mempool);
+ if (ret < 0) {
+ ODP_ERR("rxq:err=%d, port=%u\n", ret, (unsigned)portid);
+ return -1;
+ }
+ }
+
+ /* init one TX queue on each port */
+ for (i = 0; i < nbtxq; i++) {
+ ret = rte_eth_tx_queue_setup(portid, i, nb_txd, socket_id,
+ NULL);
+ if (ret < 0) {
+ ODP_ERR("txq:err=%d, port=%u\n", ret, (unsigned)portid);
+ return -1;
+ }
+ }
+
+ rte_eth_promiscuous_enable(portid);
+ /* Some DPDK PMD vdev like pcap do not support promisc mode change. Use
+ * system call for them. */
+ if (!rte_eth_promiscuous_get(portid))
+ pkt_dpdk->vdev_sysc_promisc = 1;
+ else
+ pkt_dpdk->vdev_sysc_promisc = 0;
+
+ rte_eth_allmulticast_enable(portid);
+
+ ret = rte_eth_dev_start(portid);
+ if (ret < 0) {
+ ODP_ERR("rte_eth_dev_start:err=%d, port=%u\n",
+ ret, portid);
+ return ret;
+ }
+
+ return 0;
+}
+
+static int stop_pkt_dpdk(pktio_entry_t *pktio_entry)
+{
+ rte_eth_dev_stop(pktio_entry->s.pkt_dpdk.portid);
+ return 0;
+}
+
+/* Forward declaration */
+static int send_pkt_dpdk(pktio_entry_t *pktio_entry, int index,
+ const odp_packet_t pkt_table[], int len);
+
+/* This function can't be called if pkt_dpdk->lockless_tx is true */
+static void _odp_pktio_send_completion(pktio_entry_t *pktio_entry)
+{
+ int i;
+ unsigned j;
+ odp_packet_t dummy;
+ pool_entry_t *pool_entry =
+ get_pool_entry(_odp_typeval(pktio_entry->s.pool));
+ struct rte_mempool *rte_mempool = pool_entry->s.rte_mempool;
+
+ for (j = 0; j < pktio_entry->s.num_out_queue; j++)
+ send_pkt_dpdk(pktio_entry, j, &dummy, 0);
+
+ for (i = 0; i < ODP_CONFIG_PKTIO_ENTRIES; ++i) {
+ pktio_entry_t *entry = &pktio_tbl->entries[i];
+
+ if (rte_mempool_avail_count(rte_mempool) != 0)
+ return;
+
+ if (entry == pktio_entry)
+ continue;
+
+ if (odp_ticketlock_trylock(&entry->s.txl)) {
+ if (entry->s.state != PKTIO_STATE_FREE &&
+ entry->s.ops == &dpdk_pktio_ops) {
+ for (j = 0; j < pktio_entry->s.num_out_queue;
+ j++)
+ send_pkt_dpdk(pktio_entry, j,
+ &dummy, 0);
+ }
+ odp_ticketlock_unlock(&entry->s.txl);
+ }
+ }
+
+ return;
+}
+
+static int recv_pkt_dpdk(pktio_entry_t *pktio_entry, int index,
+ odp_packet_t pkt_table[], int len)
+{
+ uint16_t nb_rx, i;
+ odp_packet_t *saved_pkt_table;
+ pkt_dpdk_t * const pkt_dpdk = &pktio_entry->s.pkt_dpdk;
+ uint8_t min = pkt_dpdk->min_rx_burst;
+ odp_time_t ts_val;
+ odp_time_t *ts = NULL;
+
+ if (odp_unlikely(min > len)) {
+ ODP_DBG("PMD requires >%d buffers burst. "
+ "Current %d, dropped %d\n", min, len, min - len);
+ saved_pkt_table = pkt_table;
+ pkt_table = malloc(min * sizeof(odp_packet_t));
+ }
+
+ if (!pkt_dpdk->lockless_rx)
+ odp_ticketlock_lock(&pkt_dpdk->rx_lock[index]);
+
+ nb_rx = rte_eth_rx_burst((uint8_t)pkt_dpdk->portid,
+ (uint16_t)index,
+ (struct rte_mbuf **)pkt_table,
+ (uint16_t)RTE_MAX(len, min));
+
+ if (pktio_entry->s.config.pktin.bit.ts_all ||
+ pktio_entry->s.config.pktin.bit.ts_ptp) {
+ ts_val = odp_time_global();
+ ts = &ts_val;
+ }
+
+ if (nb_rx == 0 && !pkt_dpdk->lockless_tx) {
+ pool_entry_t *pool_entry =
+ get_pool_entry(_odp_typeval(pktio_entry->s.pool));
+ struct rte_mempool *rte_mempool =
+ pool_entry->s.rte_mempool;
+ if (rte_mempool_avail_count(rte_mempool) == 0)
+ _odp_pktio_send_completion(pktio_entry);
+ }
+
+ if (!pkt_dpdk->lockless_rx)
+ odp_ticketlock_unlock(&pkt_dpdk->rx_lock[index]);
+
+ for (i = 0; i < nb_rx; ++i) {
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt_table[i]);
+
+ packet_parse_reset(pkt_hdr);
+ pkt_hdr->input = pktio_entry->s.handle;
+
+ if (!pktio_cls_enabled(pktio_entry) &&
+ pktio_entry->s.config.parser.layer)
+ packet_parse_layer(pkt_hdr,
+ pktio_entry->s.config.parser.layer);
+ packet_set_ts(pkt_hdr, ts);
+ }
+
+ if (odp_unlikely(min > len)) {
+ memcpy(saved_pkt_table, pkt_table,
+ len * sizeof(odp_packet_t));
+ for (i = len; i < nb_rx; i++)
+ odp_packet_free(pkt_table[i]);
+ nb_rx = RTE_MIN(len, nb_rx);
+ free(pkt_table);
+ pktio_entry->s.stats.in_discards += min - len;
+ pkt_table = saved_pkt_table;
+ }
+
+ if (pktio_cls_enabled(pktio_entry)) {
+ int failed = 0, success = 0;
+
+ for (i = 0; i < nb_rx; i++) {
+ odp_packet_t new_pkt;
+ odp_pool_t new_pool;
+ uint8_t *pkt_addr;
+ odp_packet_hdr_t parsed_hdr;
+ int ret;
+ odp_packet_hdr_t *pkt_hdr =
+ odp_packet_hdr(pkt_table[i]);
+
+ pkt_addr = odp_packet_data(pkt_table[i]);
+ ret = cls_classify_packet(pktio_entry, pkt_addr,
+ odp_packet_len(pkt_table[i]),
+ odp_packet_len(pkt_table[i]),
+ &new_pool, &parsed_hdr);
+ if (ret) {
+ failed++;
+ odp_packet_free(pkt_table[i]);
+ continue;
+ }
+ if (new_pool != odp_packet_pool(pkt_table[i])) {
+ new_pkt = odp_packet_copy(pkt_table[i],
+ new_pool);
+
+ odp_packet_free(pkt_table[i]);
+ if (new_pkt == ODP_PACKET_INVALID) {
+ failed++;
+ continue;
+ }
+ pkt_table[i] = new_pkt;
+ }
+ packet_set_ts(pkt_hdr, ts);
+ pktio_entry->s.stats.in_octets +=
+ odp_packet_len(pkt_table[i]);
+ copy_packet_cls_metadata(&parsed_hdr, pkt_hdr);
+ if (success != i)
+ pkt_table[success] = pkt_table[i];
+ ++success;
+ }
+ pktio_entry->s.stats.in_errors += failed;
+ pktio_entry->s.stats.in_ucast_pkts += nb_rx - failed;
+ nb_rx = success;
+ }
+
+ return nb_rx;
+}
+
+static int send_pkt_dpdk(pktio_entry_t *pktio_entry, int index,
+ const odp_packet_t pkt_table[], int len)
+{
+ int pkts;
+ pkt_dpdk_t * const pkt_dpdk = &pktio_entry->s.pkt_dpdk;
+
+ if (!pkt_dpdk->lockless_tx)
+ odp_ticketlock_lock(&pkt_dpdk->tx_lock[index]);
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-qual"
+ pkts = rte_eth_tx_burst(pkt_dpdk->portid, index,
+ (struct rte_mbuf **)pkt_table, len);
+#pragma GCC diagnostic pop
+
+ if (!pkt_dpdk->lockless_tx)
+ odp_ticketlock_unlock(&pkt_dpdk->tx_lock[index]);
+
+ if (pkts == 0) {
+ uint32_t mtu;
+
+ if (odp_unlikely(rte_errno != 0))
+ return -1;
+
+ mtu = mtu_get_pkt_dpdk(pktio_entry);
+ if (odp_unlikely(odp_packet_len(pkt_table[0]) > mtu)) {
+ __odp_errno = EMSGSIZE;
+ return -1;
+ }
+ }
+ rte_errno = 0;
+ return pkts;
+}
+
+static uint32_t _dpdk_vdev_mtu(uint8_t port_id)
+{
+ struct rte_eth_dev_info dev_info = {0};
+ struct ifreq ifr;
+ int ret;
+ int sockfd;
+
+ rte_eth_dev_info_get(port_id, &dev_info);
+ if_indextoname(dev_info.if_index, ifr.ifr_name);
+ sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+ ret = ioctl(sockfd, SIOCGIFMTU, &ifr);
+ close(sockfd);
+ if (ret < 0) {
+ ODP_DBG("ioctl SIOCGIFMTU error\n");
+ return 0;
+ }
+
+ return ifr.ifr_mtu;
+}
+
+static uint32_t mtu_get_pkt_dpdk(pktio_entry_t *pktio_entry)
+{
+ uint16_t mtu = 0;
+ int ret;
+
+ ret = rte_eth_dev_get_mtu(pktio_entry->s.pkt_dpdk.portid, &mtu);
+ if (ret < 0)
+ return 0;
+
+ /* some dpdk PMD vdev does not support getting mtu size,
+ * try to use system call if dpdk cannot get mtu value.
+ */
+ if (mtu == 0)
+ mtu = _dpdk_vdev_mtu(pktio_entry->s.pkt_dpdk.portid);
+ return mtu;
+}
+
+static int _dpdk_vdev_promisc_mode_set(uint8_t port_id, int enable)
+{
+ struct rte_eth_dev_info dev_info = {0};
+ struct ifreq ifr;
+ int ret;
+ int sockfd;
+
+ rte_eth_dev_info_get(port_id, &dev_info);
+ if_indextoname(dev_info.if_index, ifr.ifr_name);
+ sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+
+ ret = ioctl(sockfd, SIOCGIFFLAGS, &ifr);
+ if (ret < 0) {
+ close(sockfd);
+ ODP_DBG("ioctl SIOCGIFFLAGS error\n");
+ return -1;
+ }
+
+ if (enable)
+ ifr.ifr_flags |= IFF_PROMISC;
+ else
+ ifr.ifr_flags &= ~(IFF_PROMISC);
+
+ ret = ioctl(sockfd, SIOCSIFFLAGS, &ifr);
+ if (ret < 0) {
+ close(sockfd);
+ ODP_DBG("ioctl SIOCSIFFLAGS error\n");
+ return -1;
+ }
+
+ ret = ioctl(sockfd, SIOCGIFMTU, &ifr);
+ if (ret < 0) {
+ close(sockfd);
+ ODP_DBG("ioctl SIOCGIFMTU error\n");
+ return -1;
+ }
+
+ ODP_DBG("vdev promisc set to %d\n", enable);
+ close(sockfd);
+ return 0;
+}
+
+static int promisc_mode_set_pkt_dpdk(pktio_entry_t *pktio_entry, int enable)
+{
+ uint8_t portid = pktio_entry->s.pkt_dpdk.portid;
+ if (enable)
+ rte_eth_promiscuous_enable(portid);
+ else
+ rte_eth_promiscuous_disable(portid);
+
+ if (pktio_entry->s.pkt_dpdk.vdev_sysc_promisc) {
+ int ret = _dpdk_vdev_promisc_mode_set(portid, enable);
+ if (ret < 0)
+ ODP_DBG("vdev promisc mode fail\n");
+ }
+
+ return 0;
+}
+
+static int _dpdk_vdev_promisc_mode(uint8_t port_id)
+{
+ struct rte_eth_dev_info dev_info = {0};
+ struct ifreq ifr;
+ int ret;
+ int sockfd;
+
+ rte_eth_dev_info_get(port_id, &dev_info);
+ if_indextoname(dev_info.if_index, ifr.ifr_name);
+ sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+ ret = ioctl(sockfd, SIOCGIFFLAGS, &ifr);
+ close(sockfd);
+ if (ret < 0) {
+ ODP_DBG("ioctl SIOCGIFFLAGS error\n");
+ return -1;
+ }
+
+ if (ifr.ifr_flags & IFF_PROMISC) {
+ ODP_DBG("promisc is 1\n");
+ return 1;
+ } else
+ return 0;
+}
+
+static int promisc_mode_get_pkt_dpdk(pktio_entry_t *pktio_entry)
+{
+ uint8_t portid = pktio_entry->s.pkt_dpdk.portid;
+ if (pktio_entry->s.pkt_dpdk.vdev_sysc_promisc)
+ return _dpdk_vdev_promisc_mode(portid);
+ else
+ return rte_eth_promiscuous_get(portid);
+
+}
+
+static int mac_get_pkt_dpdk(pktio_entry_t *pktio_entry, void *mac_addr)
+{
+ rte_eth_macaddr_get(pktio_entry->s.pkt_dpdk.portid,
+ (struct ether_addr *)mac_addr);
+ return ETH_ALEN;
+}
+
+
+static int capability_pkt_dpdk(pktio_entry_t *pktio_entry,
+ odp_pktio_capability_t *capa)
+{
+ *capa = pktio_entry->s.pkt_dpdk.capa;
+ return 0;
+}
+static int link_status_pkt_dpdk(pktio_entry_t *pktio_entry)
+{
+ struct rte_eth_link link;
+
+ rte_eth_link_get(pktio_entry->s.pkt_dpdk.portid, &link);
+ return link.link_status;
+}
+
+static void stats_convert(struct rte_eth_stats *rte_stats,
+ odp_pktio_stats_t *stats)
+{
+ stats->in_octets = rte_stats->ibytes;
+ stats->in_ucast_pkts = 0;
+ stats->in_discards = rte_stats->imissed;
+ stats->in_errors = rte_stats->ierrors;
+ stats->in_unknown_protos = 0;
+ stats->out_octets = rte_stats->obytes;
+ stats->out_ucast_pkts = 0;
+ stats->out_discards = 0;
+ stats->out_errors = rte_stats->oerrors;
+}
+
+static int stats_pkt_dpdk(pktio_entry_t *pktio_entry, odp_pktio_stats_t *stats)
+{
+ int ret;
+ struct rte_eth_stats rte_stats;
+
+ ret = rte_eth_stats_get(pktio_entry->s.pkt_dpdk.portid, &rte_stats);
+
+ if (ret == 0) {
+ stats_convert(&rte_stats, stats);
+ return 0;
+ } else {
+ if (ret > 0)
+ return -ret;
+ else
+ return ret;
+ }
+}
+
+static int stats_reset_pkt_dpdk(pktio_entry_t *pktio_entry)
+{
+ rte_eth_stats_reset(pktio_entry->s.pkt_dpdk.portid);
+ return 0;
+}
+
+const pktio_if_ops_t dpdk_pktio_ops = {
+ .name = "odp-dpdk",
+ .print = NULL,
+ .init_global = NULL,
+ .init_local = NULL,
+ .term = NULL,
+ .open = setup_pkt_dpdk,
+ .close = close_pkt_dpdk,
+ .start = start_pkt_dpdk,
+ .stop = stop_pkt_dpdk,
+ .stats = stats_pkt_dpdk,
+ .stats_reset = stats_reset_pkt_dpdk,
+ .pktin_ts_res = NULL,
+ .pktin_ts_from_ns = NULL,
+ .mtu_get = mtu_get_pkt_dpdk,
+ .promisc_mode_set = promisc_mode_set_pkt_dpdk,
+ .promisc_mode_get = promisc_mode_get_pkt_dpdk,
+ .mac_get = mac_get_pkt_dpdk,
+ .link_status = link_status_pkt_dpdk,
+ .capability = capability_pkt_dpdk,
+ .config = NULL,
+ .input_queues_config = input_queues_config_pkt_dpdk,
+ .output_queues_config = output_queues_config_pkt_dpdk,
+ .recv = recv_pkt_dpdk,
+ .send = send_pkt_dpdk
+};
diff --git a/platform/linux-dpdk/odp_packet_flags.c b/platform/linux-dpdk/odp_packet_flags.c
new file mode 100644
index 000000000..d8c68f021
--- /dev/null
+++ b/platform/linux-dpdk/odp_packet_flags.c
@@ -0,0 +1,297 @@
+/* Copyright (c) 2014, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/api/plat/packet_flag_inlines.h>
+#include <odp/api/packet_flags.h>
+#include <odp_packet_internal.h>
+
+#define retflag(pkt, x) do { \
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); \
+ return pkt_hdr->p.x; \
+ } while (0)
+
+#define setflag(pkt, x, v) do { \
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); \
+ pkt_hdr->p.x = (v) & 1; \
+ } while (0)
+
+int odp_packet_has_error(odp_packet_t pkt)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ return pkt_hdr->p.error_flags.all != 0;
+}
+
+/* Get Input Flags */
+
+int odp_packet_has_l2_error(odp_packet_t pkt)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+ /* L2 parsing is always done by default and hence
+ no additional check is required */
+ return pkt_hdr->p.error_flags.frame_len
+ | pkt_hdr->p.error_flags.snap_len
+ | pkt_hdr->p.error_flags.l2_chksum;
+}
+
+int odp_packet_has_l3(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.l3);
+}
+
+int odp_packet_has_l3_error(odp_packet_t pkt)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ return pkt_hdr->p.error_flags.ip_err;
+}
+
+int odp_packet_has_l4(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.l4);
+}
+
+int odp_packet_has_l4_error(odp_packet_t pkt)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ return pkt_hdr->p.error_flags.tcp_err | pkt_hdr->p.error_flags.udp_err;
+}
+
+int odp_packet_has_eth_bcast(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.eth_bcast);
+}
+
+int odp_packet_has_eth_mcast(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.eth_mcast);
+}
+
+int odp_packet_has_vlan(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.vlan);
+}
+
+int odp_packet_has_vlan_qinq(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.vlan_qinq);
+}
+
+int odp_packet_has_arp(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.arp);
+}
+
+int odp_packet_has_ipv4(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.ipv4);
+}
+
+int odp_packet_has_ipv6(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.ipv6);
+}
+
+int odp_packet_has_ip_bcast(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.ip_bcast);
+}
+
+int odp_packet_has_ip_mcast(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.ip_mcast);
+}
+
+int odp_packet_has_ipfrag(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.ipfrag);
+}
+
+int odp_packet_has_ipopt(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.ipopt);
+}
+
+int odp_packet_has_ipsec(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.ipsec);
+}
+
+int odp_packet_has_udp(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.udp);
+}
+
+int odp_packet_has_tcp(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.tcp);
+}
+
+int odp_packet_has_sctp(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.sctp);
+}
+
+int odp_packet_has_icmp(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.icmp);
+}
+
+odp_packet_color_t odp_packet_color(odp_packet_t pkt)
+{
+ retflag(pkt, input_flags.color);
+}
+
+void odp_packet_color_set(odp_packet_t pkt, odp_packet_color_t color)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ pkt_hdr->p.input_flags.color = color;
+}
+
+odp_bool_t odp_packet_drop_eligible(odp_packet_t pkt)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ return !pkt_hdr->p.input_flags.nodrop;
+}
+
+void odp_packet_drop_eligible_set(odp_packet_t pkt, odp_bool_t drop)
+{
+ setflag(pkt, input_flags.nodrop, !drop);
+}
+
+int8_t odp_packet_shaper_len_adjust(odp_packet_t pkt)
+{
+ retflag(pkt, output_flags.shaper_len_adj);
+}
+
+void odp_packet_shaper_len_adjust_set(odp_packet_t pkt, int8_t adj)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ pkt_hdr->p.output_flags.shaper_len_adj = adj;
+}
+
+/* Set Input Flags */
+
+void odp_packet_has_l2_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.l2, val);
+}
+
+void odp_packet_has_l3_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.l3, val);
+}
+
+void odp_packet_has_l4_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.l4, val);
+}
+
+void odp_packet_has_eth_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.eth, val);
+}
+
+void odp_packet_has_eth_bcast_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.eth_bcast, val);
+}
+
+void odp_packet_has_eth_mcast_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.eth_mcast, val);
+}
+
+void odp_packet_has_jumbo_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.jumbo, val);
+}
+
+void odp_packet_has_vlan_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.vlan, val);
+}
+
+void odp_packet_has_vlan_qinq_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.vlan_qinq, val);
+}
+
+void odp_packet_has_arp_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.arp, val);
+}
+
+void odp_packet_has_ipv4_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.ipv4, val);
+}
+
+void odp_packet_has_ipv6_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.ipv6, val);
+}
+
+void odp_packet_has_ip_bcast_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.ip_bcast, val);
+}
+
+void odp_packet_has_ip_mcast_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.ip_mcast, val);
+}
+
+void odp_packet_has_ipfrag_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.ipfrag, val);
+}
+
+void odp_packet_has_ipopt_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.ipopt, val);
+}
+
+void odp_packet_has_ipsec_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.ipsec, val);
+}
+
+void odp_packet_has_udp_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.udp, val);
+}
+
+void odp_packet_has_tcp_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.tcp, val);
+}
+
+void odp_packet_has_sctp_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.sctp, val);
+}
+
+void odp_packet_has_icmp_set(odp_packet_t pkt, int val)
+{
+ setflag(pkt, input_flags.icmp, val);
+}
+
+void odp_packet_has_ts_clr(odp_packet_t pkt)
+{
+ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
+
+ pkt_hdr->p.input_flags.timestamp = 0;
+}
+
+/* Include non-inlined versions of API functions */
+#if ODP_ABI_COMPAT == 1
+#include <odp/api/plat/packet_flag_inlines_api.h>
+#endif
diff --git a/platform/linux-dpdk/odp_pool.c b/platform/linux-dpdk/odp_pool.c
new file mode 100644
index 000000000..0821cdcac
--- /dev/null
+++ b/platform/linux-dpdk/odp_pool.c
@@ -0,0 +1,653 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/api/std_types.h>
+#include <odp/api/pool.h>
+#include <odp_pool_internal.h>
+#include <odp_buffer_internal.h>
+#include <odp_packet_internal.h>
+#include <odp_timer_internal.h>
+#include <odp_align_internal.h>
+#include <odp/api/shared_memory.h>
+#include <odp/api/align.h>
+#include <odp_internal.h>
+#include <odp_config_internal.h>
+#include <odp/api/hints.h>
+#include <odp/api/debug.h>
+#include <odp_debug_internal.h>
+#include <odp/api/cpumask.h>
+
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+#include <inttypes.h>
+
+/* for DPDK */
+#include <odp_packet_dpdk.h>
+
+#ifdef POOL_USE_TICKETLOCK
+#include <odp/api/ticketlock.h>
+#define LOCK(a) odp_ticketlock_lock(a)
+#define UNLOCK(a) odp_ticketlock_unlock(a)
+#define LOCK_INIT(a) odp_ticketlock_init(a)
+#else
+#include <odp/api/spinlock.h>
+#define LOCK(a) odp_spinlock_lock(a)
+#define UNLOCK(a) odp_spinlock_unlock(a)
+#define LOCK_INIT(a) odp_spinlock_init(a)
+#endif
+
+/* Define a practical limit for contiguous memory allocations */
+#define MAX_SIZE (10 * 1024 * 1024)
+
+typedef struct pool_table_t {
+ pool_entry_t pool[ODP_CONFIG_POOLS];
+ odp_shm_t shm;
+} pool_table_t;
+
+
+/* The pool table ptr - resides in shared memory */
+static pool_table_t *pool_tbl;
+
+/* Pool entry pointers (for inlining) */
+void *pool_entry_ptr[ODP_CONFIG_POOLS];
+
+
+int odp_pool_init_global(void)
+{
+ uint32_t i;
+ odp_shm_t shm;
+
+ shm = odp_shm_reserve("odp_pools",
+ sizeof(pool_table_t),
+ sizeof(pool_entry_t), 0);
+
+ pool_tbl = odp_shm_addr(shm);
+
+ if (pool_tbl == NULL)
+ return -1;
+
+ memset(pool_tbl, 0, sizeof(pool_table_t));
+ pool_tbl->shm = shm;
+
+ for (i = 0; i < ODP_CONFIG_POOLS; i++) {
+ /* init locks */
+ pool_entry_t *pool = &pool_tbl->pool[i];
+ LOCK_INIT(&pool->s.lock);
+ pool->s.pool_hdl = pool_index_to_handle(i);
+
+ pool_entry_ptr[i] = pool;
+ }
+
+ ODP_DBG("\nPool init global\n");
+ ODP_DBG(" pool_entry_s size %zu\n", sizeof(struct pool_entry_s));
+ ODP_DBG(" pool_entry_t size %zu\n", sizeof(pool_entry_t));
+ ODP_DBG(" odp_buffer_hdr_t size %zu\n", sizeof(odp_buffer_hdr_t));
+ ODP_DBG("\n");
+
+ return 0;
+}
+
+int odp_pool_init_local(void)
+{
+ return 0;
+}
+
+int odp_pool_term_global(void)
+{
+ int ret;
+
+ ret = odp_shm_free(pool_tbl->shm);
+ if (ret < 0)
+ ODP_ERR("shm free failed");
+
+ return ret;
+}
+
+int odp_pool_term_local(void)
+{
+ return 0;
+}
+
+int odp_pool_capability(odp_pool_capability_t *capa)
+{
+ memset(capa, 0, sizeof(odp_pool_capability_t));
+
+ capa->max_pools = ODP_CONFIG_POOLS;
+
+ /* Buffer pools */
+ capa->buf.max_pools = ODP_CONFIG_POOLS;
+ capa->buf.max_align = ODP_CONFIG_BUFFER_ALIGN_MAX;
+ capa->buf.max_size = MAX_SIZE;
+ capa->buf.max_num = CONFIG_POOL_MAX_NUM;
+
+ /* Packet pools */
+ capa->pkt.max_pools = ODP_CONFIG_POOLS;
+ capa->pkt.max_len = 0;
+ capa->pkt.max_num = CONFIG_POOL_MAX_NUM;
+ capa->pkt.min_headroom = CONFIG_PACKET_HEADROOM;
+ capa->pkt.min_tailroom = CONFIG_PACKET_TAILROOM;
+ capa->pkt.max_segs_per_pkt = CONFIG_PACKET_MAX_SEGS;
+ capa->pkt.min_seg_len = CONFIG_PACKET_SEG_LEN_MIN;
+ capa->pkt.max_seg_len = CONFIG_PACKET_SEG_LEN_MAX;
+ capa->pkt.max_uarea_size = MAX_SIZE;
+
+ /* Timeout pools */
+ capa->tmo.max_pools = ODP_CONFIG_POOLS;
+ capa->tmo.max_num = CONFIG_POOL_MAX_NUM;
+
+ return 0;
+}
+
+struct mbuf_ctor_arg {
+ uint16_t seg_buf_offset; /* To skip the ODP buf/pkt/tmo header */
+ uint16_t seg_buf_size; /* size of user data */
+ int type;
+ int pkt_uarea_size; /* size of user area in bytes */
+};
+
+struct mbuf_pool_ctor_arg {
+ /* This has to be the first member */
+ struct rte_pktmbuf_pool_private pkt;
+ odp_pool_t pool_hdl;
+};
+
+static void
+odp_dpdk_mbuf_pool_ctor(struct rte_mempool *mp,
+ void *opaque_arg)
+{
+ struct mbuf_pool_ctor_arg *mbp_priv;
+
+ if (mp->private_data_size < sizeof(struct mbuf_pool_ctor_arg)) {
+ ODP_ERR("(%s) private_data_size %d < %d",
+ mp->name, (int) mp->private_data_size,
+ (int) sizeof(struct mbuf_pool_ctor_arg));
+ return;
+ }
+ mbp_priv = rte_mempool_get_priv(mp);
+ *mbp_priv = *((struct mbuf_pool_ctor_arg *)opaque_arg);
+}
+
+/* ODP DPDK mbuf constructor.
+ * This is a combination of rte_pktmbuf_init in rte_mbuf.c
+ * and testpmd_mbuf_ctor in testpmd.c
+ */
+static void
+odp_dpdk_mbuf_ctor(struct rte_mempool *mp,
+ void *opaque_arg,
+ void *raw_mbuf,
+ unsigned i)
+{
+ struct mbuf_ctor_arg *mb_ctor_arg;
+ struct rte_mbuf *mb = raw_mbuf;
+ struct odp_buffer_hdr_t *buf_hdr;
+ struct mbuf_pool_ctor_arg *mbp_ctor_arg = rte_mempool_get_priv(mp);
+
+ /* The rte_mbuf is at the begninning in all cases */
+ mb_ctor_arg = (struct mbuf_ctor_arg *)opaque_arg;
+ mb = (struct rte_mbuf *)raw_mbuf;
+
+ RTE_ASSERT(mp->elt_size >= sizeof(struct rte_mbuf));
+
+ memset(mb, 0, mp->elt_size);
+
+ /* Start of buffer is just after the ODP type specific header
+ * which contains in the very beginning the rte_mbuf struct */
+ mb->buf_addr = (char *)mb + mb_ctor_arg->seg_buf_offset;
+ mb->buf_physaddr = rte_mempool_virt2phy(mp, mb) +
+ mb_ctor_arg->seg_buf_offset;
+ mb->buf_len = mb_ctor_arg->seg_buf_size;
+ mb->priv_size = rte_pktmbuf_priv_size(mp);
+
+ /* keep some headroom between start of buffer and data */
+ if (mb_ctor_arg->type == ODP_POOL_PACKET) {
+ odp_packet_hdr_t *pkt_hdr;
+ mb->data_off = RTE_PKTMBUF_HEADROOM;
+ mb->nb_segs = 1;
+ mb->port = 0xff;
+ mb->vlan_tci = 0;
+ pkt_hdr = (odp_packet_hdr_t *)raw_mbuf;
+ pkt_hdr->uarea_size = mb_ctor_arg->pkt_uarea_size;
+ } else {
+ mb->data_off = 0;
+ }
+
+ /* init some constant fields */
+ mb->pool = mp;
+ mb->ol_flags = 0;
+
+ /* Save index, might be useful for debugging purposes */
+ buf_hdr = (struct odp_buffer_hdr_t *)raw_mbuf;
+ buf_hdr->index = i;
+ buf_hdr->handle.handle = (odp_buffer_t)buf_hdr;
+ buf_hdr->pool_hdl = mbp_ctor_arg->pool_hdl;
+ buf_hdr->type = mb_ctor_arg->type;
+ buf_hdr->event_type = mb_ctor_arg->type;
+}
+
+#define CHECK_U16_OVERFLOW(X) do { \
+ if (odp_unlikely(X > UINT16_MAX)) { \
+ ODP_ERR("Invalid size: %d", X); \
+ UNLOCK(&pool->s.lock); \
+ return ODP_POOL_INVALID; \
+ } \
+} while (0)
+
+static int check_params(odp_pool_param_t *params)
+{
+ odp_pool_capability_t capa;
+
+ if (odp_pool_capability(&capa) < 0)
+ return -1;
+
+ switch (params->type) {
+ case ODP_POOL_BUFFER:
+ if (params->buf.num > capa.buf.max_num) {
+ printf("buf.num too large %u\n", params->buf.num);
+ return -1;
+ }
+
+ if (params->buf.size > capa.buf.max_size) {
+ printf("buf.size too large %u\n", params->buf.size);
+ return -1;
+ }
+
+ if (params->buf.align > capa.buf.max_align) {
+ printf("buf.align too large %u\n", params->buf.align);
+ return -1;
+ }
+
+ break;
+
+ case ODP_POOL_PACKET:
+ if (params->pkt.num > capa.pkt.max_num) {
+ printf("pkt.num too large %u\n", params->pkt.num);
+
+ return -1;
+ }
+
+ if (params->pkt.seg_len > capa.pkt.max_seg_len) {
+ printf("pkt.seg_len too large %u\n",
+ params->pkt.seg_len);
+ return -1;
+ }
+
+ if (params->pkt.uarea_size > capa.pkt.max_uarea_size) {
+ printf("pkt.uarea_size too large %u\n",
+ params->pkt.uarea_size);
+ return -1;
+ }
+
+ break;
+
+ case ODP_POOL_TIMEOUT:
+ if (params->tmo.num > capa.tmo.max_num) {
+ printf("tmo.num too large %u\n", params->tmo.num);
+ return -1;
+ }
+ break;
+
+ default:
+ printf("bad pool type %i\n", params->type);
+ return -1;
+ }
+
+ return 0;
+}
+
+odp_pool_t odp_pool_create(const char *name, odp_pool_param_t *params)
+{
+ struct mbuf_pool_ctor_arg mbp_ctor_arg;
+ struct mbuf_ctor_arg mb_ctor_arg;
+ odp_pool_t pool_hdl = ODP_POOL_INVALID;
+ unsigned mb_size, i, cache_size;
+ size_t hdr_size;
+ pool_entry_t *pool;
+ uint32_t buf_align, blk_size, headroom, tailroom, min_seg_len;
+ uint32_t max_len, min_align;
+ char pool_name[ODP_POOL_NAME_LEN];
+ char *rte_name = NULL;
+#if RTE_MEMPOOL_CACHE_MAX_SIZE > 0
+ unsigned j;
+#endif
+
+ if (check_params(params))
+ return ODP_POOL_INVALID;
+
+ if (name == NULL) {
+ pool_name[0] = 0;
+ } else {
+ strncpy(pool_name, name, ODP_POOL_NAME_LEN - 1);
+ pool_name[ODP_POOL_NAME_LEN - 1] = 0;
+ }
+
+ /* Find an unused buffer pool slot and initalize it as requested */
+ for (i = 0; i < ODP_CONFIG_POOLS; i++) {
+ uint32_t num;
+ struct rte_mempool *mp;
+
+ pool = get_pool_entry(i);
+
+ LOCK(&pool->s.lock);
+ if (pool->s.rte_mempool != NULL) {
+ UNLOCK(&pool->s.lock);
+ continue;
+ }
+
+ switch (params->type) {
+ case ODP_POOL_BUFFER:
+ buf_align = params->buf.align;
+ blk_size = params->buf.size;
+
+ /* Validate requested buffer alignment */
+ if (buf_align > ODP_CONFIG_BUFFER_ALIGN_MAX ||
+ buf_align !=
+ ROUNDDOWN_POWER2(buf_align, buf_align)) {
+ UNLOCK(&pool->s.lock);
+ return ODP_POOL_INVALID;
+ }
+
+ /* Set correct alignment based on input request */
+ if (buf_align == 0)
+ buf_align = ODP_CACHE_LINE_SIZE;
+ else if (buf_align < ODP_CONFIG_BUFFER_ALIGN_MIN)
+ buf_align = ODP_CONFIG_BUFFER_ALIGN_MIN;
+
+ if (params->buf.align != 0)
+ blk_size = ROUNDUP_ALIGN(blk_size,
+ buf_align);
+
+ hdr_size = sizeof(odp_buffer_hdr_t);
+ CHECK_U16_OVERFLOW(blk_size);
+ mbp_ctor_arg.pkt.mbuf_data_room_size = blk_size;
+ num = params->buf.num;
+ ODP_DBG("type: buffer name: %s num: "
+ "%u size: %u align: %u\n", pool_name, num,
+ params->buf.size, params->buf.align);
+ break;
+ case ODP_POOL_PACKET:
+ headroom = CONFIG_PACKET_HEADROOM;
+ tailroom = CONFIG_PACKET_TAILROOM;
+ min_seg_len = CONFIG_PACKET_SEG_LEN_MIN;
+ min_align = ODP_CONFIG_BUFFER_ALIGN_MIN;
+
+ blk_size = min_seg_len;
+ if (params->pkt.seg_len > blk_size)
+ blk_size = params->pkt.seg_len;
+ if (params->pkt.len > blk_size)
+ blk_size = params->pkt.len;
+ /* Make sure at least one max len packet fits in the
+ * pool.
+ */
+ max_len = 0;
+ if (params->pkt.max_len != 0)
+ max_len = params->pkt.max_len;
+ if ((max_len + blk_size) / blk_size > params->pkt.num)
+ blk_size = (max_len + params->pkt.num) /
+ params->pkt.num;
+ blk_size = ROUNDUP_ALIGN(headroom + blk_size +
+ tailroom, min_align);
+ /* Segment size minus headroom might be rounded down by
+ * the driver to the nearest multiple of 1024. Round it
+ * up here to make sure the requested size still going
+ * to fit there without segmentation.
+ */
+ blk_size = ROUNDUP_ALIGN(blk_size - headroom,
+ min_seg_len) + headroom;
+
+ hdr_size = sizeof(odp_packet_hdr_t) +
+ params->pkt.uarea_size;
+ mb_ctor_arg.pkt_uarea_size = params->pkt.uarea_size;
+ CHECK_U16_OVERFLOW(blk_size);
+ mbp_ctor_arg.pkt.mbuf_data_room_size = blk_size;
+ num = params->pkt.num;
+
+ ODP_DBG("type: packet, name: %s, "
+ "num: %u, len: %u, blk_size: %u, "
+ "uarea_size %d, hdr_size %d\n",
+ pool_name, num, params->pkt.len, blk_size,
+ params->pkt.uarea_size, hdr_size);
+ break;
+ case ODP_POOL_TIMEOUT:
+ hdr_size = sizeof(odp_timeout_hdr_t);
+ mbp_ctor_arg.pkt.mbuf_data_room_size = 0;
+ num = params->tmo.num;
+ ODP_DBG("type: tmo name: %s num: %u\n",
+ pool_name, num);
+ break;
+ default:
+ ODP_ERR("Bad type %i\n",
+ params->type);
+ UNLOCK(&pool->s.lock);
+ return ODP_POOL_INVALID;
+ break;
+ }
+
+ mb_ctor_arg.seg_buf_offset =
+ (uint16_t)ROUNDUP_CACHE_LINE(hdr_size);
+ mb_ctor_arg.seg_buf_size = mbp_ctor_arg.pkt.mbuf_data_room_size;
+ mb_ctor_arg.type = params->type;
+ mb_size = mb_ctor_arg.seg_buf_offset + mb_ctor_arg.seg_buf_size;
+ mbp_ctor_arg.pool_hdl = pool->s.pool_hdl;
+ mbp_ctor_arg.pkt.mbuf_priv_size = mb_ctor_arg.seg_buf_offset -
+ sizeof(struct rte_mbuf);
+
+ ODP_DBG("Metadata size: %u, mb_size %d\n",
+ mb_ctor_arg.seg_buf_offset, mb_size);
+ cache_size = 0;
+#if RTE_MEMPOOL_CACHE_MAX_SIZE > 0
+ j = ceil((double)num / RTE_MEMPOOL_CACHE_MAX_SIZE);
+ j = RTE_MAX(j, 2UL);
+ for (; j <= (num / 2); ++j)
+ if ((num % j) == 0) {
+ cache_size = num / j;
+ break;
+ }
+ if (odp_unlikely(cache_size > RTE_MEMPOOL_CACHE_MAX_SIZE ||
+ (uint32_t) cache_size * 1.5 > num)) {
+ ODP_ERR("cache_size calc failure: %d\n", cache_size);
+ cache_size = 0;
+ }
+#endif
+ ODP_DBG("cache_size %d\n", cache_size);
+
+ if (strlen(pool_name) > RTE_MEMPOOL_NAMESIZE - 1) {
+ ODP_ERR("Max pool name size: %u. Trimming %u long, name collision might happen!\n",
+ RTE_MEMPOOL_NAMESIZE - 1, strlen(pool_name));
+ rte_name = malloc(RTE_MEMPOOL_NAMESIZE);
+ snprintf(rte_name, RTE_MEMPOOL_NAMESIZE - 1, "%s",
+ pool_name);
+ }
+
+ pool->s.rte_mempool =
+ rte_mempool_create(rte_name ? rte_name : pool_name,
+ num,
+ mb_size,
+ cache_size,
+ sizeof(struct mbuf_pool_ctor_arg),
+ odp_dpdk_mbuf_pool_ctor,
+ &mbp_ctor_arg,
+ odp_dpdk_mbuf_ctor,
+ &mb_ctor_arg,
+ rte_socket_id(),
+ 0);
+ free(rte_name);
+ if (pool->s.rte_mempool == NULL) {
+ ODP_ERR("Cannot init DPDK mbuf pool: %s\n",
+ rte_strerror(rte_errno));
+ UNLOCK(&pool->s.lock);
+ return ODP_POOL_INVALID;
+ }
+ /* found free pool */
+ if (name == NULL) {
+ pool->s.name[0] = 0;
+ } else {
+ strncpy(pool->s.name, name,
+ ODP_POOL_NAME_LEN - 1);
+ pool->s.name[ODP_POOL_NAME_LEN - 1] = 0;
+ }
+
+ pool->s.params = *params;
+ mp = pool->s.rte_mempool;
+ ODP_DBG("Header/element/trailer size: %u/%u/%u, "
+ "total pool size: %lu\n",
+ mp->header_size, mp->elt_size, mp->trailer_size,
+ (unsigned long)((mp->header_size + mp->elt_size +
+ mp->trailer_size) * num));
+ UNLOCK(&pool->s.lock);
+ pool_hdl = pool->s.pool_hdl;
+ break;
+ }
+
+ return pool_hdl;
+}
+
+
+odp_pool_t odp_pool_lookup(const char *name)
+{
+ struct rte_mempool *mp = NULL;
+ odp_pool_t pool_hdl = ODP_POOL_INVALID;
+ int i;
+
+ mp = rte_mempool_lookup(name);
+ if (mp == NULL)
+ return ODP_POOL_INVALID;
+
+ for (i = 0; i < ODP_CONFIG_POOLS; i++) {
+ pool_entry_t *pool = get_pool_entry(i);
+ LOCK(&pool->s.lock);
+ if (pool->s.rte_mempool != mp) {
+ UNLOCK(&pool->s.lock);
+ continue;
+ }
+ UNLOCK(&pool->s.lock);
+ pool_hdl = pool->s.pool_hdl;
+ }
+ return pool_hdl;
+}
+
+
+static odp_buffer_t buffer_alloc(pool_entry_t *pool)
+{
+ odp_buffer_t buffer;
+
+ if (odp_unlikely(pool->s.params.type != ODP_POOL_BUFFER &&
+ pool->s.params.type != ODP_POOL_TIMEOUT)) {
+ rte_errno = EINVAL;
+ return ODP_BUFFER_INVALID;
+ }
+
+ buffer = (odp_buffer_t)rte_ctrlmbuf_alloc(pool->s.rte_mempool);
+
+ if ((struct rte_mbuf *)buffer == NULL) {
+ rte_errno = ENOMEM;
+ return ODP_BUFFER_INVALID;
+ } else {
+ buf_hdl_to_hdr(buffer)->next = NULL;
+ return buffer;
+ }
+}
+
+odp_buffer_t odp_buffer_alloc(odp_pool_t pool_hdl)
+{
+ ODP_ASSERT(ODP_POOL_INVALID != pool_hdl);
+
+ pool_entry_t *pool = odp_pool_to_entry(pool_hdl);
+
+ return buffer_alloc(pool);
+}
+
+int odp_buffer_alloc_multi(odp_pool_t pool_hdl, odp_buffer_t buf[], int num)
+{
+ int i;
+
+ ODP_ASSERT(ODP_POOL_INVALID != pool_hdl);
+
+ pool_entry_t *pool = odp_pool_to_entry(pool_hdl);
+
+ for (i = 0; i < num; i++) {
+ buf[i] = buffer_alloc(pool);
+ if (buf[i] == ODP_BUFFER_INVALID)
+ return rte_errno == ENOMEM ? i : -EINVAL;
+ }
+ return i;
+}
+
+void odp_buffer_free(odp_buffer_t buf)
+{
+ struct rte_mbuf *mbuf = (struct rte_mbuf *)buf;
+
+ rte_ctrlmbuf_free(mbuf);
+}
+
+void odp_buffer_free_multi(const odp_buffer_t buf[], int num)
+{
+ int i;
+
+ for (i = 0; i < num; i++) {
+ struct rte_mbuf *mbuf = (struct rte_mbuf *)buf[i];
+
+ rte_ctrlmbuf_free(mbuf);
+ }
+}
+
+void odp_pool_print(odp_pool_t pool_hdl)
+{
+ uint32_t pool_id = pool_handle_to_index(pool_hdl);
+ pool_entry_t *pool = get_pool_entry(pool_id);
+ rte_mempool_dump(stdout, pool->s.rte_mempool);
+}
+
+int odp_pool_info(odp_pool_t pool_hdl, odp_pool_info_t *info)
+{
+ uint32_t pool_id = pool_handle_to_index(pool_hdl);
+ pool_entry_t *pool = get_pool_entry(pool_id);
+
+ if (pool == NULL || info == NULL)
+ return -1;
+
+ info->name = pool->s.name;
+ info->params = pool->s.params;
+
+ return 0;
+}
+
+/*
+ * DPDK doesn't support pool destroy at the moment. Instead we should improve
+ * odp_pool_create() to try to reuse pools
+ */
+int odp_pool_destroy(odp_pool_t pool_hdl)
+{
+ uint32_t pool_id = pool_handle_to_index(pool_hdl);
+ pool_entry_t *pool = get_pool_entry(pool_id);
+ struct rte_mempool *mp;
+
+ if ((mp = rte_mempool_lookup(pool->s.name)) == NULL) {
+ ODP_ERR("Can't find pool with this name!\n");
+ return -1;
+ }
+
+ rte_mempool_free(mp);
+ pool->s.rte_mempool = NULL;
+ /* The pktio supposed to be closed by now */
+ return 0;
+}
+
+odp_pool_t odp_buffer_pool(odp_buffer_t buf)
+{
+ return buf_hdl_to_hdr(buf)->pool_hdl;
+}
+
+void odp_pool_param_init(odp_pool_param_t *params)
+{
+ memset(params, 0, sizeof(odp_pool_param_t));
+}
+
+uint64_t odp_pool_to_u64(odp_pool_t hdl)
+{
+ return _odp_pri(hdl);
+}
+
diff --git a/platform/linux-dpdk/odp_std_clib.c b/platform/linux-dpdk/odp_std_clib.c
new file mode 100644
index 000000000..3f52c3a99
--- /dev/null
+++ b/platform/linux-dpdk/odp_std_clib.c
@@ -0,0 +1,38 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_memcpy.h>
+
+#include <odp/api/std_clib.h>
+
+#if ODP_ABI_COMPAT == 0
+#include <odp/visibility_begin.h>
+#endif
+
+#if defined(__arm__) || defined(__aarch64__)
+static void *_rte_memcpy(void *dst, const void *src, size_t n)
+{
+ return rte_memcpy(dst, src, n);
+}
+
+void* (*const dpdk_memcpy)(void*, const void*, size_t) = &_rte_memcpy;
+#else
+void* (*const dpdk_memcpy)(void*, const void*, size_t) = &rte_memcpy;
+#endif
+
+#if ODP_ABI_COMPAT == 0
+#include <odp/visibility_end.h>
+#else
+#include <odp/api/plat/std_clib_inlines.h>
+#endif
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/platform/linux-dpdk/odp_thread.c b/platform/linux-dpdk/odp_thread.c
new file mode 100644
index 000000000..b9a811e4a
--- /dev/null
+++ b/platform/linux-dpdk/odp_thread.c
@@ -0,0 +1,241 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp_posix_extensions.h>
+
+#include <sched.h>
+#include <odp/api/thread.h>
+#include <odp/api/thrmask.h>
+#include <odp_internal.h>
+#include <odp/api/spinlock.h>
+#include <odp_config_internal.h>
+#include <odp_debug_internal.h>
+#include <odp/api/shared_memory.h>
+#include <odp/api/align.h>
+#include <odp/api/cpu.h>
+#include <odp_schedule_if.h>
+#include <rte_lcore.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+typedef struct {
+ int thr;
+ int cpu;
+ odp_thread_type_t type;
+} thread_state_t;
+
+
+typedef struct {
+ thread_state_t thr[ODP_THREAD_COUNT_MAX];
+
+ struct {
+ odp_thrmask_t all;
+ odp_thrmask_t worker;
+ odp_thrmask_t control;
+ };
+
+ uint32_t num;
+ uint32_t num_worker;
+ uint32_t num_control;
+ odp_spinlock_t lock;
+} thread_globals_t;
+
+
+/* Globals */
+static thread_globals_t *thread_globals;
+
+
+/* Thread local */
+static __thread thread_state_t *this_thread;
+
+
+int odp_thread_init_global(void)
+{
+ odp_shm_t shm;
+
+ shm = odp_shm_reserve("odp_thread_globals",
+ sizeof(thread_globals_t),
+ ODP_CACHE_LINE_SIZE, 0);
+
+ thread_globals = odp_shm_addr(shm);
+
+ if (thread_globals == NULL)
+ return -1;
+
+ memset(thread_globals, 0, sizeof(thread_globals_t));
+ odp_spinlock_init(&thread_globals->lock);
+
+ return 0;
+}
+
+int odp_thread_term_global(void)
+{
+ int ret;
+
+ ret = odp_shm_free(odp_shm_lookup("odp_thread_globals"));
+ if (ret < 0)
+ ODP_ERR("shm free failed for odp_thread_globals");
+
+ return ret;
+}
+
+static int alloc_id(odp_thread_type_t type)
+{
+ int thr;
+ odp_thrmask_t *all = &thread_globals->all;
+
+ if (thread_globals->num >= ODP_THREAD_COUNT_MAX)
+ return -1;
+
+ for (thr = 0; thr < ODP_THREAD_COUNT_MAX; thr++) {
+ if (odp_thrmask_isset(all, thr) == 0) {
+ odp_thrmask_set(all, thr);
+
+ if (type == ODP_THREAD_WORKER) {
+ odp_thrmask_set(&thread_globals->worker, thr);
+ thread_globals->num_worker++;
+ } else {
+ odp_thrmask_set(&thread_globals->control, thr);
+ thread_globals->num_control++;
+ }
+
+ thread_globals->num++;
+ return thr;
+ }
+ }
+
+ return -2;
+}
+
+static int free_id(int thr)
+{
+ odp_thrmask_t *all = &thread_globals->all;
+
+ if (thr < 0 || thr >= ODP_THREAD_COUNT_MAX)
+ return -1;
+
+ if (odp_thrmask_isset(all, thr) == 0)
+ return -1;
+
+ odp_thrmask_clr(all, thr);
+
+ if (thread_globals->thr[thr].type == ODP_THREAD_WORKER) {
+ odp_thrmask_clr(&thread_globals->worker, thr);
+ thread_globals->num_worker--;
+ } else {
+ odp_thrmask_clr(&thread_globals->control, thr);
+ thread_globals->num_control--;
+ }
+
+ thread_globals->num--;
+ return thread_globals->num;
+}
+
+int odp_thread_init_local(odp_thread_type_t type)
+{
+ int id;
+ int cpu;
+ struct rte_config *cfg = rte_eal_get_configuration();
+
+ odp_spinlock_lock(&thread_globals->lock);
+ id = alloc_id(type);
+ odp_spinlock_unlock(&thread_globals->lock);
+
+ if (id < 0) {
+ ODP_ERR("Too many threads\n");
+ return -1;
+ }
+
+ cpu = sched_getcpu();
+
+ if (cpu < 0) {
+ ODP_ERR("getcpu failed\n");
+ return -1;
+ }
+
+ thread_globals->thr[id].thr = id;
+ thread_globals->thr[id].cpu = cpu;
+ thread_globals->thr[id].type = type;
+ RTE_PER_LCORE(_lcore_id) = cpu;
+ if (cfg->lcore_role[cpu] == ROLE_RTE)
+ ODP_ERR("There is a thread already running on core %d\n", cpu);
+ cfg->lcore_role[cpu] = ROLE_RTE;
+
+ this_thread = &thread_globals->thr[id];
+
+ sched_fn->thr_add(ODP_SCHED_GROUP_ALL, id);
+
+ if (type == ODP_THREAD_WORKER)
+ sched_fn->thr_add(ODP_SCHED_GROUP_WORKER, id);
+ else if (type == ODP_THREAD_CONTROL)
+ sched_fn->thr_add(ODP_SCHED_GROUP_CONTROL, id);
+
+ return 0;
+}
+
+int odp_thread_term_local(void)
+{
+ int num;
+ int id = this_thread->thr;
+ odp_thread_type_t type = this_thread->type;
+
+ sched_fn->thr_rem(ODP_SCHED_GROUP_ALL, id);
+
+ if (type == ODP_THREAD_WORKER)
+ sched_fn->thr_rem(ODP_SCHED_GROUP_WORKER, id);
+ else if (type == ODP_THREAD_CONTROL)
+ sched_fn->thr_rem(ODP_SCHED_GROUP_CONTROL, id);
+
+ odp_spinlock_lock(&thread_globals->lock);
+ num = free_id(id);
+ odp_spinlock_unlock(&thread_globals->lock);
+
+ if (num < 0) {
+ ODP_ERR("failed to free thread id %i", id);
+ return -1;
+ }
+
+ return num; /* return a number of threads left */
+}
+
+int odp_thread_id(void)
+{
+ return this_thread->thr;
+}
+
+int odp_thread_count(void)
+{
+ return thread_globals->num;
+}
+
+int odp_thread_count_max(void)
+{
+ return ODP_THREAD_COUNT_MAX;
+}
+
+odp_thread_type_t odp_thread_type(void)
+{
+ return this_thread->type;
+}
+
+int odp_cpu_id(void)
+{
+ return this_thread->cpu;
+}
+
+int odp_thrmask_worker(odp_thrmask_t *mask)
+{
+ odp_thrmask_copy(mask, &thread_globals->worker);
+ return thread_globals->num_worker;
+}
+
+int odp_thrmask_control(odp_thrmask_t *mask)
+{
+ odp_thrmask_copy(mask, &thread_globals->control);
+ return thread_globals->num_control;
+}
diff --git a/platform/linux-dpdk/odp_time.c b/platform/linux-dpdk/odp_time.c
new file mode 100644
index 000000000..6c066a5b5
--- /dev/null
+++ b/platform/linux-dpdk/odp_time.c
@@ -0,0 +1,427 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp_posix_extensions.h>
+
+#include <time.h>
+#include <odp/api/time.h>
+#include <odp/api/hints.h>
+#include <odp_debug_internal.h>
+#include <odp_time_internal.h>
+#include <rte_cycles.h>
+#include <string.h>
+#include <inttypes.h>
+
+typedef uint64_t (*time_to_ns_fn) (odp_time_t time);
+typedef odp_time_t (*time_cur_fn)(void);
+typedef odp_time_t (*time_from_ns_fn) (uint64_t ns);
+typedef uint64_t (*time_res_fn)(void);
+
+typedef struct time_handler_ {
+ time_to_ns_fn time_to_ns;
+ time_cur_fn time_cur;
+ time_from_ns_fn time_from_ns;
+ time_res_fn time_res;
+} time_handler_t;
+
+typedef struct time_global_t {
+ struct timespec spec_start;
+ int use_hw;
+ uint64_t hw_start;
+ uint64_t hw_freq_hz;
+ /* DPDK specific */
+ time_handler_t handler;
+ double tick_per_nsec;
+ double nsec_per_tick;
+} time_global_t;
+
+static time_global_t global;
+
+/*
+ * Posix timespec based functions
+ */
+
+static inline uint64_t time_spec_diff_nsec(struct timespec *t2,
+ struct timespec *t1)
+{
+ struct timespec diff;
+ uint64_t nsec;
+
+ diff.tv_sec = t2->tv_sec - t1->tv_sec;
+ diff.tv_nsec = t2->tv_nsec - t1->tv_nsec;
+
+ if (diff.tv_nsec < 0) {
+ diff.tv_nsec += ODP_TIME_SEC_IN_NS;
+ diff.tv_sec -= 1;
+ }
+
+ nsec = (diff.tv_sec * ODP_TIME_SEC_IN_NS) + diff.tv_nsec;
+
+ return nsec;
+}
+
+static inline odp_time_t time_spec_cur(void)
+{
+ int ret;
+ odp_time_t time;
+ struct timespec sys_time;
+
+ ret = clock_gettime(CLOCK_MONOTONIC_RAW, &sys_time);
+ if (odp_unlikely(ret != 0))
+ ODP_ABORT("clock_gettime failed\n");
+
+ time.nsec = time_spec_diff_nsec(&sys_time, &global.spec_start);
+
+ return time;
+}
+
+static inline uint64_t time_spec_res(void)
+{
+ int ret;
+ struct timespec tres;
+
+ ret = clock_getres(CLOCK_MONOTONIC_RAW, &tres);
+ if (odp_unlikely(ret != 0))
+ ODP_ABORT("clock_getres failed\n");
+
+ return ODP_TIME_SEC_IN_NS / (uint64_t)tres.tv_nsec;
+}
+
+static inline uint64_t time_spec_to_ns(odp_time_t time)
+{
+ return time.nsec;
+}
+
+static inline odp_time_t time_spec_from_ns(uint64_t ns)
+{
+ odp_time_t time;
+
+ time.nsec = ns;
+
+ return time;
+}
+
+/*
+ * HW time counter based functions
+ */
+
+static inline odp_time_t time_hw_cur(void)
+{
+ odp_time_t time;
+
+ time.count = cpu_global_time() - global.hw_start;
+
+ return time;
+}
+
+static inline uint64_t time_hw_res(void)
+{
+ /* Promise a bit lower resolution than average cycle counter
+ * frequency */
+ return global.hw_freq_hz / 10;
+}
+
+static inline uint64_t time_hw_to_ns(odp_time_t time)
+{
+ uint64_t nsec;
+ uint64_t freq_hz = global.hw_freq_hz;
+ uint64_t count = time.count;
+ uint64_t sec = 0;
+
+ if (count >= freq_hz) {
+ sec = count / freq_hz;
+ count = count - sec * freq_hz;
+ }
+
+ nsec = (ODP_TIME_SEC_IN_NS * count) / freq_hz;
+
+ return (sec * ODP_TIME_SEC_IN_NS) + nsec;
+}
+
+static inline odp_time_t time_hw_from_ns(uint64_t ns)
+{
+ odp_time_t time;
+ uint64_t count;
+ uint64_t freq_hz = global.hw_freq_hz;
+ uint64_t sec = 0;
+
+ if (ns >= ODP_TIME_SEC_IN_NS) {
+ sec = ns / ODP_TIME_SEC_IN_NS;
+ ns = ns - sec * ODP_TIME_SEC_IN_NS;
+ }
+
+ count = sec * freq_hz;
+ count += (ns * freq_hz) / ODP_TIME_SEC_IN_NS;
+
+ time.count = count;
+
+ return time;
+}
+
+/*
+ * Common functions
+ */
+
+static inline odp_time_t time_cur(void)
+{
+ if (global.use_hw)
+ return time_hw_cur();
+
+ return time_spec_cur();
+}
+
+static inline uint64_t time_res(void)
+{
+ if (global.use_hw)
+ return time_hw_res();
+
+ return time_spec_res();
+}
+
+static inline int time_cmp(odp_time_t t2, odp_time_t t1)
+{
+ if (odp_likely(t2.u64 > t1.u64))
+ return 1;
+
+ if (t2.u64 < t1.u64)
+ return -1;
+
+ return 0;
+}
+
+static inline odp_time_t time_sum(odp_time_t t1, odp_time_t t2)
+{
+ odp_time_t time;
+
+ time.u64 = t1.u64 + t2.u64;
+
+ return time;
+}
+
+static inline uint64_t time_to_ns(odp_time_t time)
+{
+ if (global.use_hw)
+ return time_hw_to_ns(time);
+
+ return time_spec_to_ns(time);
+}
+
+static inline odp_time_t time_from_ns(uint64_t ns)
+{
+ if (global.use_hw)
+ return time_hw_from_ns(ns);
+
+ return time_spec_from_ns(ns);
+}
+
+static inline uint64_t time_res_dpdk(void)
+{
+ return rte_get_timer_hz();
+}
+
+static inline uint64_t time_to_ns_dpdk(odp_time_t time)
+{
+ return (time.u64 * global.nsec_per_tick);
+}
+
+static inline odp_time_t time_cur_dpdk(void)
+{
+ odp_time_t time;
+
+ time.u64 = rte_get_timer_cycles() - global.hw_start;
+
+ return time;
+}
+
+static inline odp_time_t time_from_ns_dpdk(uint64_t ns)
+{
+ odp_time_t time;
+
+ time.u64 = ns * global.tick_per_nsec;
+
+ return time;
+}
+
+static inline odp_time_t time_local(void)
+{
+ return global.handler.time_cur();
+}
+
+static inline void time_wait_until(odp_time_t time)
+{
+ odp_time_t cur;
+
+ do {
+ cur = time_local();
+ } while (time_cmp(time, cur) > 0);
+}
+
+odp_time_t odp_time_local(void)
+{
+ return time_local();
+}
+
+odp_time_t odp_time_global(void)
+{
+ return time_local();
+}
+
+odp_time_t odp_time_diff(odp_time_t t2, odp_time_t t1)
+{
+ odp_time_t time;
+
+ time.u64 = t2.u64 - t1.u64;
+
+ return time;
+}
+
+uint64_t odp_time_to_ns(odp_time_t time)
+{
+ return global.handler.time_to_ns(time);
+}
+
+odp_time_t odp_time_local_from_ns(uint64_t ns)
+{
+ return global.handler.time_from_ns(ns);
+}
+
+odp_time_t odp_time_global_from_ns(uint64_t ns)
+{
+ return global.handler.time_from_ns(ns);
+}
+
+int odp_time_cmp(odp_time_t t2, odp_time_t t1)
+{
+ return time_cmp(t2, t1);
+}
+
+odp_time_t odp_time_sum(odp_time_t t1, odp_time_t t2)
+{
+ return time_sum(t1, t2);
+}
+
+uint64_t odp_time_local_res(void)
+{
+ return global.handler.time_res();
+}
+
+uint64_t odp_time_global_res(void)
+{
+ return global.handler.time_res();
+}
+
+void odp_time_wait_ns(uint64_t ns)
+{
+ odp_time_t cur = time_local();
+ odp_time_t wait = global.handler.time_from_ns(ns);
+ odp_time_t end_time = time_sum(cur, wait);
+
+ time_wait_until(end_time);
+}
+
+void odp_time_wait_until(odp_time_t time)
+{
+ return time_wait_until(time);
+}
+
+static odp_bool_t is_invariant_tsc_supported(void)
+{
+ FILE *file;
+ char *line = NULL;
+ size_t len = 0;
+ odp_bool_t nonstop_tsc = false;
+ odp_bool_t constant_tsc = false;
+ odp_bool_t ret = false;
+
+ file = fopen("/proc/cpuinfo", "rt");
+ while (getline(&line, &len, file) != -1) {
+ if (strstr(line, "flags") != NULL) {
+ if (strstr(line, "constant_tsc") != NULL)
+ constant_tsc = true;
+ if (strstr(line, "nonstop_tsc") != NULL)
+ nonstop_tsc = true;
+
+ if (constant_tsc && nonstop_tsc)
+ ret = true;
+ else
+ ret = false;
+
+ free(line);
+ fclose(file);
+ return ret;
+ }
+ }
+ free(line);
+ fclose(file);
+ return false;
+}
+
+static inline odp_bool_t is_dpdk_timer_cycles_support(void)
+{
+ if (is_invariant_tsc_supported() == true)
+ return true;
+
+#ifdef RTE_LIBEAL_USE_HPET
+ if (rte_eal_hpet_init(1) == 0)
+ return true;
+#endif
+ return false;
+}
+
+int odp_time_init_global(void)
+{
+ int ret = 0;
+
+ memset(&global, 0, sizeof(time_global_t));
+
+ if (is_dpdk_timer_cycles_support()) {
+ global.handler.time_to_ns = time_to_ns_dpdk;
+ global.handler.time_cur = time_cur_dpdk;
+ global.handler.time_from_ns = time_from_ns_dpdk;
+ global.handler.time_res = time_res_dpdk;
+ global.tick_per_nsec = (double)time_res_dpdk() /
+ (double)ODP_TIME_SEC_IN_NS;
+ global.nsec_per_tick = (double)ODP_TIME_SEC_IN_NS /
+ (double)time_res_dpdk();
+
+ global.hw_start = rte_get_timer_cycles();
+ if (global.hw_start == 0)
+ return -1;
+ else
+ return 0;
+ }
+
+ global.handler.time_to_ns = time_to_ns;
+ global.handler.time_cur = time_cur;
+ global.handler.time_from_ns = time_from_ns;
+ global.handler.time_res = time_res;
+
+ if (cpu_has_global_time()) {
+ global.use_hw = 1;
+ global.hw_freq_hz = cpu_global_time_freq();
+
+ if (global.hw_freq_hz == 0)
+ return -1;
+
+ printf("HW time counter freq: %" PRIu64 " hz\n\n",
+ global.hw_freq_hz);
+
+ global.hw_start = cpu_global_time();
+ return 0;
+ }
+
+ global.spec_start.tv_sec = 0;
+ global.spec_start.tv_nsec = 0;
+
+ ret = clock_gettime(CLOCK_MONOTONIC_RAW, &global.spec_start);
+
+ return ret;
+}
+
+int odp_time_term_global(void)
+{
+ return 0;
+}
diff --git a/scripts/builddeb b/scripts/builddeb
new file mode 100755
index 000000000..e20f85c7b
--- /dev/null
+++ b/scripts/builddeb
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+set -e
+
+export ROOT_DIR=$(readlink -e $(dirname $0) | sed 's|/scripts||')
+
+source ${ROOT_DIR}/scripts/common_pkg_build.sh
+
+# debuild default options
+DEB_OPTS="-us -uc"
+
+# Also allow the user to create just the source package (skip build process)
+if [ "$1" == source ]; then
+ prepare_tarball archive
+ DEB_OPTS="-S $DEB_OPTS"
+else
+ prepare_tarball
+fi
+
+pushd ${ROOT_DIR}/${package}-${version}
+cp -r ${ROOT_DIR}/pkg/debian .
+
+current=$(cat .so_version |awk -F : '{print $1}')
+rename 's,(.*dpdk)(.*),${1}'"${current}"'${2},' debian/*odp*-dpdk.install
+
+sed -i "s:\(libodp[a-zA-Z\-]\+dpdk\)\(-dbg\|$\| \):\1${current}\2:g" debian/control
+sed -i "s:\(libodp[a-zA-Z\-]\+dpdk\)\(-dbg\| \):\1${current}\2:g" debian/rules
+
+if [ $(egrep "\.([a-z0-9]{8}\>|dirty)" .scmversion |wc -l) -gt 0 ]; then
+ export DEBFULLNAME="Donald Duck"
+ export DEBEMAIL="donald.duck@linaro.org"
+ dch --newversion ${version}-1 --urgency low "not a official release!"
+fi
+
+debuild $DEB_OPTS
+popd
+popd
diff --git a/scripts/devbuild.sh b/scripts/devbuild.sh
new file mode 100755
index 000000000..2b98d84b1
--- /dev/null
+++ b/scripts/devbuild.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# You can overwrite most of these variables with a wrapper script
+# The next 4 variables specify the directories used
+export REPOS=${REPOS:-/local/repo/odp}
+export CHECK_ODP_DIR=${CHECK_ODP_DIR:-$REPOS/check-odp}
+export ROOT_DIR_DPDK=${ROOT_DIR_DPDK:-$REPOS/dpdk}
+export GENERIC_BUILDDIR=${GENERIC_BUILDDIR:-$REPOS/odp-dpdk}
+# These are passed to ODP configure
+export CONFIGURE_FLAGS="${CONFIGURE_FLAGS:- --enable-debug \
+--enable-debug-print --enable-cunit-support --enable-test-vald \
+--enable-shared=yes --enable-static=yes --enable-user-guides \
+--enable-shared-dpdk}"
+# where to mount huge pages
+export HUGEPAGEDIR=${HUGEPAGEDIR:-/mnt/huge}
+# don't build CUnit for us
+export VALIDATION=0
+# Number of threads for compiling (make -j NUM_CPUS)
+export NUM_CPUS=${NUM_CPUS:-3}
+# Don't delete our working directories
+export CLEANUP=0
+# Don't run the relocated build test
+export RELOCATE_TEST=0
+
+if [ -z $1 ]; then
+ echo "Usage: $0 [dpdk | odp | odp-check | {unit_test} ]" >&2
+ echo "Build DPDK, ODP-DPDK or both. You need a successful build of" \
+ "the first to build the second." >&2
+ echo "odp-check runs all unit tests (make check), but you can run" \
+ "them separately as well, e.g. buffer_main." >&2
+ echo "The argument after the individual unit test is passed as" \
+ "parameter, e.g \"odp_pktio_run setup\"" >&2
+ exit 1
+fi
+
+while [ "$1" != "" ];
+do
+case $1 in
+ dpdk)
+ cd $CHECK_ODP_DIR
+ # Build only DPDK
+ export BUILD_DEPS=2
+ ./build-dpdk.sh
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ ;;
+ odp)
+ cd $CHECK_ODP_DIR
+ git clean -xfd
+ # That prevents make check to run
+ export ARCH=nocheck
+ # Don't build DPDK
+ export BUILD_DEPS=0
+ ./build-dpdk.sh
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ ;;
+ odp-check)
+ cd $GENERIC_BUILDDIR
+ ODP_PLATFORM_PARAMS="-n 3" make check && make doxygen-run && \
+ make -C doc
+ ;;
+ *)
+ export TEST=$1
+ shift
+ sudo ODP_PLATFORM_PARAMS="-n 3" ODP_GDB=$ODP_GDB\
+ $GENERIC_BUILDDIR/test/linux-dpdk/wrapper-script.sh \
+ $CHECK_ODP_DIR/new-build/bin/$TEST $1
+ if [ "$1" = "" ]; then
+ exit
+ fi
+ ;;
+esac
+shift
+done
diff --git a/scripts/git-transplant.py b/scripts/git-transplant.py
new file mode 100755
index 000000000..aeb29be39
--- /dev/null
+++ b/scripts/git-transplant.py
@@ -0,0 +1,94 @@
+#!/usr/bin/python
+
+# Copyright (c) 2015, Linaro Limited
+# All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
+# Usage: git-transplant.py [orig dir] [overlay dir] [interval]
+#
+# This script generates a list of commits neeeds to be considered for porting
+# to the content of [overlay_dir]. It makes a list of all the non-symlinked
+# files in [overlay_dir] which exists in [orig_dir], adds the files in
+# [orig_dir] added during our interval, and then prints the list of patches.
+# It only searches in the interval set by [interval], see 'man gitrevisions'
+# Paths are relative to current directory, which has to be a git repo!
+
+import sys
+import os
+from git import Repo
+import subprocess
+
+def usage() :
+ print("Usage: git-transplant.py [orig dir] [overlay dir] "
+ "[first commit] [last commit]")
+ print("Paths are relative to current directory!\n")
+ return
+
+if len(sys.argv) != 4 :
+ print("\nIncorrect number of parameters!\n")
+ usage()
+ sys.exit()
+
+current_dir = os.getcwd()
+repo = Repo(current_dir)
+if repo.bare :
+ print("\nThis script should be called inside a git repo!\n")
+ usage()
+ sys.exit()
+
+orig_dir = sys.argv[1]
+overlay_dir = sys.argv[2]
+interval = sys.argv[3]
+
+if not os.path.isdir(os.path.join(current_dir, orig_dir)) :
+ print("\nCan't open %s!\n" % orig_dir)
+ usage()
+ sys.exit()
+
+if not os.path.isdir(os.path.join(current_dir, overlay_dir)) :
+ print("\nCan't open %s!\n" % overlay_dir)
+ usage()
+ sys.exit()
+
+# The git command we'll run in the end. --ancestry-path makes sure we only look
+# around on one path in the tree (given an interval)
+gitlogcmd = "git log --oneline --ancestry-path --no-merges " + interval
+
+# Build a list of all non-symlinked files in [overlay_dir]
+for dirname, dirnames, filenames in os.walk(overlay_dir):
+ for filename in filenames:
+ fullpath = os.path.join(dirname, filename)
+ # Ignore symlinks
+ if os.path.islink(fullpath) :
+ continue
+ # Ignore non-versioned files
+ if os.system("git ls-files --error-unmatch " + fullpath +
+ " > /dev/null 2>&1") :
+ continue
+ # Trim overlay_dir from the beginning
+ subpath = dirname[len(overlay_dir):]
+ # Check if that file exist in orig_dir
+ orig_file = os.path.join(current_dir, orig_dir, subpath, filename)
+ if not os.path.isfile(orig_file) :
+ continue
+ gitlogcmd += " " + orig_file
+
+# Print which files the commits change, and grep the new files added
+wholefilechanges = "git log --oneline --ancestry-path --name-status " + \
+ interval + " " + orig_dir + " |grep \"^A\""
+try:
+ output = subprocess.check_output([wholefilechanges], shell=True)
+except subprocess.CalledProcessError:
+ output = ""
+ pass
+for row in output.split('\n') :
+ # Ignore empty lines
+ if not row :
+ continue
+ # Remove 'A' and the tab and add the file to the command
+ gitlogcmd += " " + os.path.join(current_dir, row[2:])
+
+# Print the list
+os.system(gitlogcmd)
+
diff --git a/test/linux-dpdk/.gitignore b/test/linux-dpdk/.gitignore
new file mode 100644
index 000000000..5dabf91c1
--- /dev/null
+++ b/test/linux-dpdk/.gitignore
@@ -0,0 +1,3 @@
+*.log
+*.trs
+tests-validation.env
diff --git a/test/linux-dpdk/Makefile.am b/test/linux-dpdk/Makefile.am
new file mode 100644
index 000000000..fab35c626
--- /dev/null
+++ b/test/linux-dpdk/Makefile.am
@@ -0,0 +1,56 @@
+include $(top_srcdir)/test/Makefile.inc
+TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/common_plat/validation
+
+ALL_API_VALIDATION_DIR = ${top_builddir}/test/common_plat/validation/api
+
+SUBDIRS =
+
+if test_vald
+TESTS = validation/api/pktio/pktio_run.sh \
+ $(ALL_API_VALIDATION_DIR)/atomic/atomic_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/barrier/barrier_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/buffer/buffer_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/classification/classification_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/cpumask/cpumask_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/crypto/crypto_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/errno/errno_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/hash/hash_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/init/init_main_ok$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/init/init_main_abort$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/init/init_main_log$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/lock/lock_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/packet/packet_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/pool/pool_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/queue/queue_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/random/random_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/scheduler/scheduler_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/std_clib/std_clib_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/thread/thread_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/time/time_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/timer/timer_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/traffic_mngr/traffic_mngr_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/shmem/shmem_main$(EXEEXT) \
+ $(ALL_API_VALIDATION_DIR)/system/system_main$(EXEEXT)
+
+SUBDIRS += validation/api/pktio
+else
+#performance tests refer to pktio_env
+if test_perf
+SUBDIRS += validation/api/pktio
+endif
+endif
+
+dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER)
+
+test_SCRIPTS = $(dist_check_SCRIPTS)
+
+tests-validation.env:
+ echo "TESTS=\"$(TESTS)\"" > $@
+ echo "$(TESTS_ENVIRONMENT)" >> $@
+ echo "$(LOG_COMPILER)" >> $@
+
+if test_installdir
+installcheck-local:
+ $(DESTDIR)/$(testdir)/run-test
+endif
+
diff --git a/test/linux-dpdk/Makefile.inc b/test/linux-dpdk/Makefile.inc
new file mode 100644
index 000000000..a24b93626
--- /dev/null
+++ b/test/linux-dpdk/Makefile.inc
@@ -0,0 +1,19 @@
+# The following definitions may be used by platform tests that wish to
+# build specific ODP applications, (i.e those whose do more than validation
+# test wrapping)
+
+AM_LDFLAGS += -static
+
+LIBCUNIT_COMMON = $(top_builddir)/test/common_plat/common/libcunit_common.la
+LIB = $(top_builddir)/lib
+LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-dpdk.la
+
+INCCUNIT_COMMON = -I$(top_srcdir)/test/common_plat/common
+INCODP = -I$(top_builddir)/platform/@with_platform@/include \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/helper/include \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
+ -I$(top_srcdir)/platform/@with_platform@/arch/$(ARCH_DIR) \
+ -I$(top_srcdir)/platform/@with_platform@/include \
+ -I$(top_srcdir)/test
diff --git a/test/linux-dpdk/m4/configure.m4 b/test/linux-dpdk/m4/configure.m4
new file mode 100644
index 000000000..ff6caf97a
--- /dev/null
+++ b/test/linux-dpdk/m4/configure.m4
@@ -0,0 +1,2 @@
+AC_CONFIG_FILES([test/linux-dpdk/Makefile
+ test/linux-dpdk/validation/api/pktio/Makefile])
diff --git a/test/linux-dpdk/run-test b/test/linux-dpdk/run-test
new file mode 120000
index 000000000..332cf3fee
--- /dev/null
+++ b/test/linux-dpdk/run-test
@@ -0,0 +1 @@
+../linux-generic/run-test \ No newline at end of file
diff --git a/test/linux-dpdk/validation/api/pktio/.gitignore b/test/linux-dpdk/validation/api/pktio/.gitignore
new file mode 120000
index 000000000..559053e1d
--- /dev/null
+++ b/test/linux-dpdk/validation/api/pktio/.gitignore
@@ -0,0 +1 @@
+../../../../linux-generic/validation/api/pktio/.gitignore \ No newline at end of file
diff --git a/test/linux-dpdk/validation/api/pktio/Makefile.am b/test/linux-dpdk/validation/api/pktio/Makefile.am
new file mode 100644
index 000000000..e401a29af
--- /dev/null
+++ b/test/linux-dpdk/validation/api/pktio/Makefile.am
@@ -0,0 +1,4 @@
+dist_check_SCRIPTS = pktio_env \
+ pktio_run.sh
+
+test_SCRIPTS = $(dist_check_SCRIPTS)
diff --git a/test/linux-dpdk/validation/api/pktio/pktio_env b/test/linux-dpdk/validation/api/pktio/pktio_env
new file mode 120000
index 000000000..271cefee1
--- /dev/null
+++ b/test/linux-dpdk/validation/api/pktio/pktio_env
@@ -0,0 +1 @@
+../../../../linux-generic/validation/api/pktio/pktio_env \ No newline at end of file
diff --git a/test/linux-dpdk/validation/api/pktio/pktio_run.sh b/test/linux-dpdk/validation/api/pktio/pktio_run.sh
new file mode 100755
index 000000000..538c87d00
--- /dev/null
+++ b/test/linux-dpdk/validation/api/pktio/pktio_run.sh
@@ -0,0 +1,111 @@
+#!/bin/sh
+#
+# Copyright (c) 2015, Linaro Limited
+# All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# Proceed the pktio tests. This script expects at least one argument:
+# setup) setup the pktio test environment
+# cleanup) cleanup the pktio test environment
+# run) run the pktio tests (setup, run, cleanup)
+# extra arguments are passed unchanged to the test itself (pktio_main)
+# Without arguments, "run" is assumed and no extra argument is passed to the
+# test (legacy mode).
+#
+
+# directories where pktio_main binary can be found:
+# -in the validation dir when running make check (intree or out of tree)
+# -in the script directory, when running after 'make install', or
+# -in the validation when running standalone (./pktio_run) intree.
+# -in the current directory.
+# running stand alone out of tree requires setting PATH
+PATH=${TEST_DIR}/api/pktio:$PATH
+PATH=$(dirname $0):$PATH
+PATH=$(dirname $0)/../../../../common_plat/validation/api/pktio:$PATH
+PATH=.:$PATH
+
+pktio_main_path=$(which pktio_main${EXEEXT})
+if [ -x "$pktio_main_path" ] ; then
+ echo "running with pktio_main: $pktio_run_path"
+else
+ echo "cannot find pktio_main: please set you PATH for it."
+fi
+
+# directory where platform test sources are, including scripts
+TEST_SRC_DIR=$(dirname $0)
+
+# exit codes expected by automake for skipped tests
+TEST_SKIPPED=77
+
+# Use installed pktio env or for make check take it from platform directory
+if [ -f "./pktio_env" ]; then
+ . ./pktio_env
+elif [ -f ${TEST_SRC_DIR}/pktio_env ]; then
+ . ${TEST_SRC_DIR}/pktio_env
+else
+ echo "BUG: unable to find pktio_env!"
+ echo "pktio_env has to be in current directory or in platform/\$ODP_PLATFORM/test."
+ echo "ODP_PLATFORM=\"$ODP_PLATFORM\""
+ exit 1
+fi
+
+run_test()
+{
+ local ret=0
+
+ pktio_main${EXEEXT} $*
+ if [ $? -ne 0 ]; then
+ ret=1
+ fi
+ if [ $ret -ne 0 ]; then
+ echo "!!! FAILED !!!"
+ fi
+
+ return $ret
+}
+
+run()
+{
+ echo "pktio: using 'loop' device"
+ $ODP_GDB pktio_main${EXEEXT} $*
+ loop_ret=$?
+
+ # need to be root to run tests with real interfaces
+ if [ "$(id -u)" != "0" ]; then
+ exit $ret
+ fi
+
+ if [ "$ODP_PKTIO_IF0" = "" ]; then
+ # no interfaces specified, use default veth interfaces
+ # setup by the pktio_env script
+ setup_pktio_env clean
+ if [ $? != 0 ]; then
+ echo "Failed to setup test environment, skipping test."
+ exit $TEST_SKIPPED
+ fi
+ export ODP_PLATFORM_PARAMS="-n 4 --no-pci --vdev eth_pcap0,iface=$IF0 --vdev eth_pcap1,iface=$IF1"
+ export ODP_PKTIO_IF0=0
+ export ODP_PKTIO_IF1=1
+ fi
+
+ run_test
+ ret=$?
+
+ [ $ret = 0 ] && ret=$loop_ret
+
+ exit $ret
+}
+
+if [ $# != 0 ]; then
+ action=$1
+ shift
+fi
+
+case "$action" in
+ setup) setup_pktio_env ;;
+ cleanup) cleanup_pktio_env ;;
+ run) run ;;
+ *) run ;;
+esac
diff --git a/test/linux-dpdk/wrapper-script.sh b/test/linux-dpdk/wrapper-script.sh
new file mode 100755
index 000000000..0dc2d23c2
--- /dev/null
+++ b/test/linux-dpdk/wrapper-script.sh
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+export ODP_PLATFORM_PARAMS=${ODP_PLATFORM_PARAMS:--n 4 --vdev "crypto_openssl"}
+# where to mount huge pages
+export HUGEPAGEDIR=${HUGEPAGEDIR:-/mnt/huge}
+
+# Make sure huge pages are released when a unit test crashes "make check"
+trap ctrl_c INT
+
+ctrl_c() {
+ echo "** Trapped CTRL-C"
+ if grep -qs "$HUGEPAGEDIR" /proc/mounts; then
+ echo "** Umounting hugetlbfs"
+ sleep 1 && sudo umount -a -t hugetlbfs
+ fi
+}
+
+function mount_and_reserve() {
+ export PATH_NR="/sys/devices/system/node/node0/hugepages/hugepages-${SIZE_KB}kB/nr_hugepages"
+ export PATH_FREE="/sys/devices/system/node/node0/hugepages/hugepages-${SIZE_KB}kB/free_hugepages"
+ if grep -qs "$HUGEPAGEDIR" /proc/mounts; then
+ echo "Umounting hugetlbfs from previous use!"
+ sudo umount -a -t hugetlbfs
+ fi
+ echo "Trying $SIZE pages"
+ sudo mount -t hugetlbfs -o pagesize=$SIZE nodev $HUGEPAGEDIR 2>/dev/null
+ res=$?
+ if [ $res -ne 0 ]; then
+ echo "ERROR: can't mount hugepages"
+ return $res
+ fi
+ sudo sh -c "echo $RESERVE > $PATH_NR"
+ if [ `cat $PATH_NR` -lt 1 ]; then
+ echo "Failed to reserve at least 1 huge page!"
+ return 1
+ else
+ echo "Total number: `cat $PATH_NR`"
+ echo "Free pages: `cat $PATH_FREE`"
+ fi
+}
+
+if [ ! -d $HUGEPAGEDIR ]; then
+ sudo mkdir -p $HUGEPAGEDIR
+fi
+echo "Mounting hugetlbfs"
+export SIZE=1G
+export SIZE_KB=1048576
+export RESERVE=1
+mount_and_reserve
+res=$?
+if [ $res -ne 0 ]; then
+ export SIZE=2MB
+ export SIZE_KB=2048
+ export RESERVE=1024
+ mount_and_reserve
+ res=$?
+ if [ $res -ne 0 ]; then
+ echo "ERROR: can't mount hugepages with any size"
+ exit $res
+ fi
+fi
+echo "running $1!"
+if [ ${1: -3} == ".sh" ]
+then
+ sudo TEST_DIR=${TEST_DIR} \
+ ODP_PLATFORM_PARAMS="$ODP_PLATFORM_PARAMS" \
+ ODP_GDB=$ODP_GDB $1
+else
+ sudo TEST_DIR=${TEST_DIR} ODP_PLATFORM_PARAMS="$ODP_PLATFORM_PARAMS" \
+ $ODP_GDB $1
+fi
+res=$?
+echo "Unmounting hugetlbfs"
+sleep 0.3 && sudo umount -a -t hugetlbfs
+exit $res
+