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@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@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@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@linaro.org Date: Wed Oct 4 12:02:55 2017 +0200
api: fixing typos
Signed-off-by: Mykyta Iziumtsev mykyta.iziumtsev@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@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@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@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@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@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@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@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@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@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@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@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@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@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