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, next has been updated
via eebc3caa3e1cbb8b3ae75d6aba2912fa399c4c18 (commit)
via f4657562b7c2b23e64aaba234820cbe50c2422ec (commit)
via e0dbfd90a11078bc6b5eb03ce3e48b7b22161470 (commit)
via 58d6f8fe7a2652c20db2b5cd632a7f5d6a560546 (commit)
via 89538dedcb71c8f54987758229f0d5b6f1de3ada (commit)
via 79b1cc361a7e1eb1098d006e0b70c903460d32c7 (commit)
from 4c1190787a1d48147cbfe7e20c8b31b0b05c94f3 (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 eebc3caa3e1cbb8b3ae75d6aba2912fa399c4c18
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Thu Sep 14 15:02:51 2017 +0300
api: timer: refine timer pool param documentation
Specify explicitly what each timer pool parameter means. This does
not change the intended use of the parameters.
Signed-off-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/timer.h b/include/odp/api/spec/timer.h
index 75f9db98..d846618f 100644
--- a/include/odp/api/spec/timer.h
+++ b/include/odp/api/spec/timer.h
@@ -99,12 +99,36 @@ typedef enum {
* Timer pool parameters are used when creating and querying timer pools.
*/
typedef struct {
- uint64_t res_ns; /**< Timeout resolution in nanoseconds */
- uint64_t min_tmo; /**< Minimum relative timeout in nanoseconds */
- uint64_t max_tmo; /**< Maximum relative timeout in nanoseconds */
- uint32_t num_timers; /**< (Minimum) number of supported timers */
- int priv; /**< Shared (false) or private (true) timer pool */
- odp_timer_clk_src_t clk_src; /**< Clock source for timers */
+ /** Timeout resolution in nanoseconds. Timer pool must serve timeouts
+ * with this or higher resolution. The minimum valid value (highest
+ * resolution) is defined by timer capability 'highest_res_ns'. */
+ uint64_t res_ns;
+
+ /** Minimum relative timeout in nanoseconds. All requested timeouts
+ * will be at least this many nanoseconds after the current
+ * time of the timer pool. Timer set functions return an error, if too
+ * short timeout was requested. The value may be also less than
+ * 'res_ns'. */
+ uint64_t min_tmo;
+
+ /** Maximum relative timeout in nanoseconds. All requested timeouts
+ * will be at most this many nanoseconds after the current
+ * time of the timer pool. Timer set functions return an error, if too
+ * long timeout was requested. */
+ uint64_t max_tmo;
+
+ /** Number of timers needed. Application will create in maximum this
+ * many concurrent timers from the timer pool. */
+ uint32_t num_timers;
+
+ /** Thread private timer pool. When zero, multiple thread may use the
+ * timer pool concurrently. When non-zero, only single thread uses the
+ * timer pool (concurrently). */
+ int priv;
+
+ /** Clock source for timers */
+ odp_timer_clk_src_t clk_src;
+
} odp_timer_pool_param_t;
/**
commit f4657562b7c2b23e64aaba234820cbe50c2422ec
Author: Mykyta Iziumtsev <mykyta.iziumtsev(a)linaro.org>
Date: Wed Oct 4 12:02:55 2017 +0200
api: fixing typos
Signed-off-by: Mykyta Iziumtsev <mykyta.iziumtsev(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/packet.h b/include/odp/api/spec/packet.h
index c7775d02..7f5eec10 100644
--- a/include/odp/api/spec/packet.h
+++ b/include/odp/api/spec/packet.h
@@ -904,7 +904,7 @@ odp_packet_t odp_packet_ref_static(odp_packet_t pkt);
* dynamic references must not be mixed. Results are undefined if these
* restrictions are not observed.
*
- * The packet handle 'pkt' may itself by a (dynamic) reference to a packet.
+ * The packet handle 'pkt' may itself be a (dynamic) reference to a packet.
*
* If the caller does not intend to modify either the packet or the new
* reference to it, odp_packet_ref_static() may be used to create
@@ -931,7 +931,7 @@ odp_packet_t odp_packet_ref(odp_packet_t pkt, uint32_t offset);
* packet consists metadata and data of the 'hdr' packet, followed by the
* shared part of packet 'pkt'.
*
- * The packet handle ('pkt') may itself by a (dynamic) reference to a packet,
+ * The packet handle ('pkt') may itself be a (dynamic) reference to a packet,
* but the header packet handle ('hdr') must be unique. Both packets must be
* have been allocated from the same pool and the handles must not refer to
* the same packet. Results are undefined if these restrictions are not
diff --git a/include/odp/api/spec/traffic_mngr.h b/include/odp/api/spec/traffic_mngr.h
index 3a748cef..c9134e8e 100644
--- a/include/odp/api/spec/traffic_mngr.h
+++ b/include/odp/api/spec/traffic_mngr.h
@@ -75,7 +75,7 @@ extern "C" {
/**
* @def ODP_TM_MAX_TM_QUEUES
- * The largest number of tm_queues that can handled by any one TM system.
+ * The largest number of tm_queues that can be handled by any one TM system.
*/
/**
@@ -97,7 +97,7 @@ extern "C" {
/**
* @def ODP_TM_MIN_SHAPER_BW
- * The largest amount of bandwidth that any shaper's peak or commit rate can
+ * The lowest amount of bandwidth that any shaper's peak or commit rate can
* be set to. It is in units of 1000 bytes/second.
*/
@@ -143,7 +143,7 @@ extern "C" {
/**
* @typedef odp_tm_node_t
- * Each odp_tm_queue_t value is an opaque ODP handle representing a specific
+ * Each odp_tm_node_t value is an opaque ODP handle representing a specific
* tm node within a specific TM system.
*/
commit e0dbfd90a11078bc6b5eb03ce3e48b7b22161470
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Wed Oct 25 13:35:32 2017 +0300
validation: packet: add packet_print_data test
Test the new packet payload print function with couple of
lengths and offsets. Added line feeds to separate packet print
output from CUnit prints.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c
index bf8f5f44..5e5626a3 100644
--- a/test/validation/api/packet/packet.c
+++ b/test/validation/api/packet/packet.c
@@ -535,7 +535,10 @@ void packet_test_prefetch(void)
void packet_test_debug(void)
{
CU_ASSERT(odp_packet_is_valid(test_packet) == 1);
+ printf("\n\n");
odp_packet_print(test_packet);
+ odp_packet_print_data(test_packet, 0, 100);
+ odp_packet_print_data(test_packet, 14, 20);
}
void packet_test_context(void)
@@ -2179,7 +2182,10 @@ void packet_test_ref(void)
packet_compare_data(pkt3, ref2);
/* Try print function on a reference */
+ printf("\n\n");
odp_packet_print(ref2);
+ odp_packet_print_data(ref2, 0, 100);
+ odp_packet_print_data(ref2, 14, 20);
odp_packet_free(ref);
odp_packet_free(ref2);
commit 58d6f8fe7a2652c20db2b5cd632a7f5d6a560546
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Wed Oct 25 13:29:55 2017 +0300
linux-gen: packet: implement odp_packet_data_print
Implemented the new packet payload print function using
ODP_PRINT macro. Removed an extra space from the print
macro as well as extra null char and line feed from
odp_packet_print.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/include/odp_debug_internal.h b/platform/linux-generic/include/odp_debug_internal.h
index 02ae87a9..4c44bebe 100644
--- a/platform/linux-generic/include/odp_debug_internal.h
+++ b/platform/linux-generic/include/odp_debug_internal.h
@@ -81,7 +81,7 @@ extern "C" {
* specifically for dumping internal data.
*/
#define ODP_PRINT(fmt, ...) \
- odp_global_data.log_fn(ODP_LOG_PRINT, " " fmt, ##__VA_ARGS__)
+ odp_global_data.log_fn(ODP_LOG_PRINT, fmt, ##__VA_ARGS__)
#ifdef __cplusplus
}
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index 89bae362..87282639 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -1751,9 +1751,68 @@ void odp_packet_print(odp_packet_t pkt)
seg = odp_packet_next_seg(pkt, seg);
}
- str[len] = '\0';
+ ODP_PRINT("%s\n", str);
+}
+
+void odp_packet_print_data(odp_packet_t pkt, uint32_t offset,
+ uint32_t byte_len)
+{
+ odp_packet_hdr_t *hdr = packet_hdr(pkt);
+ uint32_t bytes_per_row = 16;
+ int num_rows = (byte_len + bytes_per_row - 1) / bytes_per_row;
+ int max_len = 256 + (3 * byte_len) + (3 * num_rows);
+ char str[max_len];
+ int len = 0;
+ int n = max_len - 1;
+ uint32_t data_len = odp_packet_len(pkt);
+ pool_t *pool = hdr->buf_hdr.pool_ptr;
+
+ len += snprintf(&str[len], n - len, "Packet\n------\n");
+ len += snprintf(&str[len], n - len,
+ " pool index %" PRIu32 "\n", pool->pool_idx);
+ len += snprintf(&str[len], n - len,
+ " buf index %" PRIu32 "\n", hdr->buf_hdr.index);
+ len += snprintf(&str[len], n - len,
+ " segcount %" PRIu16 "\n", hdr->buf_hdr.segcount);
+ len += snprintf(&str[len], n - len,
+ " data len %" PRIu32 "\n", data_len);
+ len += snprintf(&str[len], n - len,
+ " data ptr %p\n", odp_packet_data(pkt));
+ len += snprintf(&str[len], n - len,
+ " print offset %" PRIu32 "\n", offset);
+ len += snprintf(&str[len], n - len,
+ " print length %" PRIu32 "\n", byte_len);
+
+ if (offset + byte_len > data_len) {
+ len += snprintf(&str[len], n - len, " BAD OFFSET OR LEN\n");
+ ODP_PRINT("%s\n", str);
+ return;
+ }
+
+ while (byte_len) {
+ uint32_t copy_len;
+ uint8_t data[bytes_per_row];
+ uint32_t i;
+
+ if (byte_len > bytes_per_row)
+ copy_len = bytes_per_row;
+ else
+ copy_len = byte_len;
+
+ odp_packet_copy_to_mem(pkt, offset, copy_len, data);
+
+ len += snprintf(&str[len], n - len, " ");
+
+ for (i = 0; i < copy_len; i++)
+ len += snprintf(&str[len], n - len, " %02x", data[i]);
+
+ len += snprintf(&str[len], n - len, "\n");
+
+ byte_len -= copy_len;
+ offset += copy_len;
+ }
- ODP_PRINT("\n%s\n", str);
+ ODP_PRINT("%s\n", str);
}
int odp_packet_is_valid(odp_packet_t pkt)
commit 89538dedcb71c8f54987758229f0d5b6f1de3ada
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Tue Oct 24 14:32:01 2017 +0300
api: packet: print packet data
Added debug print function which includes packet payload bytes.
Printing starts from offset, so it's easy to e.g. limit print
to IPv4 header bytes only:
odp_packet_print_data(pkt, l3_offset(pkt), 20)
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas(a)linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h
index 79d8773e..c7775d02 100644
--- a/include/odp/api/spec/packet.h
+++ b/include/odp/api/spec/packet.h
@@ -1502,14 +1502,27 @@ void odp_packet_shaper_len_adjust_set(odp_packet_t pkt, int8_t adj);
*/
/**
- * Print packet to the console
+ * Print packet debug information
*
- * Print all packet debug information to the console.
+ * Print all packet debug information to the ODP log.
*
* @param pkt Packet handle
*/
void odp_packet_print(odp_packet_t pkt);
+/**
+ * Print packet data
+ *
+ * Print packet debug information with packet data to the ODP log. Operation
+ * prints 'len' bytes of packet data starting from 'offset' byte. Offset plus
+ * length must not exceed packet length (odp_packet_len()).
+ *
+ * @param pkt Packet handle
+ * @param offset Byte offset into the packet
+ * @param len Number of bytes to print
+ */
+void odp_packet_print_data(odp_packet_t pkt, uint32_t offset, uint32_t len);
+
/**
* Perform full packet validity check
*
commit 79b1cc361a7e1eb1098d006e0b70c903460d32c7
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Thu Oct 26 19:24:21 2017 +0300
shippable: add libconfig and libnuma
add libconfig and libnuma for docker image for api-next.
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
diff --git a/scripts/Dockerfile b/scripts/Dockerfile
index 995330fa..b15282aa 100644
--- a/scripts/Dockerfile
+++ b/scripts/Dockerfile
@@ -12,12 +12,14 @@ RUN sudo apt-get update && sudo apt-get install -yy \
gcc-4.8 \
graphviz \
kmod \
- mscgen \
+ libconfig-dev \
libcunit1-dev \
+ libnuma-dev \
libpcap-dev \
libssl-dev \
libtool \
linux-headers-`uname -r` \
+ mscgen \
ruby-dev
RUN sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/packet.h | 21 ++++++--
include/odp/api/spec/timer.h | 36 ++++++++++---
include/odp/api/spec/traffic_mngr.h | 6 +--
.../linux-generic/include/odp_debug_internal.h | 2 +-
platform/linux-generic/odp_packet.c | 63 +++++++++++++++++++++-
scripts/Dockerfile | 4 +-
test/validation/api/packet/packet.c | 6 +++
7 files changed, 121 insertions(+), 17 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, next has been updated
via 4c1190787a1d48147cbfe7e20c8b31b0b05c94f3 (commit)
from 40cd2eb0ddb11d4880bf0cd19a2b661a9b42d398 (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 4c1190787a1d48147cbfe7e20c8b31b0b05c94f3
Author: Balasubramanian Manoharan <bala.manoharan(a)linaro.org>
Date: Wed Aug 2 08:40:38 2017 -0700
api: packetio: deprecate redundant loop_supported field in capability
removes redundant loop_supported boolean in odp_pktio_capability_t
Fixes https://bugs.linaro.org/show_bug.cgi?id=2861
Signed-off-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/packet_io.h b/include/odp/api/spec/packet_io.h
index cec1f22a..76c63e72 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -19,6 +19,7 @@
extern "C" {
#endif
+#include <odp/api/deprecated.h>
#include <odp/api/packet_io_stats.h>
#include <odp/api/queue.h>
#include <odp/api/time.h>
@@ -445,11 +446,8 @@ typedef struct odp_pktio_capability_t {
* set to zero. */
odp_pktio_set_op_t set_op;
- /** Support of Loopback mode
- *
- * A boolean to denote whether loop back mode is supported on this
- * specific interface. */
- odp_bool_t loop_supported;
+ /** @deprecated Use enable_loop inside odp_pktin_config_t */
+ odp_bool_t ODP_DEPRECATE(loop_supported);
} odp_pktio_capability_t;
/**
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index 0473483d..5880a2a1 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -418,7 +418,7 @@ int odp_pktio_config(odp_pktio_t hdl, const odp_pktio_config_t *config)
return -1;
}
- if (config->enable_loop && !capa.loop_supported) {
+ if (config->enable_loop && !capa.config.enable_loop) {
ODP_ERR("Loopback mode not supported\n");
return -1;
}
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/packet_io.h | 8 +++-----
platform/linux-generic/odp_packet_io.c | 2 +-
2 files changed, 4 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, next has been updated
via 40cd2eb0ddb11d4880bf0cd19a2b661a9b42d398 (commit)
via 2d76e64f9ca79b3efce87bd02d849d139a9f305a (commit)
via 86b8f3d4371b3fd0ec09091b404b829f2e97730d (commit)
via 0841edfc364b39fce8c1ed1cdbddecde1d98b42e (commit)
via c7801718747a7bcaf377fd25cdd97582f8755b05 (commit)
via fa9533ede03e40f0455c6d889997042f32235fc1 (commit)
from 07a5a017f0178e9067aab7aeb9a9fc4152152f5c (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 40cd2eb0ddb11d4880bf0cd19a2b661a9b42d398
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Wed Jul 5 17:23:19 2017 +0300
validation: system_info: add test for odp_sys_huge_page_size_all()
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/validation/api/system/system.c b/test/validation/api/system/system.c
index 6873fcc4..a2749003 100644
--- a/test/validation/api/system/system.c
+++ b/test/validation/api/system/system.c
@@ -15,6 +15,7 @@
#define DIFF_TRY_NUM 160
#define RES_TRY_NUM 10
+#define PAGESZ_NUM 10
void system_test_odp_version_numbers(void)
{
@@ -216,6 +217,25 @@ void system_test_odp_sys_huge_page_size(void)
CU_ASSERT(0 < page);
}
+void system_test_odp_sys_huge_page_size_all(void)
+{
+ uint64_t pagesz_tbs[PAGESZ_NUM];
+ uint64_t prev_pagesz = 0;
+ int num;
+ int i;
+
+ num = odp_sys_huge_page_size_all(NULL, 0);
+ CU_ASSERT(num >= 0);
+
+ num = odp_sys_huge_page_size_all(pagesz_tbs, PAGESZ_NUM);
+ CU_ASSERT(num >= 0);
+ for (i = 0; i < num && i < PAGESZ_NUM; i++) {
+ CU_ASSERT(pagesz_tbs[i] > 0);
+ CU_ASSERT(pagesz_tbs[i] > prev_pagesz);
+ prev_pagesz = pagesz_tbs[i];
+ }
+}
+
int system_check_odp_cpu_hz(void)
{
if (odp_cpu_hz() == 0) {
@@ -318,6 +338,7 @@ odp_testinfo_t system_suite[] = {
ODP_TEST_INFO(system_test_odp_cpu_model_str_id),
ODP_TEST_INFO(system_test_odp_sys_page_size),
ODP_TEST_INFO(system_test_odp_sys_huge_page_size),
+ ODP_TEST_INFO(system_test_odp_sys_huge_page_size_all),
ODP_TEST_INFO_CONDITIONAL(system_test_odp_cpu_hz,
system_check_odp_cpu_hz),
ODP_TEST_INFO_CONDITIONAL(system_test_odp_cpu_hz_id,
diff --git a/test/validation/api/system/system.h b/test/validation/api/system/system.h
index c33729b9..0ea72dcd 100644
--- a/test/validation/api/system/system.h
+++ b/test/validation/api/system/system.h
@@ -20,6 +20,7 @@ void system_test_odp_cpu_model_str(void);
void system_test_odp_cpu_model_str_id(void);
void system_test_odp_sys_page_size(void);
void system_test_odp_sys_huge_page_size(void);
+void system_test_odp_sys_huge_page_size_all(void);
int system_check_odp_cpu_hz(void);
void system_test_odp_cpu_hz(void);
int system_check_odp_cpu_hz_id(void);
commit 2d76e64f9ca79b3efce87bd02d849d139a9f305a
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Wed Jul 5 17:23:18 2017 +0300
linux-gen: system_info: implement odp_sys_huge_page_size_all()
Directory /sys/kernel/mm/hugepages contains subdirectories for all huge
page sizes supported by the running kernel. Loop through the contents of
this directory to find the supported huge page sizes.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-and-tested-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_system_info.c b/platform/linux-generic/odp_system_info.c
index 1303d793..3cbe1d3d 100644
--- a/platform/linux-generic/odp_system_info.c
+++ b/platform/linux-generic/odp_system_info.c
@@ -423,6 +423,42 @@ uint64_t odp_sys_huge_page_size(void)
return odp_global_data.hugepage_info.default_huge_page_size;
}
+static int pagesz_compare(const void *pagesz1, const void *pagesz2)
+{
+ return (*(const uint64_t *)pagesz1 - *(const uint64_t *)pagesz2);
+}
+
+int odp_sys_huge_page_size_all(uint64_t size[], int num)
+{
+ DIR *dir;
+ struct dirent *entry;
+ int pagesz_num = 0;
+ int saved = 0;
+
+ /* See: kernel.org: hugetlbpage.txt */
+ dir = opendir("/sys/kernel/mm/hugepages");
+ if (!dir) {
+ ODP_ERR("Failed to open huge page directory\n");
+ return -1;
+ }
+
+ while ((entry = readdir(dir)) != NULL) {
+ unsigned long sz;
+
+ if (sscanf(entry->d_name, "hugepages-%8lukB", &sz) == 1) {
+ if (size != NULL && saved < num)
+ size[saved++] = sz * 1024;
+ pagesz_num++;
+ }
+ }
+ closedir(dir);
+
+ if (size != NULL && saved > 1)
+ qsort(size, saved, sizeof(uint64_t), pagesz_compare);
+
+ return pagesz_num;
+}
+
uint64_t odp_sys_page_size(void)
{
return odp_global_data.system_info.page_size;
commit 86b8f3d4371b3fd0ec09091b404b829f2e97730d
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Wed Jul 5 17:23:17 2017 +0300
api: system_info: add function for fetching all supported huge page sizes
A system may simultaneously support multiple huge page sizes. Add a new API
function odp_sys_huge_page_size_all() which returns all supported page
sizes. odp_sys_huge_page_size() stays unmodified to maintain backward
compatibility.
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Reviewed-and-tested-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/system_info.h b/include/odp/api/spec/system_info.h
index ca4dcdc7..140db7b4 100644
--- a/include/odp/api/spec/system_info.h
+++ b/include/odp/api/spec/system_info.h
@@ -27,9 +27,28 @@ extern "C" {
* Default system huge page size in bytes
*
* @return Default huge page size in bytes
+ * @retval 0 on no huge pages
*/
uint64_t odp_sys_huge_page_size(void);
+/**
+ * System huge page sizes in bytes
+ *
+ * Returns the number of huge page sizes supported by the system. Outputs up to
+ * 'num' sizes when the 'size' array pointer is not NULL. If return value is
+ * larger than 'num', there are more supported sizes than the function was
+ * allowed to output. If return value (N) is less than 'num', only sizes
+ * [0 ... N-1] have been written. Returned values are ordered from smallest to
+ * largest.
+ *
+ * @param[out] size Points to an array of huge page sizes for output
+ * @param num Maximum number of huge page sizes to output
+ *
+ * @return Number of supported huge page sizes
+ * @retval <0 on failure
+ */
+int odp_sys_huge_page_size_all(uint64_t size[], int num);
+
/**
* Page size in bytes
*
commit 0841edfc364b39fce8c1ed1cdbddecde1d98b42e
Author: Brian Brooks <brian.brooks(a)arm.com>
Date: Fri Jun 23 16:04:36 2017 -0500
test: odp_pktio_ordered: add queue size
Signed-off-by: Brian Brooks <brian.brooks(a)arm.com>
Reviewed-and-tested-by: Yi He <yi.he(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/performance/odp_pktio_ordered.c b/test/performance/odp_pktio_ordered.c
index d7e43c4b..ed4e2e8e 100644
--- a/test/performance/odp_pktio_ordered.c
+++ b/test/performance/odp_pktio_ordered.c
@@ -93,6 +93,9 @@
/** Maximum number of pktio queues per interface */
#define MAX_QUEUES 32
+/** Seems to need at least 8192 elements per queue */
+#define QUEUE_SIZE 8192
+
/** Maximum number of pktio interfaces */
#define MAX_PKTIOS 8
@@ -1222,6 +1225,7 @@ int main(int argc, char *argv[])
qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT;
qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC;
qparam.sched.group = ODP_SCHED_GROUP_ALL;
+ qparam.size = QUEUE_SIZE;
gbl_args->flow_qcontext[i][j].idx = i;
gbl_args->flow_qcontext[i][j].input_queue = 0;
commit c7801718747a7bcaf377fd25cdd97582f8755b05
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Tue Jun 13 07:55:15 2017 -0500
doc: userguide: add odp_init_global() documentation for unused features
Update User Guide startup section to include current parameters for
odp_init_global() and odp_init_local() as well as optimization hints for
unused features.
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc
index 0d1e5eb7..0c7d3f77 100644
--- a/doc/users-guide/users-guide.adoc
+++ b/doc/users-guide/users-guide.adoc
@@ -558,20 +558,44 @@ calling the terminate functions should only be done when the application is
sure it has closed the ingress and subsequently drained all queues, etc.
=== Startup
-The first API that must be called by an ODP application is 'odp_init_global()'.
+The first API that must be called by an ODP application is `odp_init_global()`:
+[source,c]
+-----
+int odp_init_global(odp_instance_t *instance,
+ const odp_init_t *param,
+ const odp_platform_init_t *platform_param);
+-----
This takes two pointers. The first, `odp_init_t`, contains ODP initialization
data that is platform independent and portable, while the second,
`odp_platform_init_t`, is passed unparsed to the implementation
to be used for platform specific data that is not yet, or may never be
-suitable for the ODP API.
+suitable for the ODP API. Each of these parameters is optional and may be
+specified as NULL to accept the implementation-defined default initialization
+values.
-Calling odp_init_global() establishes the ODP API framework and MUST be
+Calling `odp_init_global()` establishes the ODP API framework and MUST be
called before any other ODP API may be called. Note that it is only called
-once per application. Following global initialization, each thread in turn
+once per application. A successful call to `odp_init_global()` returns rc = 0
+and sets the `instance` variable supplied as input to the call to an handle
+representing this unique ODP instance.
+
+The `odp_init_t` parameter is used to specify various customizations to the
+ODP environment being established by this call. For example, the caller can
+specify the maximum number of worker threads it will use, the thread masks
+associated with these threads, as well as whether the default logging or
+abort functions are to be overridden with an application-supplied handler.
+
+The application may also provide optimization hints to the ODP implementation
+if it knows that it will never use specific ODP feature sets, such as the
+packet classifier or traffic manager. Implementations may use such hints to
+provide optimized behavior to applications that are known not to need these
+features.
+
+Following global initialization, each thread in turn
calls 'odp_init_local()'. This establishes the local ODP thread
context for that thread and MUST be called before other ODP APIs may be
-called by that thread. The sole argument to this call is the _thread type_,
-which is either `ODP_THREAD_WORKER` or `ODP_THREAD_CONTROL`.
+called by that thread. The sole argument to this call is the `instance`
+variable returned by `odp_init_global()`.
=== Shutdown
Shutdown is the logical reverse of the initialization procedure, with
commit fa9533ede03e40f0455c6d889997042f32235fc1
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Wed Feb 22 17:08:22 2017 +0200
abi: event: add ODP_EVENT_IPSEC_RESULT
Update ABI spec with the new IPSEC event type.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/include/odp/arch/default/api/abi/event.h b/include/odp/arch/default/api/abi/event.h
index fd86f25c..336938f5 100644
--- a/include/odp/arch/default/api/abi/event.h
+++ b/include/odp/arch/default/api/abi/event.h
@@ -28,7 +28,8 @@ 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_CRYPTO_COMPL = 4,
+ ODP_EVENT_IPSEC_RESULT = 5
} odp_event_type_t;
/**
-----------------------------------------------------------------------
Summary of changes:
doc/users-guide/users-guide.adoc | 36 ++++++++++++++++++++++++++------
include/odp/api/spec/system_info.h | 19 +++++++++++++++++
include/odp/arch/default/api/abi/event.h | 3 ++-
platform/linux-generic/odp_system_info.c | 36 ++++++++++++++++++++++++++++++++
test/performance/odp_pktio_ordered.c | 4 ++++
test/validation/api/system/system.c | 21 +++++++++++++++++++
test/validation/api/system/system.h | 1 +
7 files changed, 113 insertions(+), 7 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, next has been updated
via 07a5a017f0178e9067aab7aeb9a9fc4152152f5c (commit)
via 3edee38da55876e36f654a5d1a4b87c2ea5b8bfe (commit)
via 8d22e0e2013596403ae6a35457cdf30b0a0c559b (commit)
from bd1b1adf37dd8d252f7daf761d4ae9a6d1ef156a (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 07a5a017f0178e9067aab7aeb9a9fc4152152f5c
Author: Christophe Milard <christophe.milard(a)linaro.org>
Date: Tue Jan 24 18:48:05 2017 +0100
test: preventing odp.conf loading for tests
The tests should not be affected by any system or user ODP configuration
file. The ODP_SYSCONFIG_FILE environment variables is therefore set
to "none" in TESTS_ENVIRONMENT.
Tests which need specific a configuration file will have to overwrite
this setting.
Note that tests ran manually (not using make check) may be affected
by configuration files. Setting ODP_SYSCONFIG_FILE to an appropriate value
(possibly "none") may be required.
Signed-off-by: Christophe Milard <christophe.milard(a)linaro.org>
Reviewed-and-tested-by: Yi He <yi.he(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/test/Makefile.inc b/test/Makefile.inc
index aa20ba26..f7c0da21 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -22,4 +22,6 @@ AM_LDFLAGS = -L$(LIB) -static
@VALGRIND_CHECK_RULES@
-TESTS_ENVIRONMENT= ODP_PLATFORM=${with_platform} EXEEXT=${EXEEXT}
+TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform} \
+ EXEEXT=${EXEEXT} \
+ ODP_SYSCONFIG_FILE=none
-----------------------------------------------------------------------
Summary of changes:
doc/users-guide/users-guide.adoc | 18 ++++++++++++++++++
platform/linux-generic/odp_packet.c | 35 +++++++++++++++++++++++++++++++++++
test/Makefile.inc | 4 +++-
3 files changed, 56 insertions(+), 1 deletion(-)
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 201a96f9bbcbabd904362ba05a179c72689a578e (commit)
from d61d32590d1772b70b8dcd0d0ec44d29029d7443 (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 201a96f9bbcbabd904362ba05a179c72689a578e
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Thu Oct 26 19:24:21 2017 +0300
shippable: add libconfig and libnuma
add libconfig and libnuma for docker image for api-next.
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
diff --git a/scripts/Dockerfile b/scripts/Dockerfile
index 995330fa..b15282aa 100644
--- a/scripts/Dockerfile
+++ b/scripts/Dockerfile
@@ -12,12 +12,14 @@ RUN sudo apt-get update && sudo apt-get install -yy \
gcc-4.8 \
graphviz \
kmod \
- mscgen \
+ libconfig-dev \
libcunit1-dev \
+ libnuma-dev \
libpcap-dev \
libssl-dev \
libtool \
linux-headers-`uname -r` \
+ mscgen \
ruby-dev
RUN sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
-----------------------------------------------------------------------
Summary of changes:
scripts/Dockerfile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 8d22e0e2013596403ae6a35457cdf30b0a0c559b (commit)
from bd1b1adf37dd8d252f7daf761d4ae9a6d1ef156a (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 8d22e0e2013596403ae6a35457cdf30b0a0c559b
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Tue Oct 24 21:31:19 2017 -0500
doc: userguide: add section on api specification principles
Add section to the User Guide that highlights that unless otherwise
documented, API behavior is undefined if applications pass invalid
parameters to them.
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc
index 18d8cb8f..0d1e5eb7 100644
--- a/doc/users-guide/users-guide.adoc
+++ b/doc/users-guide/users-guide.adoc
@@ -40,11 +40,29 @@ by abstract handles of type `odp_packet_t`, and packet-related APIs take
arguments of this type. What an `odp_packet_t` actually is is not part of the
ODP API specification--that is the responsibility of each ODP implementation.
+.API Specification Principles
+The ODP API specification is designed to permit wide latitude on the part of
+implementations while at the same time supporting highly efficient processing,
+especially for APIs that are executed frequently.
+
+Both applications and implementations must comply with the API
+specification. If not otherwise documented, results are undefined if an
+application acts against the specification. For example, if an application
+passes bad parameters to an ODP API one implementation may report an error,
+while another may not check them (to maximize performance) but would just
+crash while using the bad values.
+
+Note that many ODP component areas provide an `odp_xxx_capability()` API that
+returns platform-specific information regarding valid input to other APIs in
+that component. For best portability applications should always use these
+capability APIs to determine valid parameter input.
+
.Summary: ODP API attributes:
* Open Source, open contribution, BSD-3 licensed.
* Vendor and platform neutral.
* Application-centric. Covers functional needs of data plane applications.
* Ensures portability by specifying the functional behavior of ODP.
+* Both applications and implementations must conform to the API specification.
* Defined jointly and openly by application writers and platform implementers.
* Architected to be implementable on a wide range of platforms efficiently
* Sponsored, governed, and maintained by the Linaro Networking Group (LNG)
-----------------------------------------------------------------------
Summary of changes:
doc/users-guide/users-guide.adoc | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
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 d61d32590d1772b70b8dcd0d0ec44d29029d7443 (commit)
via 66b363634fe1bba003cdb9e4e49a5980fc8c79f4 (commit)
via bd1b1adf37dd8d252f7daf761d4ae9a6d1ef156a (commit)
via 4fafec8378b6e7d0b353d851e724ab27eb002b27 (commit)
from 63d92eb289261d1534b5b9e1e04291faa5e45d30 (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 d61d32590d1772b70b8dcd0d0ec44d29029d7443
Merge: 66b36363 bd1b1adf
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Thu Oct 26 17:06:11 2017 +0300
Merge branch 'master' into api-next
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
commit 66b363634fe1bba003cdb9e4e49a5980fc8c79f4
Author: Sachin Saxena <sachin.saxena(a)nxp.com>
Date: Tue Oct 10 12:14:17 2017 +0530
api: pool: Return address range for pool objects
Pool info support has been extented to provide minimum and maximum
addresses of application accessible data for any pool object (event).
Signed-off-by: Sachin Saxena <sachin.saxena(a)nxp.com>
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/pool.h b/include/odp/api/spec/pool.h
index 221798ee..35f78377 100644
--- a/include/odp/api/spec/pool.h
+++ b/include/odp/api/spec/pool.h
@@ -294,6 +294,22 @@ odp_pool_t odp_pool_lookup(const char *name);
typedef struct odp_pool_info_t {
const char *name; /**< pool name */
odp_pool_param_t params; /**< pool parameters */
+
+ /** Minimum data address.
+ * This is the minimum address that application accessible
+ * data of any object (event) allocated from the pool may
+ * locate. When there's no application accessible data
+ * (e.g. ODP_POOL_TIMEOUT pools), the value may be zero.
+ */
+ uintptr_t min_data_addr;
+
+ /** Maximum data address.
+ * This is the maximum address that application accessible
+ * data of any object (event) allocated from the pool may
+ * locate. When there's no application accessible data
+ * (e.g. ODP_POOL_TIMEOUT pools), the value may be zero.
+ */
+ uintptr_t max_data_addr;
} odp_pool_info_t;
/**
-----------------------------------------------------------------------
Summary of changes:
include/odp/api/spec/pool.h | 16 ++++++++++++++++
platform/linux-generic/pktio/netmap.c | 15 ++++++++++-----
2 files changed, 26 insertions(+), 5 deletions(-)
hooks/post-receive
--