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 29c9a342c4cbc4cc92686e6f324fe258afae6b9a (commit) via 8e3790b1a8f8b681e1af8f42dc3e403d3036a687 (commit) from 521c2ffc2116a1d2b15160e4546ff600b210c02d (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 29c9a342c4cbc4cc92686e6f324fe258afae6b9a Author: Matias Elo matias.elo@nokia.com Date: Tue Jan 14 14:44:27 2020 +0200
validation: shmem: fix printf format types for pointers
Use correct printf format types to avoid potential problems on 32-bit systems.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reported-and-tested-by: Peter Lauro lauro_konik@hotmail.com
diff --git a/test/validation/api/shmem/shmem.c b/test/validation/api/shmem/shmem.c index c5a161319..50b12e736 100644 --- a/test/validation/api/shmem/shmem.c +++ b/test/validation/api/shmem/shmem.c @@ -366,8 +366,8 @@ static int run_test_reserve_after_fork(void *arg ODP_UNUSED) }
/* print block address */ - printf("In thread: Block index: %d mapped at %lx\n", - thr_index, (long int)odp_shm_addr(shm)); + printf("In thread: Block index: %d mapped at %p\n", + thr_index, odp_shm_addr(shm));
odp_barrier_wait(&glob_data->test_barrier1); odp_barrier_wait(&glob_data->test_barrier2); @@ -388,7 +388,6 @@ static void shmem_test_reserve_after_fork(void) odp_cpumask_t unused; int thr_index; int i; - void *address; shared_test_data_small_t *pattern_small; shared_test_data_medium_t *pattern_medium; shared_test_data_big_t *pattern_big; @@ -447,11 +446,9 @@ static void shmem_test_reserve_after_fork(void) /* * print the mapping address of the blocks */ - for (thr_index = 0; thr_index < thrdarg.numthrds; thr_index++) { - address = odp_shm_addr(glob_data->shm[thr_index]); - printf("In main Block index: %d mapped at %lx\n", - thr_index, (long int)address); - } + for (thr_index = 0; thr_index < thrdarg.numthrds; thr_index++) + printf("In main Block index: %d mapped at %p\n", + thr_index, odp_shm_addr(glob_data->shm[thr_index]));
/* unblock the threads and let them terminate (no free is done): */ odp_barrier_wait(&glob_data->test_barrier2); @@ -541,8 +538,8 @@ static int run_test_singleva_after_fork(void *arg ODP_UNUSED) }
/* print block address */ - printf("In thread: Block index: %d mapped at %lx\n", - thr_index, (long int)odp_shm_addr(shm)); + printf("In thread: Block index: %d mapped at %p\n", + thr_index, odp_shm_addr(shm));
odp_barrier_wait(&glob_data->test_barrier1); odp_barrier_wait(&glob_data->test_barrier2);
commit 8e3790b1a8f8b681e1af8f42dc3e403d3036a687 Author: Matias Elo matias.elo@nokia.com Date: Tue Jan 14 14:42:22 2020 +0200
linux-gen: fix print failures on 32-bit systems
Use correct printf format types to fix failures on 32-bit systems.
Fixes: https://github.com/OpenDataPlane/odp/issues/915
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reported-and-tested-by: Peter Lauro lauro_konik@hotmail.com
diff --git a/platform/linux-generic/odp_comp.c b/platform/linux-generic/odp_comp.c index 0e9ce5a89..8e1de69c2 100644 --- a/platform/linux-generic/odp_comp.c +++ b/platform/linux-generic/odp_comp.c @@ -154,7 +154,7 @@ static void process_input(odp_packet_t pkt_out, streamp->next_out = out_data; streamp->avail_out = out_len;
- ODP_DBG("next_in 0x%x, avail_in %d next_out 0x%lx" + ODP_DBG("next_in %p, avail_in %d next_out %p" " avail_out %d, sync %d\n", streamp->next_in, streamp->avail_in, streamp->next_out, diff --git a/platform/linux-generic/odp_ishm.c b/platform/linux-generic/odp_ishm.c index 41f3979bf..8e34feecd 100644 --- a/platform/linux-generic/odp_ishm.c +++ b/platform/linux-generic/odp_ishm.c @@ -2037,7 +2037,9 @@ int _odp_ishm_status(const char *title) entry_fd = ishm_proctable->entry[proc_index].fd; }
- ODP_PRINT("%2i %-*s %s%c 0x%-08lx-0x%08lx %-08ld %-08ld %-3lu %-3lu %-3d %s\n", + ODP_PRINT("%2i %-*s %s%c %p-%p %-08" PRIu64 " " + "%-08" PRIu64 " %-3" PRIu64 " %-3" PRIu64 " " + "%-3d %s\n", i, max_name_len, ishm_tbl->block[i].name, flags, huge, start_addr, end_addr, ishm_tbl->block[i].user_len, @@ -2049,10 +2051,10 @@ int _odp_ishm_status(const char *title) ishm_tbl->block[i].filename : "(none)"); } - ODP_PRINT("TOTAL: %58s%-08ld %2s%-08ld\n", + ODP_PRINT("TOTAL: %58s%-08" PRIu64 " %2s%-08" PRIu64 "\n", "", len_total, "", lost_total); - ODP_PRINT("%65s(%dMB) %4s(%dMB)\n", + ODP_PRINT("%65s(%" PRIu64 "MB) %4s(%" PRIu64 "MB)\n", "", len_total / 1024 / 1024, "", lost_total / 1024 / 1024);
@@ -2141,9 +2143,9 @@ void _odp_ishm_print(int block_index) ODP_PRINT(" expt: %s\n", block->exptname); ODP_PRINT(" user_flags: 0x%x\n", block->user_flags); ODP_PRINT(" flags: 0x%x\n", block->flags); - ODP_PRINT(" user_len: %lu\n", block->user_len); + ODP_PRINT(" user_len: %" PRIu64 "\n", block->user_len); ODP_PRINT(" start: %p\n", block->start); - ODP_PRINT(" len: %lu\n", block->len); + ODP_PRINT(" len: %" PRIu64 "\n", block->len);
switch (block->huge) { case HUGE: @@ -2163,8 +2165,8 @@ void _odp_ishm_print(int block_index) }
ODP_PRINT(" page type: %s\n", str); - ODP_PRINT(" seq: %lu\n", block->seq); - ODP_PRINT(" refcnt: %lu\n", block->refcnt); + ODP_PRINT(" seq: %" PRIu64 "\n", block->seq); + ODP_PRINT(" refcnt: %" PRIu64 "\n", block->refcnt); ODP_PRINT("\n");
odp_spinlock_unlock(&ishm_tbl->lock); diff --git a/platform/linux-generic/odp_name_table.c b/platform/linux-generic/odp_name_table.c index b4825fa18..3697bc877 100644 --- a/platform/linux-generic/odp_name_table.c +++ b/platform/linux-generic/odp_name_table.c @@ -10,6 +10,7 @@ #include <string.h> #include <malloc.h> #include <stdlib.h> +#include <inttypes.h> #include <odp_name_table_internal.h> #include <odp_debug_internal.h> #include <odp_macros_internal.h> @@ -1125,8 +1126,8 @@ void _odp_int_name_tbl_stats_print(void) uint32_t avg;
ODP_DBG("\nname table stats:\n"); - ODP_DBG(" num_names=%u num_adds=%lu " - "num_deletes=%lu num_name_tbls=%u\n", + ODP_DBG(" num_names=%" PRIu32 " num_adds=%" PRIu64 " " + "num_deletes=%" PRIu64 " num_name_tbls=%" PRIu8 "\n", name_tbls.current_num_names, name_tbls.num_adds, name_tbls.num_deletes, name_tbls.num_name_tbls); for (idx = 0; idx < NUM_NAME_TBLS; idx++) { diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c index 7575eb052..d63a77b74 100644 --- a/platform/linux-generic/pktio/ipc.c +++ b/platform/linux-generic/pktio/ipc.c @@ -819,9 +819,9 @@ static int ipc_pktio_send_lockless(pktio_entry_t *pktio_entry, (uint8_t *)odp_shm_addr(pool->shm);
/* compile all function code even if ipc disabled with config */ - IPC_ODP_DBG("%d/%d send packet %llx, pool %llx," - "phdr = %p, offset %x, sendoff %x, addr %llx iaddr %llx\n", - i, num, + IPC_ODP_DBG("%d/%d send packet %" PRIu64 ", pool %" PRIu64 "," + "phdr = %p, offset %x, sendoff %x, addr %p iaddr " + "%p\n", i, num, odp_packet_to_u64(pkt), odp_pool_to_u64(pool_hdl), pkt_hdr, (uint8_t *)pkt_hdr->seg_data - (uint8_t *)odp_shm_addr(pool->shm), offsets[i],
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/odp_comp.c | 2 +- platform/linux-generic/odp_ishm.c | 16 +++++++++------- platform/linux-generic/odp_name_table.c | 5 +++-- platform/linux-generic/pktio/ipc.c | 6 +++--- test/validation/api/shmem/shmem.c | 17 +++++++---------- 5 files changed, 23 insertions(+), 23 deletions(-)
hooks/post-receive