This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 3c02836d9d9ca16b1277bdd30e523779b9fe8374 (commit)
via bb003e11ae7bfacc1fb1e9b8276dd49a32a31b4e (commit)
via b5dfcef4586e0a1618c202aaeb7e863c17cc4d06 (commit)
from 6b5cdc77eb9759a2349b10372a964648559bc92c (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 3c02836d9d9ca16b1277bdd30e523779b9fe8374
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Fri Dec 15 15:23:59 2017 +0200
DEPENDENCIES: update requirements for Red Hat
Update instructions to support RHEL 7.4.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/DEPENDENCIES b/DEPENDENCIES
index 68c7b8be..0805a183 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -19,7 +19,7 @@ Prerequisites for building the OpenDataPlane (ODP) API
3. Required libraries
- Libraries currently required to link: openssl
+ Libraries currently required to link: openssl, libatomic
3.1 OpenSSL native compile
@@ -163,6 +163,8 @@ Prerequisites for building the OpenDataPlane (ODP) API
DPDK pktio adds a depency to NUMA library.
# Debian/Ubuntu
$ sudo apt-get install libnuma-dev
+ # CentOS/RedHat/Fedora
+ $ sudo yum install numactl-devel
Note: only packet I/O is accelerated with DPDK. Use
https://git.linaro.org/lng/odp-dpdk.git
@@ -227,14 +229,16 @@ Prerequisites for building the OpenDataPlane (ODP) API
make
sudo make install
+ # On RedHat you also have to add path /usr/local/lib to /etc/ld.so.conf
+
# ... OR ... Install CUnit into user defined location. The same path is
# used in step 4.4: PKG_CONFIG_PATH=/home/<my_cunit_path>/lib/pkgconfig
./configure --prefix=/home/<my_cunit_path>
make
make install
- # Also (in Ubuntu at least) run ldconfig to update shared lib cache or
- # reboot, before trying to run e.g. 'make distcheck'.
+ # Also (in Ubuntu/RedHat at least) run ldconfig to update shared lib
+ # cache or reboot, before trying to run e.g. 'make distcheck'.
sudo ldconfig
4.3 Cross compile of CUnit
commit bb003e11ae7bfacc1fb1e9b8276dd49a32a31b4e
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Mon Dec 18 16:22:42 2017 +0200
test: odp_pktio_ordered: run test only if pcap is available
The odp_pktio_ordered test depends on pcap pktio, so skip it if pcap is not
available.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am
index 1dccd82e..9c709e79 100644
--- a/test/performance/Makefile.am
+++ b/test/performance/Makefile.am
@@ -12,10 +12,13 @@ COMPILE_ONLY = odp_l2fwd \
odp_scheduling
TESTSCRIPTS = odp_l2fwd_run.sh \
- odp_pktio_ordered_run.sh \
odp_sched_latency_run.sh \
odp_scheduling_run.sh
+if HAVE_PCAP
+TESTSCRIPTS += odp_pktio_ordered_run.sh
+endif
+
TEST_EXTENSIONS = .sh
if test_perf
commit b5dfcef4586e0a1618c202aaeb7e863c17cc4d06
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Mon Dec 18 15:24:04 2017 +0200
test: disable C++ test if no compiler is found
Enables building ODP on systems which have no C++ compiler available.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/m4/miscellaneous.m4 b/test/m4/miscellaneous.m4
index dac236a6..07c32377 100644
--- a/test/m4/miscellaneous.m4
+++ b/test/m4/miscellaneous.m4
@@ -2,7 +2,21 @@
# Enable/disable test-cpp
##########################################################################
AC_ARG_ENABLE([test-cpp],
- [AS_HELP_STRING([--disable-test-cpp], [run basic test aginast cpp])],
+ [AS_HELP_STRING([--disable-test-cpp], [run basic test against cpp])],
[test_cpp=$enableval],
- [test_cpp=yes])
+ [test_cpp=check])
+
+if test "x$test_cpp" != "xno" ; then
+ AC_CACHE_CHECK([if C++ compiler works], [odp_cv_cxx_works],
+ [AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [odp_cv_cxx_works=yes],
+ [odp_cv_cxx_works=no])
+ AC_LANG_POP([C++])])
+ AS_IF([test "x$test_cpp$odp_cv_cxx_works" = "xyesno"],
+ [AC_MSG_FAILURE([C++ compiler test failed])],
+ [test "x$test_cpp$odp_cv_cxx_works" = "xcheckno"],
+ [AC_MSG_NOTICE([disabling C++ test]) ; test_cpp=no],
+ [test_cpp=yes])
+fi
+
AM_CONDITIONAL([test_cpp], [test x$test_cpp = xyes ])
-----------------------------------------------------------------------
Summary of changes:
DEPENDENCIES | 10 +++++++---
test/m4/miscellaneous.m4 | 18 ++++++++++++++++--
test/performance/Makefile.am | 5 ++++-
3 files changed, 27 insertions(+), 6 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, api-next has been updated
via f2a1a84b43642f3d0911a351d9308d5501693290 (commit)
via 233d0aa078f6c70a10c84e1bc1365b18c39a7ae9 (commit)
from b1c287aa71c7559ee0cd1b1f3eef971491cf1c04 (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 f2a1a84b43642f3d0911a351d9308d5501693290
Author: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Date: Tue Dec 12 19:20:16 2017 +0300
api: ipsec: drop odp_ipsec_proto_layer_t
Use odp_proto_layer_t to specify outer header retention level. Drop
separate odp_ipsec_proto_layer_t.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index c6795468..4f8748a6 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -69,27 +69,6 @@ typedef enum odp_ipsec_op_mode_t {
} odp_ipsec_op_mode_t;
-/**
- * Protocol layers in IPSEC configuration
- */
-typedef enum odp_ipsec_proto_layer_t {
- /** No layers */
- ODP_IPSEC_LAYER_NONE = ODP_PROTO_LAYER_NONE,
-
- /** Layer L2 protocols (Ethernet, VLAN, etc) */
- ODP_IPSEC_LAYER_L2 = ODP_PROTO_LAYER_L2,
-
- /** Layer L3 protocols (IPv4, IPv6, ICMP, IPSEC, etc) */
- ODP_IPSEC_LAYER_L3 = ODP_PROTO_LAYER_L3,
-
- /** Layer L4 protocols (UDP, TCP, SCTP) */
- ODP_IPSEC_LAYER_L4 = ODP_PROTO_LAYER_L4,
-
- /** All layers */
- ODP_IPSEC_LAYER_ALL = ODP_PROTO_LAYER_ALL
-
-} odp_ipsec_proto_layer_t;
-
/**
* Configuration options for IPSEC inbound processing
*/
@@ -125,25 +104,25 @@ typedef struct odp_ipsec_inbound_config_t {
*
* Select up to which protocol layer (at least) outer headers are
* retained in inbound inline processing. Default value is
- * ODP_IPSEC_LAYER_NONE.
+ * ODP_PROTO_LAYER_NONE.
*
- * ODP_IPSEC_LAYER_NONE: Application does not require any outer
+ * ODP_PROTO_LAYER_NONE: Application does not require any outer
* headers to be retained.
*
- * ODP_IPSEC_LAYER_L2: Retain headers up to layer 2.
+ * ODP_PROTO_LAYER_L2: Retain headers up to layer 2.
*
- * ODP_IPSEC_LAYER_L3: Retain headers up to layer 3, otherwise the
- * same as ODP_IPSEC_LAYER_ALL.
+ * ODP_PROTO_LAYER_L3: Retain headers up to layer 3, otherwise the
+ * same as ODP_PROTO_LAYER_ALL.
*
- * ODP_IPSEC_LAYER_L4: Retain headers up to layer 4, otherwise the
- * same as ODP_IPSEC_LAYER_ALL.
+ * ODP_PROTO_LAYER_L4: Retain headers up to layer 4, otherwise the
+ * same as ODP_PROTO_LAYER_ALL.
*
- * ODP_IPSEC_LAYER_ALL: In tunnel mode, all headers before IPSEC are
+ * ODP_PROTO_LAYER_ALL: In tunnel mode, all headers before IPSEC are
* retained. In transport mode, all headers
* before IP (carrying IPSEC) are retained.
*
*/
- odp_ipsec_proto_layer_t retain_outer;
+ odp_proto_layer_t retain_outer;
/** Parse packet headers after IPSEC transformation
*
commit 233d0aa078f6c70a10c84e1bc1365b18c39a7ae9
Author: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Date: Tue Dec 12 19:18:29 2017 +0300
api: ipsec: use odp_proto_layer_t for parse layer spec
Usign odp_proto_layer_t for parse layer spec is more logical, as it is
the same enum that is used for the rest of packet parsing API.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 538472a5..c6795468 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -156,9 +156,9 @@ typedef struct odp_ipsec_inbound_config_t {
*
* Each successfully transformed packet has a valid value for L3 offset
* regardless of the parse configuration. Default value is
- * ODP_IPSEC_LAYER_NONE. ODP_IPSEC_LAYER_L2 is not a valid value.
+ * ODP_PROTO_LAYER_NONE. ODP_PROTO_LAYER_L2 is not a valid value.
*/
- odp_ipsec_proto_layer_t parse;
+ odp_proto_layer_t parse_level;
/** Flags to control IPSEC payload data checks up to the selected parse
* level. Checksum checking status can be queried for each packet with
diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c
index ff8201c4..49d5531f 100644
--- a/platform/linux-generic/odp_ipsec.c
+++ b/platform/linux-generic/odp_ipsec.c
@@ -756,7 +756,7 @@ static ipsec_sa_t *ipsec_in_single(odp_packet_t pkt,
parse_param.proto = state.is_ipv4 ?
ODP_PROTO_IPV4 :
ODP_PROTO_IPV6;
- parse_param.last_layer = (odp_proto_layer_t)ipsec_config.inbound.parse;
+ parse_param.last_layer = ipsec_config.inbound.parse_level;
parse_param.chksums = ipsec_config.inbound.chksums;
/* We do not care about return code here.
diff --git a/test/validation/api/ipsec/ipsec.c b/test/validation/api/ipsec/ipsec.c
index 9d263dfc..9729efb4 100644
--- a/test/validation/api/ipsec/ipsec.c
+++ b/test/validation/api/ipsec/ipsec.c
@@ -904,7 +904,7 @@ int ipsec_config(odp_instance_t ODP_UNUSED inst)
ipsec_config.inbound_mode = suite_context.inbound_op_mode;
ipsec_config.outbound_mode = suite_context.outbound_op_mode;
ipsec_config.inbound.default_queue = suite_context.queue;
- ipsec_config.inbound.parse = ODP_IPSEC_LAYER_ALL;
+ ipsec_config.inbound.parse_level = ODP_PROTO_LAYER_ALL;
if (ODP_IPSEC_OK != odp_ipsec_config(&ipsec_config))
return -1;
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/ipsec.h | 43 ++++++++++----------------------------
platform/linux-generic/odp_ipsec.c | 2 +-
test/validation/api/ipsec/ipsec.c | 2 +-
3 files changed, 13 insertions(+), 34 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, caterpillar has been created
at 63fd88635cc10caaa02fdccd3f52c9494487bdd2 (commit)
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, devel/native-drivers has been updated
via 121a1e14d0b3b205420df876587ec1e8ef4cf723 (commit)
from 6336beb21e88eef30fbfcd415e6d038c96f4343d (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 121a1e14d0b3b205420df876587ec1e8ef4cf723
Author: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Date: Thu Dec 14 15:45:12 2017 +0100
physmem: rename init/term functions
Signed-off-by: Josep Puigdemont <josep.puigdemont(a)linaro.org>
diff --git a/platform/linux-generic/pktio/physmem/physmem.c b/platform/linux-generic/pktio/physmem/physmem.c
index 54b62d2d..b426c21d 100644
--- a/platform/linux-generic/pktio/physmem/physmem.c
+++ b/platform/linux-generic/pktio/physmem/physmem.c
@@ -544,7 +544,7 @@ static void init_blocks(void)
LIST_INIT(&block_data.empty);
}
-int physmem_block_global_init(void)
+int physmem_block_init_global(void)
{
init_blocks();
@@ -557,7 +557,7 @@ int physmem_block_global_init(void)
return 0;
}
-int physmem_block_global_term(void)
+int physmem_block_term_global(void)
{
for (int i = 0; i < MAX_HUGEPAGES; ++i) {
if (pages[i].fd == 0)
diff --git a/platform/linux-generic/pktio/physmem/physmem.h b/platform/linux-generic/pktio/physmem/physmem.h
index 0ebc2ba6..9a7f37c4 100644
--- a/platform/linux-generic/pktio/physmem/physmem.h
+++ b/platform/linux-generic/pktio/physmem/physmem.h
@@ -32,8 +32,8 @@ struct physmem_block {
physmem_block_type_t type;
};
-int physmem_block_global_init(void);
-int physmem_block_global_term(void);
+int physmem_block_init_global(void);
+int physmem_block_term_global(void);
struct physmem_block *physmem_block_alloc(uint64_t);
void physmem_block_free(struct physmem_block *);
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/pktio/physmem/physmem.c | 4 ++--
platform/linux-generic/pktio/physmem/physmem.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, api-next has been updated
via da9d347e0bbe337ea86448306432080206f3ef49 (commit)
via d533d85ad15ea431a431c407dad468e38ae87ec0 (commit)
via fa7ce5da4b669e55b8d34c7d90b67070879ba5da (commit)
from d96a8207591fbcaac25b79286d7d72a537354c1f (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 da9d347e0bbe337ea86448306432080206f3ef49
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Tue Nov 21 14:12:02 2017 +0200
validation: queue: refer to blocking level
Refer to the new blocking level capability and parameter
fields to check that those exist.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/validation/api/queue/queue.c b/test/validation/api/queue/queue.c
index 1ec05b1f..3c6db33a 100644
--- a/test/validation/api/queue/queue.c
+++ b/test/validation/api/queue/queue.c
@@ -69,6 +69,8 @@ void queue_test_capa(void)
CU_ASSERT(capa.sched_prios != 0);
CU_ASSERT(capa.plain.max_num != 0);
CU_ASSERT(capa.sched.max_num != 0);
+ CU_ASSERT(capa.plain.nonblocking >= ODP_BLOCKING);
+ CU_ASSERT(capa.sched.nonblocking >= ODP_BLOCKING);
min = capa.plain.max_num;
if (min > capa.sched.max_num)
@@ -82,6 +84,7 @@ void queue_test_capa(void)
name[ODP_QUEUE_NAME_LEN - 1] = 0;
odp_queue_param_init(&qparams);
+ CU_ASSERT(qparams.nonblocking == ODP_BLOCKING);
for (j = 0; j < 2; j++) {
if (j == 0) {
commit d533d85ad15ea431a431c407dad468e38ae87ec0
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Tue Nov 21 13:52:00 2017 +0200
linux-gen: queue: fill blocking capa
Currently, only blocking queues are implemented.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
index 3f355e69..58103930 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -150,7 +150,9 @@ static int queue_capability(odp_queue_capability_t *capa)
capa->max_sched_groups = sched_fn->num_grps();
capa->sched_prios = odp_schedule_num_prio();
capa->plain.max_num = capa->max_queues;
+ capa->plain.nonblocking = ODP_BLOCKING;
capa->sched.max_num = capa->max_queues;
+ capa->sched.nonblocking = ODP_BLOCKING;
return 0;
}
@@ -601,6 +603,7 @@ static void queue_param_init(odp_queue_param_t *params)
params->type = ODP_QUEUE_TYPE_PLAIN;
params->enq_mode = ODP_QUEUE_OP_MT;
params->deq_mode = ODP_QUEUE_OP_MT;
+ params->nonblocking = ODP_BLOCKING;
params->sched.prio = ODP_SCHED_PRIO_DEFAULT;
params->sched.sync = ODP_SCHED_SYNC_PARALLEL;
params->sched.group = ODP_SCHED_GROUP_ALL;
diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c
index 07201ce7..88a5a8c2 100644
--- a/platform/linux-generic/odp_queue_scalable.c
+++ b/platform/linux-generic/odp_queue_scalable.c
@@ -315,8 +315,10 @@ static int queue_capability(odp_queue_capability_t *capa)
capa->sched_prios = odp_schedule_num_prio();
capa->plain.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES;
capa->plain.max_size = 0;
+ capa->plain.nonblocking = ODP_BLOCKING;
capa->sched.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES;
capa->sched.max_size = 0;
+ capa->sched.nonblocking = ODP_BLOCKING;
return 0;
}
@@ -861,6 +863,7 @@ static void queue_param_init(odp_queue_param_t *params)
params->type = ODP_QUEUE_TYPE_PLAIN;
params->enq_mode = ODP_QUEUE_OP_MT;
params->deq_mode = ODP_QUEUE_OP_MT;
+ params->nonblocking = ODP_BLOCKING;
params->sched.prio = ODP_SCHED_PRIO_DEFAULT;
params->sched.sync = ODP_SCHED_SYNC_PARALLEL;
params->sched.group = ODP_SCHED_GROUP_ALL;
commit fa7ce5da4b669e55b8d34c7d90b67070879ba5da
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Tue Nov 21 13:41:14 2017 +0200
api: queue: non-blocking level parameter
Add queue parameter and capability to indicate queue operation
blocking level. This guarantee of non-blocking is important for
real-time applications. HW based implementations may be always
non-blocking. Where as, SW based implementation need to trade-off
between block freedom and performance.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h
index 014d3362..79a26df3 100644
--- a/include/odp/api/spec/queue.h
+++ b/include/odp/api/spec/queue.h
@@ -96,6 +96,54 @@ typedef enum odp_queue_op_mode_t {
} odp_queue_op_mode_t;
+/**
+ * Non-blocking level
+ *
+ * A non-blocking level defines implementation guarantees for application
+ * progress when multiple threads operate on the same resource (e.g. a queue)
+ * simultaneously. The first level (ODP_BLOCKING) does not have any block
+ * freedom guarantees, but a suspending thread may block the other threads for
+ * the entire time it remains suspended (infinitely if crashed).
+ * On the contrary, actual non-blocking levels provide guarantees of progress:
+ *
+ * ODP_NONBLOCKING_LF: A non-blocking and lock-free implementation guarantees
+ * that at least one of the threads successfully completes
+ * its operations, regardless of what other threads do.
+ * Application progress is guaranteed, but individual
+ * threads may starve while trying to execute their
+ * operations on the shared resource.
+ *
+ * ODP_NONBLOCKING_WF: A non-blocking and wait-free implementation guarantees
+ * application progress with starvation freedom. All
+ * threads are guaranteed to complete their operations in
+ * a bounded number of steps, regardless of what other
+ * threads do.
+ *
+ * Non-blocking levels are listed from the weakest to the strongest guarantee of
+ * block freedom. Performance of a non-blocking implementation may be lower than
+ * the blocking one. Non-blocking guarantees are important e.g. for real-time
+ * applications when real-time and non real-time threads share a resource.
+ */
+typedef enum odp_nonblocking_t {
+ /** Blocking implementation. A suspeding thread may block all other
+ * threads, i.e. no block freedom guarantees. This is the lowest level.
+ */
+ ODP_BLOCKING = 0,
+
+ /** Non-blocking and lock-free implementation. Other threads can make
+ * progress while a thread is suspended. Starvation freedom is not
+ * guaranteed.
+ */
+ ODP_NONBLOCKING_LF,
+
+ /** Non-blocking and wait-free implementation. Other threads can make
+ * progress while a thread is suspended. Starvation freedom is
+ * guaranteed.
+ */
+ ODP_NONBLOCKING_WF
+
+} odp_nonblocking_t;
+
/**
* Queue capabilities
*/
@@ -125,6 +173,10 @@ typedef struct odp_queue_capability_t {
* store all available events. */
uint32_t max_size;
+ /** The strongest guarantee of block freedom that is supported
+ * for plain queues. */
+ odp_nonblocking_t nonblocking;
+
} plain;
/** Scheduled queue capabilities */
@@ -138,6 +190,10 @@ typedef struct odp_queue_capability_t {
* store all available events. */
uint32_t max_size;
+ /** The strongest guarantee of block freedom that is supported
+ * for scheduled queues. */
+ odp_nonblocking_t nonblocking;
+
} sched;
} odp_queue_capability_t;
@@ -178,6 +234,13 @@ typedef struct odp_queue_param_t {
* ODP_QUEUE_TYPE_SCHED. */
odp_schedule_param_t sched;
+ /** Non-blocking level
+ *
+ * Queue implementation must guarantee at least this level of block
+ * freedom for queue enqueue and dequeue/schedule operations.
+ * The default value is ODP_BLOCKING. */
+ odp_nonblocking_t nonblocking;
+
/** Queue context pointer
*
* User defined context pointer associated with the queue. The same
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/queue.h | 63 +++++++++++++++++++++++++++++
platform/linux-generic/odp_queue.c | 3 ++
platform/linux-generic/odp_queue_scalable.c | 3 ++
test/validation/api/queue/queue.c | 3 ++
4 files changed, 72 insertions(+)
hooks/post-receive
--