This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, api-next has been updated via 70714a8c35381330647a3578d3b853af4ea4a045 (commit) via 985db92075ffcdc48eb89954a90429e4cb9b4501 (commit) via daa04baf2cc2fc562dbf4ee8eaeed00f9594e08a (commit) via f4f7679d16917d9a7c1b2220e351fd27733ee96b (commit) via fa9550ca8f4f0a77baf6d156b441fa2d703bbdf8 (commit) via 063d713d0c167c56b4497be566b2310a5a2daf42 (commit) via 3eeb249a4774f12d2d16ca349a591654eae620ae (commit) via 4d2cf5b4a536c243089f41ade86d5dc60844f3d3 (commit) via 3a79862d2a8f9ea8eaa53d408f0763e44e522da7 (commit) via 95ba4b394009d92c29c2e22f0776e90bb4c6edec (commit) via 9bb623dfe97590991dfe3ab04e1dcfb9ff745169 (commit) via 8b1dd78079de09d5f51c61b5b2ede2766ac74685 (commit) via 920857807c4d7831ada68ebed4ffa542564ee3a5 (commit) via 43bfbbf66db3d8fd6a22762d7ac346461857f653 (commit) via a959a61e3d00965af8b93536e3fbc3bc09cad1e9 (commit) via 9e4826c45af05eb339d129140ac88bc9d4e5a2fd (commit) via fc539b10fff8b92c234f422905eec2266ec13b26 (commit) via 04e5b3dd319d1affb61e0f6860e255082a6c15df (commit) via c65cfd73c6103d02f33a62099391a98cf60d098f (commit) via 490f4bf22129638899ce71c99a8847e8ba849692 (commit) via 77f1b6743f97c6265e18cd47d0f597b44f71be2d (commit) via dcea50f7ad1f5473d74797e58eac5ba4abb939d1 (commit) via 7fc6d27e937b57b31360b07028388c811f8300dc (commit) via 104993f09d06c9ffc5ff1b2b57e44bfddefb3062 (commit) via c6dc5055a2acdf4f22e37823a86bb76b86f40b63 (commit) via 66898d97524683ae6f39b0624ce5a67f1cd8f603 (commit) via 51dc8377db6b67090224cab32a6663d7168c4e05 (commit) via 780073842dd6d2d52a52e9d59def2f13ae7d8427 (commit) via 89b7caa359acc5f213e233a3eb1ee1e9c661c246 (commit) via ce8c72bb9e8b1e162765b26b4249b7ecf1b32355 (commit) via a664b1d5e6e75a2b2110025c5bbf7ae727142bf4 (commit) via d9473fe65b531bfbe54d83d4e429d72e553c17dc (commit) via 98b09c8289e0888ce09f68f454a066a415597ea2 (commit) via f72ae9c821eed99323a98a012659acd655095bb3 (commit) via 08863bb877feb8643d1583e29912cc08f2ca8105 (commit) via d55156b2eacf07e88cbff9f51d60238536dfb7ad (commit) via 1239cc0c12ad2be11d329eebbe4df7fad05b03d7 (commit) via e3fce2fca6067b03f7fd18c9a438d2058521fe11 (commit) via 29ad363b5ab3c5e6569f20ddf63e64cc53eeb019 (commit) via 8ef745b7b78b49fc58d14e7b79b450c0bb560558 (commit) via d9c85310cb82f83010c839b6a1bbb5a1fa672ceb (commit) via 5a38050f431d904b7354cd50611304da0a601727 (commit) via 200782c3da2104a020f278691b3b23b8d55893e0 (commit) via 29641a1e0d0868c09f35f9f32e6c8491efb62b2d (commit) via cfaee18006aab817656ffaf09e644b570ff32c8e (commit) via b02fe5f06a81a190d4c4fe65af74b800cf073436 (commit) via 5a2ed3eefb1a263139282c376741adb2c355bd5a (commit) via 2541e8688750f2a045aff3dbf544868be3ebf787 (commit) via b2b516c03ae6eb57e0055c98b33e946e9529f215 (commit) via d5d52b65d262698694a5fab0b3d9bd12fa4a6460 (commit) via 6e594990575df83dcbb70f5f86ad52f7c5a0f96d (commit) via c50d47bd420c675552dd0b82638a073b67b2ae4f (commit) via 933fd66f5b7230a00ee0ef7acde5cc1c9af63b45 (commit) via 8ae6373c8844408ad080b58fb3083b30e8dc7ea6 (commit) via 96b36df87f23bf32ab218321f1fc35703f092eb4 (commit) via 61e4b959b31854f83695cbbdd2e2fa0389fa4da6 (commit) via 6096ae389fe221d366d1a7ba8a7169c836a820de (commit) via df2cf17f3cdd3313c9982aacc7adcddfd20ea29a (commit) via fbd17f06236c14c05fb2d577b9027f96cec94a87 (commit) via e33884ef62a274c187c30f4bebb34d8a48190cfa (commit) via 0893a0d99b3b718369d77eacd88db3b7aedc8332 (commit) via 05a9cff266565a8c7d24eb29d6128f2ad70bbccb (commit) via ceeab69f3af67701adb524c7b9757d19cefb1110 (commit) from db7cc41aeb559dd296f3a6d8570aa10326a31d5e (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 70714a8c35381330647a3578d3b853af4ea4a045 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Wed Jul 26 22:27:38 2017 +0300
linux-gen: cpu: arm: make wfe supported only by aarch64
Suggested-by: Brian Brooks brian.brooks@arm.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Signed-off-by: Brian Brooks brian.brooks@arm.com
diff --git a/platform/linux-generic/arch/arm/odp_cpu.h b/platform/linux-generic/arch/arm/odp_cpu.h index 8ef50da4..72c81020 100644 --- a/platform/linux-generic/arch/arm/odp_cpu.h +++ b/platform/linux-generic/arch/arm/odp_cpu.h @@ -38,7 +38,9 @@ * more scalable) and enables the CPU to enter a sleep state (lower power * consumption). */ +#ifdef __aarch64__ #define CONFIG_WFE +#endif
static inline void dmb(void) { diff --git a/platform/linux-generic/arch/arm/odp_cpu_idling.h b/platform/linux-generic/arch/arm/odp_cpu_idling.h index 3ae1028c..ab29455b 100644 --- a/platform/linux-generic/arch/arm/odp_cpu_idling.h +++ b/platform/linux-generic/arch/arm/odp_cpu_idling.h @@ -37,9 +37,7 @@ static inline void doze(void) }
#ifdef CONFIG_WFE -#ifdef __aarch64__ #define monitor128(addr, mo) lld((addr), (mo)) -#endif #define monitor64(addr, mo) ll64((addr), (mo)) #define monitor32(addr, mo) ll32((addr), (mo)) #define monitor8(addr, mo) ll8((addr), (mo))
commit 985db92075ffcdc48eb89954a90429e4cb9b4501 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Jul 25 18:43:52 2017 +0300
linux-gen: fix compilation with libconfig
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/pkgconfig/libodp-linux.pc.in b/pkgconfig/libodp-linux.pc.in index 220dbc9c..b7eb3983 100644 --- a/pkgconfig/libodp-linux.pc.in +++ b/pkgconfig/libodp-linux.pc.in @@ -7,5 +7,5 @@ Name: libodp-linux Description: The ODP packet processing engine Version: @PKGCONFIG_VERSION@ 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@ +Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ @TIMER_LIBS@ -lpthread @ATOMIC_LIBS@ @LIBCONFIG_LIBS@ Cflags: -I${includedir} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 131638fa..f43e14be 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -16,6 +16,7 @@ AM_CFLAGS += -D_ODP_PKTIO_IPC AM_CPPFLAGS += $(OPENSSL_CPPFLAGS) AM_CPPFLAGS += $(DPDK_CPPFLAGS) AM_CPPFLAGS += $(NETMAP_CPPFLAGS) +AM_CPPFLAGS += $(LIBCONFIG_CFLAGS)
include_HEADERS = \ $(top_srcdir)/include/odp.h \ @@ -324,6 +325,7 @@ __LIB__libodp_linux_la_LIBADD += $(OPENSSL_LIBS) __LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS) __LIB__libodp_linux_la_LIBADD += $(PTHREAD_LIBS) __LIB__libodp_linux_la_LIBADD += $(TIMER_LIBS) +__LIB__libodp_linux_la_LIBADD += $(LIBCONFIG_LIBS)
if HAVE_PCAP __LIB__libodp_linux_la_LIBADD += $(PCAP_LIBS) diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index cba659c8..85d35f25 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -28,16 +28,8 @@ AC_LINK_IFELSE( echo "Use newer version. For gcc > 4.7.0" exit -1)
-# Check for libconfig (required) -AC_CHECK_HEADERS([libconfig.h], HEADER_LIBCONFIG="yes") -PKG_CHECK_MODULES([PKGCONFIG], [libconfig >= 1.3.2], LIBRARY_LIBCONFIG="yes") -if test "x$LIBRARY_LIBCONFIG" != "x" && test "x$HEADER_LIBCONFIG" != "x" ; then - CFLAGS="$CFLAGS $PKGCONFIG_CFLAGS" - LIBS="$LIBS $PKGCONFIG_LIBS" - AM_CPPFLAGS="$AM_CPPFLAGS `pkg-config --cflags-only-I libconfig`" -else - AC_MSG_FAILURE([libconfig not found (required)]) -fi +dnl Check for libconfig (required) +PKG_CHECK_MODULES([LIBCONFIG], [libconfig >= 1.3.2])
dnl Check whether -latomic is needed use_libatomic=no
commit daa04baf2cc2fc562dbf4ee8eaeed00f9594e08a Merge: db7cc41a f4f7679d Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Tue Jul 25 16:11:34 2017 +0300
Merge branch 'master' into api-next
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --cc .travis.yml index 35d34581,42c2c963..77de1fff --- a/.travis.yml +++ b/.travis.yml @@@ -62,20 -60,27 +61,28 @@@ env - CONF="--disable-abi-compat" - CONF="--enable-schedule-sp" - CONF="--enable-schedule-iquery" + - CONF="--enable-schedule-scalable" + - CONF="--enable-dpdk-zero-copy"
- install: - - echo 1000 | sudo tee /proc/sys/vm/nr_hugepages - - sudo mkdir -p /mnt/huge - - sudo mount -t hugetlbfs nodev /mnt/huge + before_install:
- - sudo apt-get -qq update - - sudo apt-get install linux-headers-`uname -r` - - sudo pip install coverage - - gem install asciidoctor - - PATH=${PATH//:./node_modules/.bin/} + # Install cross toolchains, etc + # apt-get update may fail thanks to Ubuntu removing Packages/indices while not removing relevant parts of Release file + - if [ -n "$CROSS_ARCH" ] ; + then + BUILD_GNU_TYPE=`dpkg-architecture -a"$CROSS_ARCH" -qDEB_BUILD_GNU_TYPE` ; + CROSS_GNU_TYPE=`dpkg-architecture -a"$CROSS_ARCH" -qDEB_HOST_GNU_TYPE` ; + CROSS_MULTIARCH=`dpkg-architecture -a"$CROSS_ARCH" -qDEB_HOST_MULTIARCH` ; + CROSS="--host="$CROSS_GNU_TYPE" --build="$BUILD_GNU_TYPE" --prefix=/usr --includedir=/usr/include/"$CROSS_MULTIARCH" --libdir=/usr/lib/"$CROSS_MULTIARCH" --libexecdir=/usr/lib/"$CROSS_MULTIARCH"" ; + sudo dpkg --add-architecture "$CROSS_ARCH" ; + sudo -E apt-add-repository -y "deb http://ports.ubuntu.com trusty main" ; + sudo -E apt-add-repository -y "deb http://ports.ubuntu.com trusty-updates main" ; + sudo -E apt-get -y update || true ; + sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install build-essential gcc-"$CROSS_GNU_TYPE" pkg-config-"$CROSS_GNU_TYPE" ; - sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install libc6-dev:"$CROSS_ARCH" libssl-dev:"$CROSS_ARCH" zlib1g-dev:"$CROSS_ARCH" libconfig-dev:"$CROSS_ARCH" ; ++ sudo -E apt-get -y --no-install-suggests --no-install-recommends --force-yes install libc6-dev:"$CROSS_ARCH" libconfig-dev:"$CROSS_ARCH" libssl-dev:"$CROSS_ARCH" zlib1g-dev:"$CROSS_ARCH" libconfig-dev:"$CROSS_ARCH" ; + fi
- # Install cunit for the validation tests because distro version is too old and fails C99 compile + # Install cunit for the validation tests because distro version is too old and fails C99 compile - sudo apt-get remove libcunit1-dev libcunit1 - export CUNIT_VERSION=2.1-3 - curl -sSOL https://github.com/Linaro/libcunit/releases/download/%24%7BCUNIT_VERSION%7D/... diff --cc platform/linux-generic/Makefile.am index b46c6501,26eba284..131638fa --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@@ -8,15 -8,16 +8,19 @@@ AM_CFLAGS += -I$(srcdir)/includ AM_CFLAGS += -I$(top_srcdir)/include AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ AM_CFLAGS += -I$(top_builddir)/include +AM_CFLAGS += -I$(top_srcdir)/arch/@ARCH_DIR@ AM_CFLAGS += -Iinclude +AM_CFLAGS += -DSYSCONFDIR="@sysconfdir@" AM_CFLAGS += -D_ODP_PKTIO_IPC
+ AM_CPPFLAGS += $(OPENSSL_CPPFLAGS) + AM_CPPFLAGS += $(DPDK_CPPFLAGS) + AM_CPPFLAGS += $(NETMAP_CPPFLAGS) + include_HEADERS = \ $(top_srcdir)/include/odp.h \ - $(top_srcdir)/include/odp_api.h + $(top_srcdir)/include/odp_api.h \ + $(top_srcdir)/include/odp_drv.h
odpincludedir= $(includedir)/odp odpinclude_HEADERS = \ diff --cc platform/linux-generic/_ishm.c index 5f1df2d3,892e889b..b991af1a --- a/platform/linux-generic/_ishm.c +++ b/platform/linux-generic/_ishm.c @@@ -86,8 -86,9 +88,8 @@@
/* * Maximum internal shared memory block name length in chars - * probably taking the same number as SHM name size make sense at this stage */ - #define ISHM_NAME_MAXLEN ODPDRV_SHM_NAME_LEN + #define ISHM_NAME_MAXLEN 128
/* * Linux underlying file name: <directory>/odp-<odp_pid>-ishm-<name> diff --cc platform/linux-generic/include/odp_buffer_inlines.h index 4c0e7339,a5658e81..e095aec5 --- a/platform/linux-generic/include/odp_buffer_inlines.h +++ b/platform/linux-generic/include/odp_buffer_inlines.h @@@ -21,13 -21,11 +21,13 @@@ extern "C"
odp_event_type_t _odp_buffer_event_type(odp_buffer_t buf); void _odp_buffer_event_type_set(odp_buffer_t buf, int ev); +odp_event_subtype_t _odp_buffer_event_subtype(odp_buffer_t buf); +void _odp_buffer_event_subtype_set(odp_buffer_t buf, int ev); int odp_buffer_snprint(char *str, uint32_t n, odp_buffer_t buf);
- static inline odp_buffer_t odp_hdr_to_buf(odp_buffer_hdr_t *hdr) + static inline odp_buffer_t buf_from_buf_hdr(odp_buffer_hdr_t *hdr) { - return hdr->handle.handle; + return (odp_buffer_t)hdr; }
#ifdef __cplusplus diff --cc platform/linux-generic/include/odp_internal.h index 404792cf,ec17b199..fe1195ca --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@@ -23,9 -23,9 +23,10 @@@ extern "C" #include <odp_errno_define.h> #include <stdio.h> #include <sys/types.h> +#include <libconfig.h>
#define MAX_CPU_NUMBER 128 + #define UID_MAXLEN 30
typedef struct { uint64_t cpu_hz_max[MAX_CPU_NUMBER]; diff --cc platform/linux-generic/include/odp_packet_internal.h index 5e0f3204,f77987c8..e028bc28 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@@ -129,9 -135,16 +135,16 @@@ typedef struct /* Classifier destination queue */ queue_t dst_queue;
- /* Result for crypto */ - odp_crypto_generic_op_result_t op_result; + /* Result for crypto packet op */ + odp_crypto_packet_result_t crypto_op_result;
+ #ifdef ODP_PKTIO_DPDK + /* Type of extra data */ + uint8_t extra_type; + /* Extra space for packet descriptors. E.g. DPDK mbuf */ + uint8_t extra[PKT_EXTRA_LEN] ODP_ALIGNED_CACHE; + #endif + /* Packet data storage */ uint8_t data[0]; } odp_packet_hdr_t; @@@ -159,6 -172,45 +172,51 @@@ static inline odp_packet_t packet_from_ return (odp_packet_t)(odp_packet_hdr_t *)buf_hdr; }
++static inline odp_buffer_t packet_to_buffer(odp_packet_t pkt) ++{ ++ return (odp_buffer_t)pkt; ++} ++ + /** + * Initialize packet + */ + static inline void packet_init(odp_packet_hdr_t *pkt_hdr, uint32_t len) + { + uint32_t seg_len; + int num = pkt_hdr->buf_hdr.segcount; + + if (odp_likely(CONFIG_PACKET_MAX_SEGS == 1 || num == 1)) { + seg_len = len; + pkt_hdr->buf_hdr.seg[0].len = len; + } else { + seg_len = len - ((num - 1) * CONFIG_PACKET_MAX_SEG_LEN); + + /* Last segment data length */ + pkt_hdr->buf_hdr.seg[num - 1].len = seg_len; + } + + 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; + + /* + * Packet headroom is set from the pool's headroom + * Packet tailroom is rounded up to fill the last + * segment occupied by the allocated length. + */ + pkt_hdr->frame_len = len; + pkt_hdr->headroom = CONFIG_PACKET_HEADROOM; + pkt_hdr->tailroom = CONFIG_PACKET_MAX_SEG_LEN - seg_len + + CONFIG_PACKET_TAILROOM; + + pkt_hdr->input = ODP_PKTIO_INVALID; ++ pkt_hdr->buf_hdr.event_subtype = ODP_EVENT_PACKET_BASIC; + } + static inline void copy_packet_parser_metadata(odp_packet_hdr_t *src_hdr, odp_packet_hdr_t *dst_hdr) { diff --cc platform/linux-generic/m4/configure.m4 index bd2ca88e,8e008de4..cba659c8 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@@ -86,9 -75,9 +86,10 @@@ f AC_SUBST([ATOMIC_LIBS])
m4_include([platform/linux-generic/m4/odp_pthread.m4]) + m4_include([platform/linux-generic/m4/odp_timer.m4]) m4_include([platform/linux-generic/m4/odp_openssl.m4]) m4_include([platform/linux-generic/m4/odp_pcap.m4]) +m4_include([platform/linux-generic/m4/odp_modules.m4]) m4_include([platform/linux-generic/m4/odp_netmap.m4]) m4_include([platform/linux-generic/m4/odp_dpdk.m4]) m4_include([platform/linux-generic/m4/odp_schedule.m4]) diff --cc platform/linux-generic/odp_crypto.c index ca51bdf0,68fc5658..42bd4d58 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@@ -852,33 -846,51 +852,33 @@@ odp_crypto_operation(odp_crypto_op_para 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; - odp_crypto_generic_session_t *session; + odp_crypto_packet_op_param_t packet_param; + odp_packet_t out_pkt = param->out_pkt; + odp_crypto_packet_result_t packet_result; odp_crypto_op_result_t local_result; - odp_bool_t allocated = false; - - session = (odp_crypto_generic_session_t *)(intptr_t)param->session; - - /* Resolve output buffer */ - if (ODP_PACKET_INVALID == param->out_pkt && - ODP_POOL_INVALID != session->p.output_pool) { - param->out_pkt = odp_packet_alloc(session->p.output_pool, - odp_packet_len(param->pkt)); - allocated = true; - } + int rc;
- if (odp_unlikely(ODP_PACKET_INVALID == param->out_pkt)) { - ODP_DBG("Alloc failed.\n"); - return -1; - } + packet_param.session = param->session; + packet_param.override_iv_ptr = param->override_iv_ptr; + packet_param.hash_result_offset = param->hash_result_offset; + packet_param.aad.ptr = param->aad.ptr; + packet_param.aad.length = param->aad.length; + packet_param.cipher_range = param->cipher_range; + packet_param.auth_range = param->auth_range;
- if (param->pkt != param->out_pkt) { - int ret; + rc = odp_crypto_op(¶m->pkt, &out_pkt, &packet_param, 1); + if (rc < 0) + return rc;
- 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; + rc = odp_crypto_result(&packet_result, out_pkt); + if (rc < 0) + return rc;
- _odp_packet_copy_md_to_packet(param->pkt, param->out_pkt); - odp_packet_free(param->pkt); - param->pkt = ODP_PACKET_INVALID; - } + /* Indicate to caller operation was sync */ + *posted = 0;
- _odp_buffer_event_subtype_set(_odp_packet_to_buffer(out_pkt), - /* Invoke the functions */ - if (session->do_cipher_first) { - rc_cipher = session->cipher.func(param, session); - rc_auth = session->auth.func(param, session); - } else { - rc_auth = session->auth.func(param, session); - rc_cipher = session->cipher.func(param, session); - } ++ _odp_buffer_event_subtype_set(packet_to_buffer(out_pkt), + ODP_EVENT_PACKET_BASIC);
/* Fill in result */ local_result.ctx = param->ctx; @@@ -1075,170 -1121,7 +1075,170 @@@ uint64_t odp_crypto_session_to_u64(odp_ return (uint64_t)hdl; }
-uint64_t odp_crypto_compl_to_u64(odp_crypto_compl_t hdl) +odp_packet_t odp_crypto_packet_from_event(odp_event_t ev) { - return _odp_pri(hdl); + /* This check not mandated by the API specification */ + ODP_ASSERT(odp_event_type(ev) == ODP_EVENT_PACKET); + ODP_ASSERT(odp_event_subtype(ev) == ODP_EVENT_PACKET_CRYPTO); + + return odp_packet_from_event(ev); +} + +odp_event_t odp_crypto_packet_to_event(odp_packet_t pkt) +{ + return odp_packet_to_event(pkt); +} + +static +odp_crypto_packet_result_t *get_op_result_from_packet(odp_packet_t pkt) +{ + odp_packet_hdr_t *hdr = odp_packet_hdr(pkt); + + return &hdr->crypto_op_result; +} + +int odp_crypto_result(odp_crypto_packet_result_t *result, + odp_packet_t packet) +{ + odp_crypto_packet_result_t *op_result; + + ODP_ASSERT(odp_event_subtype(odp_packet_to_event(packet)) == + ODP_EVENT_PACKET_CRYPTO); + + op_result = get_op_result_from_packet(packet); + + memcpy(result, op_result, sizeof(*result)); + + return 0; +} + +static +int odp_crypto_int(odp_packet_t pkt_in, + odp_packet_t *pkt_out, + const odp_crypto_packet_op_param_t *param) +{ + odp_crypto_alg_err_t rc_cipher = ODP_CRYPTO_ALG_ERR_NONE; + odp_crypto_alg_err_t rc_auth = ODP_CRYPTO_ALG_ERR_NONE; + odp_crypto_generic_session_t *session; + odp_crypto_packet_result_t local_result; + odp_bool_t allocated = false; + odp_packet_t out_pkt = *pkt_out; + odp_crypto_packet_result_t *op_result; + + session = (odp_crypto_generic_session_t *)(intptr_t)param->session; + + /* Resolve output buffer */ + if (ODP_PACKET_INVALID == out_pkt && + ODP_POOL_INVALID != session->p.output_pool) { + out_pkt = odp_packet_alloc(session->p.output_pool, + odp_packet_len(pkt_in)); + allocated = true; + } + + if (odp_unlikely(ODP_PACKET_INVALID == out_pkt)) { + ODP_DBG("Alloc failed.\n"); + return -1; + } + + if (pkt_in != out_pkt) { + int ret; + + ret = odp_packet_copy_from_pkt(out_pkt, + 0, + pkt_in, + 0, + odp_packet_len(pkt_in)); + if (odp_unlikely(ret < 0)) + goto err; + + _odp_packet_copy_md_to_packet(pkt_in, out_pkt); + odp_packet_free(pkt_in); + pkt_in = ODP_PACKET_INVALID; + } + + /* Invoke the functions */ + if (session->do_cipher_first) { + rc_cipher = session->cipher.func(out_pkt, param, session); + rc_auth = session->auth.func(out_pkt, param, session); + } else { + rc_auth = session->auth.func(out_pkt, param, session); + rc_cipher = session->cipher.func(out_pkt, param, session); + } + + /* Fill in result */ + 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); + - _odp_buffer_event_subtype_set(_odp_packet_to_buffer(out_pkt), ++ _odp_buffer_event_subtype_set(packet_to_buffer(out_pkt), + ODP_EVENT_PACKET_CRYPTO); + op_result = get_op_result_from_packet(out_pkt); + *op_result = local_result; + + /* Synchronous, simply return results */ + *pkt_out = out_pkt; + + return 0; + +err: + if (allocated) { + odp_packet_free(out_pkt); + out_pkt = ODP_PACKET_INVALID; + } + + return -1; +} + +int odp_crypto_op(const odp_packet_t pkt_in[], + odp_packet_t pkt_out[], + const odp_crypto_packet_op_param_t param[], + int num_pkt) +{ + int i, rc; + odp_crypto_generic_session_t *session; + + session = (odp_crypto_generic_session_t *)(intptr_t)param->session; + ODP_ASSERT(ODP_CRYPTO_SYNC == session->p.op_mode); + + for (i = 0; i < num_pkt; i++) { + rc = odp_crypto_int(pkt_in[i], &pkt_out[i], ¶m[i]); + if (rc < 0) + break; + } + + return i; +} + +int odp_crypto_op_enq(const odp_packet_t pkt_in[], + const odp_packet_t pkt_out[], + const odp_crypto_packet_op_param_t param[], + int num_pkt) +{ + odp_packet_t pkt; + odp_event_t event; + odp_crypto_generic_session_t *session; + int i, rc; + + session = (odp_crypto_generic_session_t *)(intptr_t)param->session; + ODP_ASSERT(ODP_CRYPTO_ASYNC == session->p.op_mode); + ODP_ASSERT(ODP_QUEUE_INVALID != session->p.compl_queue); + + for (i = 0; i < num_pkt; i++) { + pkt = pkt_out[i]; + rc = odp_crypto_int(pkt_in[i], &pkt, ¶m[i]); + if (rc < 0) + break; + + event = odp_packet_to_event(pkt); + if (odp_queue_enq(session->p.compl_queue, event)) { + odp_event_free(event); + break; + } + } + + return i; } diff --cc platform/linux-generic/odp_init.c index 8c17cbb0,35a285ea..75ff585a --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@@ -19,139 -17,11 +19,96 @@@ #include <string.h> #include <stdlib.h> #include <errno.h> - - #define _ODP_FILES_FMT "odp-%d-" - #define _ODP_TMPDIR "/tmp" + #include <sys/types.h> + #include <pwd.h>
+/* the name of the ODP configuration file: */ +#define CONFIGURATION_FILE_ENV_NONE "none" +#define CONFIGURATION_FILE "odp.conf" +#define CONFIGURATION_FILE_USR ("." CONFIGURATION_FILE) +#define CONFIGURATION_FILE_SYS (SYSCONFDIR "/" CONFIGURATION_FILE) + +/* the ODP configuration file name can also be oveerwritten by env. variable: */ +#define ODP_SYSCONFIG_FILE_ENV "ODP_SYSCONFIG_FILE" + 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; - } - +/* read the odp configuration file + * + * the configuration file is read from: + * 1) Wherever env variable ODP_SYSCONFIG_FILE says (or "none") + * 2) ./odp.conf + * 3) the @sysconfig@/odp.conf + * (checked in reverse order overwritting each-other) + * So the environment variable setting supperseeds any other file. + * If the environment variable exists and set to the string "none" + * the configuration file reading is inibited (used to prevent + * test which do not need a file to read the user or system files) + */ +static int read_configfile(void) +{ + config_t *cf; + const char *config_filename; + char user_config_filename[PATH_MAX]; + char *env_config_filename; + + /* initialize and read the configuration file if any: */ + cf = &odp_global_data.configuration; + config_init(cf); + config_filename = NULL; + /* check if the system config file can be reached :*/ + if (access(CONFIGURATION_FILE_SYS, R_OK) != -1) + config_filename = CONFIGURATION_FILE_SYS; + /* check if the user config file can be reached (overwrite if so) :*/ + strncpy(user_config_filename, getenv("HOME"), PATH_MAX); + if (user_config_filename[0]) { + strncat(user_config_filename, "/", PATH_MAX); + strncat(user_config_filename, CONFIGURATION_FILE_USR, PATH_MAX); + if ((access(user_config_filename, R_OK) != -1)) + config_filename = user_config_filename; + } + /* check if other config file is specified via env (overwrite if so):*/ + env_config_filename = getenv(ODP_SYSCONFIG_FILE_ENV); + if (env_config_filename) { + /* none means "read no file": */ + if (!strcmp(env_config_filename, CONFIGURATION_FILE_ENV_NONE)) + return 0; + if (access(env_config_filename, R_OK) != -1) { + config_filename = env_config_filename; + } else { + ODP_ERR("Cannot read ODP configurattion file %s " + "(set by env variable " + ODP_SYSCONFIG_FILE_ENV ")\n", + env_config_filename); + config_filename = NULL; + return -1; + } + } + if (config_filename) { + ODP_DBG("Reading configuration file: %s\n", config_filename); + if (!config_read_file(cf, config_filename)) { +#if defined(LIBCONFIG_VER_MAJOR) && LIBCONFIG_VER_MAJOR >= 1 && \ + LIBCONFIG_VER_MINOR >= 4 + ODP_ERR("%s:%d - %s\n", + config_error_file(cf), + config_error_line(cf), + config_error_text(cf)); +#else + ODP_ERR("config_read_file\n"); +#endif + config_destroy(cf); + return -1; + } + } + + return 0; +} + +void odp_init_param_init(odp_init_t *param) +{ + memset(param, 0, sizeof(odp_init_t)); +} + int odp_init_global(odp_instance_t *instance, const odp_init_t *params, const odp_platform_init_t *platform_params ODP_UNUSED) @@@ -172,11 -40,6 +127,9 @@@ odp_global_data.abort_fn = params->abort_fn; }
- cleanup_files(_ODP_TMPDIR, odp_global_data.main_pid); - + if (read_configfile()) + goto init_failed; + if (odp_cpumask_init_global(params)) { ODP_ERR("ODP cpumask init failed.\n"); goto init_failed; diff --cc platform/linux-generic/odp_packet.c index 22358438,dbde7280..88032cf2 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@@ -62,6 -62,16 +62,11 @@@ static inline odp_packet_hdr_t *buf_to_ return (odp_packet_hdr_t *)buf_hdl_to_hdr(buf); }
+ odp_packet_t _odp_packet_from_buf_hdr(odp_buffer_hdr_t *buf_hdr) + { + return (odp_packet_t)buf_hdr; + } + -static inline odp_buffer_t packet_to_buffer(odp_packet_t pkt) -{ - return (odp_buffer_t)pkt; -} - static inline uint32_t packet_seg_len(odp_packet_hdr_t *pkt_hdr, uint32_t seg_idx) { diff --cc platform/linux-generic/odp_pool.c index 23b80698,f2410b6e..3f7013b4 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@@ -259,8 -259,8 +259,9 @@@ static void init_buffers(pool_t *pool buf_hdr->size = seg_size; buf_hdr->type = type; buf_hdr->event_type = type; + buf_hdr->event_subtype = ODP_EVENT_NO_SUBTYPE; buf_hdr->pool_hdl = pool->pool_hdl; + buf_hdr->pool_ptr = pool; buf_hdr->uarea_addr = uarea; /* Show user requested size through API */ buf_hdr->uarea_size = pool->params.pkt.uarea_size; diff --cc platform/linux-generic/odp_queue_scalable.c index 52f3915f,00000000..503b40f5 mode 100644,000000..100644 --- a/platform/linux-generic/odp_queue_scalable.c +++ b/platform/linux-generic/odp_queue_scalable.c @@@ -1,1011 -1,0 +1,997 @@@ +/* Copyright (c) 2017, ARM Limited. All rights reserved. + * + * Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <odp/api/hints.h> +#include <odp/api/plat/ticketlock_inlines.h> +#include <odp/api/queue.h> +#include <odp/api/schedule.h> +#include <odp/api/shared_memory.h> +#include <odp/api/sync.h> +#include <odp/api/traffic_mngr.h> + +#include <odp_internal.h> +#include <odp_config_internal.h> +#include <odp_debug_internal.h> + +#include <odp_buffer_inlines.h> +#include <odp_packet_io_internal.h> +#include <odp_pool_internal.h> +#include <odp_queue_scalable_internal.h> +#include <odp_schedule_if.h> +#include <_ishm_internal.h> +#include <_ishmpool_internal.h> + +#include <string.h> +#include <inttypes.h> + +#define NUM_INTERNAL_QUEUES 64 + +#define MIN(a, b) \ + ({ \ + __typeof__(a) tmp_a = (a); \ + __typeof__(b) tmp_b = (b); \ + tmp_a < tmp_b ? tmp_a : tmp_b; \ + }) + +#define LOCK(a) _odp_ticketlock_lock(a) +#define UNLOCK(a) _odp_ticketlock_unlock(a) +#define LOCK_INIT(a) odp_ticketlock_init(a) + +extern __thread sched_scalable_thread_state_t *sched_ts; + +typedef struct queue_table_t { + queue_entry_t queue[ODP_CONFIG_QUEUES]; +} queue_table_t; + +static queue_table_t *queue_tbl; +_odp_ishm_pool_t *queue_shm_pool; + +static inline odp_queue_t queue_from_id(uint32_t queue_id) +{ + return _odp_cast_scalar(odp_queue_t, queue_id + 1); +} + +static queue_t queue_from_ext(odp_queue_t handle); +static int _queue_enq(queue_t handle, odp_buffer_hdr_t *buf_hdr); +static odp_buffer_hdr_t *_queue_deq(queue_t handle); +static int _queue_enq_multi(queue_t handle, odp_buffer_hdr_t *buf_hdr[], + int num); +static int _queue_deq_multi(queue_t handle, odp_buffer_hdr_t *buf_hdr[], + int num); + +static queue_entry_t *get_qentry(uint32_t queue_id) +{ + return &queue_tbl->queue[queue_id]; +} + +static int _odp_queue_disable_enq(sched_elem_t *q) +{ + ringidx_t old_read, old_write, new_write; + uint32_t size; + + old_write = q->prod_write; + size = q->prod_mask + 1; + do { + /* Need __atomic_load to avoid compiler reordering */ + old_read = __atomic_load_n(&q->prod_read, __ATOMIC_ACQUIRE); + if (old_write != old_read) { + /* Queue is not empty, cannot claim all elements + * Cannot disable enqueue. + */ + return -1; + } + /* Claim all elements in ring */ + new_write = old_write + size; + } while (!__atomic_compare_exchange_n(&q->prod_write, + &old_write, /* Updated on failure */ + new_write, + true, + __ATOMIC_RELAXED, + __ATOMIC_RELAXED)); + /* All remaining elements claimed, no one else can enqueue */ + return 0; +} + +static int queue_init(queue_entry_t *queue, const char *name, + const odp_queue_param_t *param) +{ + ringidx_t ring_idx; + sched_elem_t *sched_elem; + uint32_t ring_size; + odp_buffer_hdr_t **ring; + uint32_t size; + + sched_elem = &queue->s.sched_elem; + ring_size = param->size > 0 ? + ROUNDUP_POWER2_U32(param->size) : CONFIG_QUEUE_SIZE; + strncpy(queue->s.name, name ? name : "", ODP_QUEUE_NAME_LEN - 1); + queue->s.name[ODP_QUEUE_NAME_LEN - 1] = 0; + memcpy(&queue->s.param, param, sizeof(odp_queue_param_t)); + + size = ring_size * sizeof(odp_buffer_hdr_t *); + ring = (odp_buffer_hdr_t **)shm_pool_alloc_align(queue_shm_pool, size); + if (NULL == ring) + return -1; + + for (ring_idx = 0; ring_idx < ring_size; ring_idx++) + ring[ring_idx] = NULL; + + queue->s.type = queue->s.param.type; + queue->s.enqueue = _queue_enq; + queue->s.dequeue = _queue_deq; + queue->s.enqueue_multi = _queue_enq_multi; + queue->s.dequeue_multi = _queue_deq_multi; + queue->s.pktin = PKTIN_INVALID; + + sched_elem->node.next = NULL; +#ifdef CONFIG_QSCHST_LOCK + LOCK_INIT(&sched_elem->qschlock); +#endif + sched_elem->qschst.numevts = 0; + sched_elem->qschst.wrr_budget = CONFIG_WRR_WEIGHT; + sched_elem->qschst.cur_ticket = 0; + sched_elem->qschst.nxt_ticket = 0; + sched_elem->pop_deficit = 0; + if (queue->s.type == ODP_QUEUE_TYPE_SCHED) + sched_elem->qschst_type = queue->s.param.sched.sync; + else + sched_elem->qschst_type = ODP_NO_SCHED_QUEUE; + /* 2nd cache line - enqueue */ + sched_elem->prod_read = 0; + sched_elem->prod_write = 0; + sched_elem->prod_ring = ring; + sched_elem->prod_mask = ring_size - 1; + /* 3rd cache line - dequeue */ + sched_elem->cons_read = 0; + sched_elem->cons_write = 0; + sched_elem->rwin = NULL; + sched_elem->schedq = NULL; + sched_elem->user_ctx = queue->s.param.context; +#ifdef CONFIG_SPLIT_PRODCONS + sched_elem->cons_ring = ring; + sched_elem->cons_mask = ring_size - 1; + sched_elem->cons_type = sched_elem->qschst_type; +#endif + + /* Queue initialized successfully, add it to the sched group */ + if (queue->s.type == ODP_QUEUE_TYPE_SCHED) { + if (queue->s.param.sched.sync == ODP_SCHED_SYNC_ORDERED) { + sched_elem->rwin = + rwin_alloc(queue_shm_pool, + queue->s.param.sched.lock_count); + if (sched_elem->rwin == NULL) { + ODP_ERR("Reorder window not created\n"); + goto rwin_create_failed; + } + } + sched_elem->schedq = + schedq_from_sched_group(param->sched.group, + param->sched.prio); + } + + return 0; + +rwin_create_failed: + _odp_ishm_pool_free(queue_shm_pool, ring); + + return -1; +} + +static int queue_init_global(void) +{ + uint32_t i; + uint64_t pool_size; + uint64_t min_alloc; + uint64_t max_alloc; + + ODP_DBG("Queue init ... "); + + /* Attach to the pool if it exists */ + queue_shm_pool = _odp_ishm_pool_lookup("queue_shm_pool"); + if (queue_shm_pool == NULL) { + /* Create shared memory pool to allocate shared memory for the + * queues. Use the default queue size. + */ + /* Add size of the array holding the queues */ + pool_size = sizeof(queue_table_t); + /* Add storage required for queues */ + pool_size += (CONFIG_QUEUE_SIZE * sizeof(odp_buffer_hdr_t *)) * + ODP_CONFIG_QUEUES; + /* Add the reorder window size */ + pool_size += sizeof(reorder_window_t) * ODP_CONFIG_QUEUES; + /* Choose min_alloc and max_alloc such that buddy allocator is + * is selected. + */ + min_alloc = 0; + max_alloc = CONFIG_QUEUE_SIZE * sizeof(odp_buffer_hdr_t *); + queue_shm_pool = _odp_ishm_pool_create("queue_shm_pool", + pool_size, + min_alloc, max_alloc, + _ODP_ISHM_SINGLE_VA); + if (queue_shm_pool == NULL) { + ODP_ERR("Failed to allocate shared memory pool for" + " queues\n"); + goto queue_shm_pool_create_failed; + } + } + + queue_tbl = (queue_table_t *) + shm_pool_alloc_align(queue_shm_pool, + sizeof(queue_table_t)); + if (queue_tbl == NULL) { + ODP_ERR("Failed to reserve shared memory for queue table\n"); + goto queue_tbl_ishm_alloc_failed; + } + + memset(queue_tbl, 0, sizeof(queue_table_t)); + + for (i = 0; i < ODP_CONFIG_QUEUES; i++) { + /* init locks */ + queue_entry_t *queue; + + queue = get_qentry(i); + LOCK_INIT(&queue->s.lock); + queue->s.index = i; + queue->s.handle = queue_from_id(i); + } + + ODP_DBG("done\n"); + ODP_DBG("Queue init global\n"); + ODP_DBG(" struct queue_entry_s size %zu\n", + sizeof(struct queue_entry_s)); + ODP_DBG(" queue_entry_t size %zu\n", + sizeof(queue_entry_t)); + ODP_DBG("\n"); + + return 0; + +queue_shm_pool_create_failed: + +queue_tbl_ishm_alloc_failed: + _odp_ishm_pool_destroy(queue_shm_pool); + + return -1; +} + +static int queue_term_global(void) +{ + int ret = 0; + int rc = 0; + queue_entry_t *queue; + int i; + + for (i = 0; i < ODP_CONFIG_QUEUES; i++) { + queue = &queue_tbl->queue[i]; + if (__atomic_load_n(&queue->s.status, + __ATOMIC_RELAXED) != QUEUE_STATUS_FREE) { + ODP_ERR("Not destroyed queue: %s\n", queue->s.name); + rc = -1; + } + } + + _odp_ishm_pool_free(queue_shm_pool, queue_tbl); + + ret = _odp_ishm_pool_destroy(queue_shm_pool); + if (ret < 0) { + ODP_ERR("Failed to destroy shared memory pool for queues\n"); + rc = -1; + } + + return rc; +} + +static int queue_init_local(void) +{ + return 0; +} + +static int queue_term_local(void) +{ + return 0; +} + +static int queue_capability(odp_queue_capability_t *capa) +{ + memset(capa, 0, sizeof(odp_queue_capability_t)); + + /* Reserve some queues for internal use */ + capa->max_queues = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; + capa->max_ordered_locks = sched_fn->max_ordered_locks(); + capa->max_sched_groups = sched_fn->num_grps(); + capa->sched_prios = odp_schedule_num_prio(); + capa->plain.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; + capa->plain.max_size = 0; + capa->sched.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; + capa->sched.max_size = 0; + + return 0; +} + +static odp_queue_type_t queue_type(odp_queue_t handle) +{ + return qentry_from_int(queue_from_ext(handle))->s.type; +} + +static odp_schedule_sync_t queue_sched_type(odp_queue_t handle) +{ + return qentry_from_int(queue_from_ext(handle))->s.param.sched.sync; +} + +static odp_schedule_prio_t queue_sched_prio(odp_queue_t handle) +{ + return qentry_from_int(queue_from_ext(handle))->s.param.sched.prio; +} + +static odp_schedule_group_t queue_sched_group(odp_queue_t handle) +{ + return qentry_from_int(queue_from_ext(handle))->s.param.sched.group; +} + +static int queue_lock_count(odp_queue_t handle) +{ + queue_entry_t *queue = qentry_from_int(queue_from_ext(handle)); + + return queue->s.param.sched.sync == ODP_SCHED_SYNC_ORDERED ? + (int)queue->s.param.sched.lock_count : -1; +} + +static odp_queue_t queue_create(const char *name, + const odp_queue_param_t *param) +{ + int queue_idx; + odp_queue_t handle = ODP_QUEUE_INVALID; + queue_entry_t *queue; + odp_queue_param_t default_param; + + if (param == NULL) { + odp_queue_param_init(&default_param); + param = &default_param; + } + + for (queue_idx = 0; queue_idx < ODP_CONFIG_QUEUES; queue_idx++) { + queue = &queue_tbl->queue[queue_idx]; + + if (queue->s.status != QUEUE_STATUS_FREE) + continue; + + LOCK(&queue->s.lock); + if (queue->s.status == QUEUE_STATUS_FREE) { + if (queue_init(queue, name, param)) { + UNLOCK(&queue->s.lock); + return handle; + } + queue->s.status = QUEUE_STATUS_READY; + handle = queue->s.handle; + UNLOCK(&queue->s.lock); + break; + } + UNLOCK(&queue->s.lock); + } + return handle; +} + +static int queue_destroy(odp_queue_t handle) +{ + queue_entry_t *queue; + sched_elem_t *q; + + if (handle == ODP_QUEUE_INVALID) + return -1; + + queue = qentry_from_int(queue_from_ext(handle)); + LOCK(&queue->s.lock); + if (queue->s.status != QUEUE_STATUS_READY) { + UNLOCK(&queue->s.lock); + return -1; + } + q = &queue->s.sched_elem; + +#ifdef CONFIG_QSCHST_LOCK + LOCK(&q->qschlock); +#endif + if (_odp_queue_disable_enq(q)) { + /* Producer side not empty */ +#ifdef CONFIG_QSCHST_LOCK + UNLOCK(&q->qschlock); +#endif + UNLOCK(&queue->s.lock); + return -1; + } + /* Enqueue is now disabled */ + if (q->cons_read != q->cons_write) { + /* Consumer side is not empty + * Roll back previous change, enable enqueue again. + */ + uint32_t size; + + size = q->prod_mask + 1; + __atomic_fetch_sub(&q->prod_write, size, __ATOMIC_RELAXED); +#ifdef CONFIG_QSCHST_LOCK + UNLOCK(&q->qschlock); +#endif + UNLOCK(&queue->s.lock); + return -1; + } +#ifdef CONFIG_QSCHST_LOCK + UNLOCK(&q->qschlock); +#endif + /* Producer and consumer sides empty, enqueue disabled + * Now wait until schedq state is empty and no outstanding tickets + */ + while (__atomic_load_n(&q->qschst.numevts, __ATOMIC_RELAXED) != 0 || + __atomic_load_n(&q->qschst.cur_ticket, __ATOMIC_RELAXED) != + __atomic_load_n(&q->qschst.nxt_ticket, __ATOMIC_RELAXED)) { + sevl(); + while (wfe() && monitor32((uint32_t *)&q->qschst.numevts, + __ATOMIC_RELAXED) != 0) + doze(); + } + + /* Adjust the spread factor for the queues in the schedule group */ + if (queue->s.type == ODP_QUEUE_TYPE_SCHED) + sched_group_xcount_dec(queue->s.param.sched.group, + queue->s.param.sched.prio); + + _odp_ishm_pool_free(queue_shm_pool, q->prod_ring); + + if (queue->s.param.sched.sync == ODP_SCHED_SYNC_ORDERED) { + if (rwin_free(queue_shm_pool, q->rwin) < 0) { + ODP_ERR("Failed to free reorder window\n"); + UNLOCK(&queue->s.lock); + return -1; + } + } + queue->s.status = QUEUE_STATUS_FREE; + UNLOCK(&queue->s.lock); + return 0; +} + +static int queue_context_set(odp_queue_t handle, void *context, + uint32_t len ODP_UNUSED) +{ + odp_mb_full(); + qentry_from_int(queue_from_ext(handle))->s.param.context = context; + odp_mb_full(); + return 0; +} + +static void *queue_context(odp_queue_t handle) +{ + return qentry_from_int(queue_from_ext(handle))->s.param.context; +} + +static odp_queue_t queue_lookup(const char *name) +{ + uint32_t i; + + for (i = 0; i < ODP_CONFIG_QUEUES; i++) { + queue_entry_t *queue = &queue_tbl->queue[i]; + + if (queue->s.status == QUEUE_STATUS_FREE || + queue->s.status == QUEUE_STATUS_DESTROYED) + continue; + + LOCK(&queue->s.lock); + if (strcmp(name, queue->s.name) == 0) { + /* found it */ + UNLOCK(&queue->s.lock); + return queue->s.handle; + } + UNLOCK(&queue->s.lock); + } + + return ODP_QUEUE_INVALID; +} + +#ifndef CONFIG_QSCHST_LOCK +static inline int _odp_queue_enq(sched_elem_t *q, + odp_buffer_hdr_t *buf_hdr[], + int num) +{ + ringidx_t old_read; + ringidx_t old_write; + ringidx_t new_write; + int actual; + uint32_t mask; + odp_buffer_hdr_t **ring; + + mask = q->prod_mask; + ring = q->prod_ring; + + /* Load producer ring state (read & write index) */ + old_write = __atomic_load_n(&q->prod_write, __ATOMIC_RELAXED); + do { + /* Consumer does store-release prod_read, we need + * load-acquire. + */ + old_read = __atomic_load_n(&q->prod_read, __ATOMIC_ACQUIRE); + + actual = MIN(num, (int)((mask + 1) - (old_write - old_read))); + if (odp_unlikely(actual <= 0)) + return 0; + + new_write = old_write + actual; + } while (!__atomic_compare_exchange_n(&q->prod_write, + &old_write, /* Updated on failure */ + new_write, + true, + __ATOMIC_RELAXED, + __ATOMIC_RELAXED)); + +#ifdef CONFIG_SPLIT_PRODCONS + __builtin_prefetch(&q->cons_write, 0, 0); +#endif + /* Store our event(s) in the ring */ + do { + ring[old_write & mask] = *buf_hdr++; + } while (++old_write != new_write); + old_write -= actual; + +#ifdef CONFIG_SPLIT_PRODCONS + __builtin_prefetch(&q->node, 1, 0); +#endif + /* Wait for our turn to signal consumers */ + if (odp_unlikely(__atomic_load_n(&q->cons_write, + __ATOMIC_RELAXED) != old_write)) { + sevl(); + while (wfe() && monitor32(&q->cons_write, + __ATOMIC_RELAXED) != old_write) + doze(); + } + + /* Signal consumers that events are available (release events) + * Enable other producers to continue + */ + /* Wait for writes (to ring slots) to complete */ + atomic_store_release(&q->cons_write, new_write, /*readonly=*/false); + + return actual; +} + +#else + +static inline int _odp_queue_enq_sp(sched_elem_t *q, + odp_buffer_hdr_t *buf_hdr[], + int num) +{ + ringidx_t old_read; + ringidx_t old_write; + ringidx_t new_write; + int actual; + uint32_t mask; + odp_buffer_hdr_t **ring; + + mask = q->prod_mask; + ring = q->prod_ring; + + /* Load producer ring state (read & write index) */ + old_write = q->prod_write; + /* Consumer does store-release prod_read, we need load-acquire */ + old_read = __atomic_load_n(&q->prod_read, __ATOMIC_ACQUIRE); + actual = MIN(num, (int)((mask + 1) - (old_write - old_read))); + if (odp_unlikely(actual <= 0)) + return 0; + + new_write = old_write + actual; + q->prod_write = new_write; + + /* Store our event(s) in the ring */ + do { + ring[old_write & mask] = *buf_hdr++; + } while (++old_write != new_write); + old_write -= actual; + +#ifdef CONFIG_SPLIT_PRODCONS + __builtin_prefetch(&q->node, 1, 0); +#endif + + /* Signal consumers that events are available (release events) + * Enable other producers to continue + */ +#ifdef CONFIG_QSCHST_LOCK + q->cons_write = new_write; +#else + atomic_store_release(&q->cons_write, new_write, /*readonly=*/false); +#endif + + return actual; +} +#endif + +static int _queue_enq_multi(queue_t handle, odp_buffer_hdr_t *buf_hdr[], + int num) +{ + int actual; + queue_entry_t *queue; + sched_scalable_thread_state_t *ts; + + queue = qentry_from_int(handle); + ts = sched_ts; + if (ts && odp_unlikely(ts->out_of_order)) { + actual = rctx_save(queue, buf_hdr, num); + return actual; + } + +#ifdef CONFIG_QSCHST_LOCK + LOCK(&queue->s.sched_elem.qschlock); + actual = _odp_queue_enq_sp(&queue->s.sched_elem, buf_hdr, num); +#else + actual = _odp_queue_enq(&queue->s.sched_elem, buf_hdr, num); +#endif + + if (odp_likely(queue->s.sched_elem.schedq != NULL && actual != 0)) { + /* Perform scheduler related updates. */ +#ifdef CONFIG_QSCHST_LOCK + sched_update_enq_sp(&queue->s.sched_elem, actual); +#else + sched_update_enq(&queue->s.sched_elem, actual); +#endif + } + +#ifdef CONFIG_QSCHST_LOCK + UNLOCK(&queue->s.sched_elem.qschlock); +#endif + return actual; +} + +static int _queue_enq(queue_t handle, odp_buffer_hdr_t *buf_hdr) +{ + return odp_likely( + _queue_enq_multi(handle, &buf_hdr, 1) == 1) ? 0 : -1; +} + +static int queue_enq_multi(odp_queue_t handle, const odp_event_t ev[], int num) +{ + odp_buffer_hdr_t *buf_hdr[QUEUE_MULTI_MAX]; + queue_entry_t *queue; + int i; + + if (num > QUEUE_MULTI_MAX) + num = QUEUE_MULTI_MAX; + + queue = qentry_from_int(queue_from_ext(handle)); + + for (i = 0; i < num; i++) + buf_hdr[i] = buf_hdl_to_hdr(odp_buffer_from_event(ev[i])); + + return queue->s.enqueue_multi(qentry_to_int(queue), buf_hdr, num); +} + +static int queue_enq(odp_queue_t handle, odp_event_t ev) +{ + odp_buffer_hdr_t *buf_hdr; + queue_entry_t *queue; + + queue = qentry_from_int(queue_from_ext(handle)); + buf_hdr = buf_hdl_to_hdr(odp_buffer_from_event(ev)); + + return queue->s.enqueue(qentry_to_int(queue), buf_hdr); +} + +/* Single-consumer dequeue. */ +int _odp_queue_deq_sc(sched_elem_t *q, odp_event_t *evp, int num) +{ + int actual; + ringidx_t old_read; + ringidx_t old_write; + ringidx_t new_read; + uint32_t mask; + odp_buffer_hdr_t **ring; + + /* Load consumer ring state (read & write index). */ + old_read = q->cons_read; + /* Producer does store-release cons_write, we need load-acquire */ + old_write = __atomic_load_n(&q->cons_write, __ATOMIC_ACQUIRE); + actual = MIN(num, (int)(old_write - old_read)); + + if (odp_unlikely(actual <= 0)) + return 0; + +#ifdef CONFIG_SPLIT_PRODCONS + __builtin_prefetch(&q->node, 1, 0); +#endif + new_read = old_read + actual; + q->cons_read = new_read; + + mask = q->cons_mask; + ring = q->cons_ring; + do { + *evp++ = odp_buffer_to_event( - odp_hdr_to_buf(ring[old_read & mask])); ++ buf_from_buf_hdr(ring[old_read & mask])); + } while (++old_read != new_read); + + /* Signal producers that empty slots are available + * (release ring slots). Enable other consumers to continue. + */ +#ifdef CONFIG_QSCHST_LOCK + q->prod_read = new_read; +#else + /* Wait for loads (from ring slots) to complete. */ + atomic_store_release(&q->prod_read, new_read, /*readonly=*/true); +#endif + return actual; +} + +inline int _odp_queue_deq(sched_elem_t *q, odp_buffer_hdr_t *buf_hdr[], int num) +{ + int actual; + ringidx_t old_read; + ringidx_t old_write; + ringidx_t new_read; + uint32_t mask; + odp_buffer_hdr_t **ring; + odp_buffer_hdr_t **p_buf_hdr; + + mask = q->cons_mask; + ring = q->cons_ring; + + /* Load consumer ring state (read & write index) */ + old_read = __atomic_load_n(&q->cons_read, __ATOMIC_RELAXED); + do { + /* Need __atomic_load to avoid compiler reordering + * Producer does store-release cons_write, we need + * load-acquire. + */ + old_write = __atomic_load_n(&q->cons_write, __ATOMIC_ACQUIRE); + /* Prefetch ring buffer array */ + __builtin_prefetch(&q->cons_ring[old_read & mask], 0, 0); + + actual = MIN(num, (int)(old_write - old_read)); + if (odp_unlikely(actual <= 0)) + return 0; + + /* Attempt to free ring slot(s) */ + new_read = old_read + actual; + } while (!__atomic_compare_exchange_n(&q->cons_read, + &old_read, /* Updated on failure */ + new_read, + true, + __ATOMIC_RELAXED, + __ATOMIC_RELAXED)); +#ifdef CONFIG_SPLIT_PRODCONS + __builtin_prefetch(&q->prod_read, 0, 0); +#endif + p_buf_hdr = buf_hdr; + do { + *p_buf_hdr++ = ring[old_read & mask]; + } while (++old_read != new_read); + old_read -= actual; + +#ifdef CONFIG_SPLIT_PRODCONS + __builtin_prefetch(&q->node, 1, 0); +#endif + /* Wait for our turn to signal producers */ + if (odp_unlikely(__atomic_load_n(&q->prod_read, __ATOMIC_RELAXED) != + old_read)) { + sevl(); + while (wfe() && monitor32(&q->prod_read, + __ATOMIC_RELAXED) != old_read) + doze(); + } + + /* Signal producers that empty slots are available + * (release ring slots) + * Enable other consumers to continue + */ + /* Wait for loads (from ring slots) to complete */ + atomic_store_release(&q->prod_read, new_read, /*readonly=*/true); + + return actual; +} + +inline int _odp_queue_deq_mc(sched_elem_t *q, odp_event_t *evp, int num) +{ + int ret, evt_idx; + odp_buffer_hdr_t *hdr_tbl[QUEUE_MULTI_MAX]; + + if (num > QUEUE_MULTI_MAX) + num = QUEUE_MULTI_MAX; + + ret = _odp_queue_deq(q, hdr_tbl, num); + if (odp_likely(ret != 0)) { + for (evt_idx = 0; evt_idx < num; evt_idx++) + evp[evt_idx] = odp_buffer_to_event( - odp_hdr_to_buf(hdr_tbl[evt_idx])); ++ buf_from_buf_hdr(hdr_tbl[evt_idx])); + } + + return ret; +} + +static int _queue_deq_multi(queue_t handle, odp_buffer_hdr_t *buf_hdr[], + int num) +{ + sched_elem_t *q; + queue_entry_t *queue; + + queue = qentry_from_int(handle); + q = &queue->s.sched_elem; + return _odp_queue_deq(q, buf_hdr, num); +} + +static odp_buffer_hdr_t *_queue_deq(queue_t handle) +{ + sched_elem_t *q; + odp_buffer_hdr_t *buf_hdr; + queue_entry_t *queue; + + queue = qentry_from_int(handle); + q = &queue->s.sched_elem; + if (_odp_queue_deq(q, &buf_hdr, 1) == 1) + return buf_hdr; + else + return NULL; +} + - static int queue_deq_multi(odp_queue_t handle, odp_event_t events[], int num) ++static int queue_deq_multi(odp_queue_t handle, odp_event_t ev[], int num) +{ + queue_entry_t *queue; - odp_buffer_hdr_t *buf_hdr[QUEUE_MULTI_MAX]; - int i, ret; + + if (num > QUEUE_MULTI_MAX) + num = QUEUE_MULTI_MAX; + + queue = qentry_from_int(queue_from_ext(handle)); - - ret = queue->s.dequeue_multi(qentry_to_int(queue), buf_hdr, num); - - for (i = 0; i < ret; i++) - events[i] = odp_buffer_to_event(buf_hdr[i]->handle.handle); - - return ret; ++ return queue->s.dequeue_multi(qentry_to_int(queue), (odp_buffer_hdr_t **)ev, num); +} + +static odp_event_t queue_deq(odp_queue_t handle) +{ + queue_entry_t *queue; - odp_buffer_hdr_t *buf_hdr; + + queue = qentry_from_int(queue_from_ext(handle)); - buf_hdr = queue->s.dequeue(qentry_to_int(queue)); - - if (buf_hdr) - return odp_buffer_to_event(buf_hdr->handle.handle); - - return ODP_EVENT_INVALID; ++ return (odp_event_t)queue->s.dequeue(qentry_to_int(queue)); +} + +static void queue_param_init(odp_queue_param_t *params) +{ + memset(params, 0, sizeof(odp_queue_param_t)); + params->type = ODP_QUEUE_TYPE_PLAIN; + params->enq_mode = ODP_QUEUE_OP_MT; + params->deq_mode = ODP_QUEUE_OP_MT; + params->sched.prio = ODP_SCHED_PRIO_DEFAULT; + params->sched.sync = ODP_SCHED_SYNC_PARALLEL; + params->sched.group = ODP_SCHED_GROUP_ALL; +} + +static int queue_info(odp_queue_t handle, odp_queue_info_t *info) +{ + uint32_t queue_id; + queue_entry_t *queue; + int status; + + if (odp_unlikely(info == NULL)) { + ODP_ERR("Unable to store info, NULL ptr given\n"); + return -1; + } + + queue_id = queue_to_id(handle); + + if (odp_unlikely(queue_id >= ODP_CONFIG_QUEUES)) { + ODP_ERR("Invalid queue handle:%" PRIu64 "\n", + odp_queue_to_u64(handle)); + return -1; + } + + queue = get_qentry(queue_id); + + LOCK(&queue->s.lock); + status = queue->s.status; + + if (odp_unlikely(status == QUEUE_STATUS_FREE || + status == QUEUE_STATUS_DESTROYED)) { + UNLOCK(&queue->s.lock); + ODP_ERR("Invalid queue status:%d\n", status); + return -1; + } + + info->name = queue->s.name; + info->param = queue->s.param; + + UNLOCK(&queue->s.lock); + + return 0; +} + +static uint64_t queue_to_u64(odp_queue_t hdl) +{ + return _odp_pri(hdl); +} + +static odp_pktout_queue_t queue_get_pktout(queue_t handle) +{ + return qentry_from_int(handle)->s.pktout; +} + +static void queue_set_pktout(queue_t handle, odp_pktio_t pktio, int index) +{ + qentry_from_int(handle)->s.pktout.pktio = pktio; + qentry_from_int(handle)->s.pktout.index = index; +} + +static odp_pktin_queue_t queue_get_pktin(queue_t handle) +{ + return qentry_from_int(handle)->s.pktin; +} + +static void queue_set_pktin(queue_t handle, odp_pktio_t pktio, int index) +{ + qentry_from_int(handle)->s.pktin.pktio = pktio; + qentry_from_int(handle)->s.pktin.index = index; +} + +static void queue_set_enq_deq_func(queue_t handle, + queue_enq_fn_t enq, + queue_enq_multi_fn_t enq_multi, + queue_deq_fn_t deq, + queue_deq_multi_fn_t deq_multi) +{ + if (enq) + qentry_from_int(handle)->s.enqueue = enq; + + if (enq_multi) + qentry_from_int(handle)->s.enqueue_multi = enq_multi; + + if (deq) + qentry_from_int(handle)->s.dequeue = deq; + + if (deq_multi) + qentry_from_int(handle)->s.dequeue_multi = deq_multi; +} + +static queue_t queue_from_ext(odp_queue_t handle) +{ + uint32_t queue_id; + + queue_id = queue_to_id(handle); + return qentry_to_int(get_qentry(queue_id)); +} + +static odp_queue_t queue_to_ext(queue_t handle) +{ + return qentry_from_int(handle)->s.handle; +} + +/* API functions */ +queue_api_t queue_scalable_api = { + .queue_create = queue_create, + .queue_destroy = queue_destroy, + .queue_lookup = queue_lookup, + .queue_capability = queue_capability, + .queue_context_set = queue_context_set, + .queue_context = queue_context, + .queue_enq = queue_enq, + .queue_enq_multi = queue_enq_multi, + .queue_deq = queue_deq, + .queue_deq_multi = queue_deq_multi, + .queue_type = queue_type, + .queue_sched_type = queue_sched_type, + .queue_sched_prio = queue_sched_prio, + .queue_sched_group = queue_sched_group, + .queue_lock_count = queue_lock_count, + .queue_to_u64 = queue_to_u64, + .queue_param_init = queue_param_init, + .queue_info = queue_info +}; + +/* Functions towards internal components */ +queue_fn_t queue_scalable_fn = { + .init_global = queue_init_global, + .term_global = queue_term_global, + .init_local = queue_init_local, + .term_local = queue_term_local, + .from_ext = queue_from_ext, + .to_ext = queue_to_ext, + .enq = _queue_enq, + .enq_multi = _queue_enq_multi, + .deq = _queue_deq, + .deq_multi = _queue_deq_multi, + .get_pktout = queue_get_pktout, + .set_pktout = queue_set_pktout, + .get_pktin = queue_get_pktin, + .set_pktin = queue_set_pktin, + .set_enq_deq_fn = queue_set_enq_deq_func +}; diff --cc platform/linux-generic/odp_schedule_iquery.c index 9605edc7,d374dedd..44a725ab --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@@ -22,11 -22,10 +22,14 @@@ #include <odp/api/thrmask.h> #include <odp/api/packet_io.h> #include <odp_config_internal.h> +#include <odp_timer_internal.h> + +/* Should remove this dependency */ +#include <odp_queue_internal.h>
+ /* Should remove this dependency */ + #include <odp_queue_internal.h> + /* Number of priority levels */ #define NUM_SCHED_PRIO 8
-----------------------------------------------------------------------
Summary of changes: .travis.yml | 107 +++- configure.ac | 5 - doc/users-guide/users-guide.adoc | 32 +- example/ipfragreass/odp_ipfragreass_atomics_arm.h | 19 +- example/ipsec/Makefile.am | 2 + helper/cuckootable.c | 1 + helper/iplookuptable.c | 1 + include/odp/arch/default/api/abi/buffer.h | 7 +- include/odp/arch/default/api/abi/event.h | 2 +- pkgconfig/libodp-linux.pc.in | 4 +- platform/Makefile.inc | 2 + platform/linux-generic/Makefile.am | 14 + platform/linux-generic/_fdserver.c | 25 +- platform/linux-generic/_ishm.c | 131 +++- platform/linux-generic/arch/arm/odp_cpu.h | 2 + platform/linux-generic/arch/arm/odp_cpu_idling.h | 2 - platform/linux-generic/include/_ishm_internal.h | 1 + .../include/odp/api/plat/buffer_types.h | 6 +- .../include/odp/api/plat/event_types.h | 2 +- .../include/odp/api/plat/timer_types.h | 2 +- .../linux-generic/include/odp_buffer_inlines.h | 4 +- .../linux-generic/include/odp_buffer_internal.h | 25 +- .../linux-generic/include/odp_config_internal.h | 6 +- platform/linux-generic/include/odp_internal.h | 4 + platform/linux-generic/include/odp_packet_dpdk.h | 2 - .../linux-generic/include/odp_packet_internal.h | 63 +- .../linux-generic/include/odp_packet_io_internal.h | 3 +- .../include/odp_packet_io_ipc_internal.h | 8 - platform/linux-generic/include/odp_pool_internal.h | 42 +- platform/linux-generic/m4/configure.m4 | 13 +- platform/linux-generic/m4/odp_dpdk.m4 | 41 +- platform/linux-generic/m4/odp_netmap.m4 | 7 +- platform/linux-generic/m4/odp_openssl.m4 | 17 +- platform/linux-generic/m4/odp_pcap.m4 | 8 +- platform/linux-generic/m4/odp_pthread.m4 | 5 - platform/linux-generic/m4/odp_timer.m4 | 8 + platform/linux-generic/odp_buffer.c | 4 +- platform/linux-generic/odp_crypto.c | 4 +- platform/linux-generic/odp_init.c | 66 +- platform/linux-generic/odp_packet.c | 173 ++---- platform/linux-generic/odp_packet_io.c | 2 + platform/linux-generic/odp_pool.c | 134 ++-- platform/linux-generic/odp_queue.c | 74 +-- platform/linux-generic/odp_queue_scalable.c | 24 +- platform/linux-generic/odp_schedule_iquery.c | 3 + platform/linux-generic/odp_traffic_mngr.c | 2 +- platform/linux-generic/pktio/dpdk.c | 692 ++++++++++++++++----- platform/linux-generic/pktio/ipc.c | 92 ++- platform/linux-generic/pktio/socket_mmap.c | 6 +- test/Makefile.inc | 2 +- test/common_plat/common/Makefile.am | 1 + test/common_plat/m4/validation.m4 | 19 +- test/common_plat/validation/api/Makefile.inc | 3 + test/common_plat/validation/api/queue/queue.c | 8 +- test/linux-generic/Makefile.inc | 4 +- test/linux-generic/pktio_ipc/ipc_common.h | 4 + test/linux-generic/pktio_ipc/pktio_ipc1.c | 38 +- test/linux-generic/pktio_ipc/pktio_ipc2.c | 24 +- test/linux-generic/pktio_ipc/pktio_ipc_run.sh | 39 +- .../validation/api/shmem/shmem_common.h | 5 +- .../validation/api/shmem/shmem_linux.c | 21 +- .../validation/api/shmem/shmem_odp1.c | 8 +- .../validation/api/shmem/shmem_odp2.c | 4 +- 63 files changed, 1354 insertions(+), 725 deletions(-) create mode 100644 platform/linux-generic/m4/odp_timer.m4
hooks/post-receive