Again Bill, I complained about this in your last patch set [1] as well! You shall be able to build every patch.
[1] http://lists.linaro.org/pipermail/lng-odp/2014-November/004999.html On 21 November 2014 00:27, Bill Fischofer <[email protected]> wrote: > Signed-off-by: Bill Fischofer <[email protected]> > --- > example/generator/odp_generator.c | 22 +++++---------- > example/ipsec/odp_ipsec.c | 57 > +++++++++++++-------------------------- > example/l2fwd/odp_l2fwd.c | 19 +++++-------- > example/odp_example/odp_example.c | 18 +++++-------- > example/packet/odp_pktio.c | 19 +++++-------- > example/timer/odp_timer_test.c | 13 ++++----- > test/api_test/odp_timer_ping.c | 19 +++++++------ > 7 files changed, 60 insertions(+), 107 deletions(-) > > diff --git a/example/generator/odp_generator.c > b/example/generator/odp_generator.c > index e2e0ba4..50e6c04 100644 > --- a/example/generator/odp_generator.c > +++ b/example/generator/odp_generator.c > @@ -57,8 +57,7 @@ typedef struct { > int number; /**< packets number to be sent */ > int payload; /**< data len */ > int timeout; /**< wait time */ > - int interval; /**< wait interval ms between sending > - each packet */ > + int interval; /**< wait interval ms between sending each > packet */ > } appl_args_t; > > /** > @@ -516,11 +515,11 @@ int main(int argc, char *argv[]) > odph_linux_pthread_t thread_tbl[MAX_WORKERS]; > odp_buffer_pool_t pool; > int num_workers; > - void *pool_base; > int i; > int first_core; > int core_count; > odp_shm_t shm; > + odp_buffer_pool_param_t params; > > /* Init ODP before calling anything else */ > if (odp_init_global(NULL, NULL)) { > @@ -583,20 +582,13 @@ int main(int argc, char *argv[]) > printf("First core: %i\n\n", first_core); > > /* Create packet pool */ > - shm = odp_shm_reserve("shm_packet_pool", > - SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); > - pool_base = odp_shm_addr(shm); > + params.buf_size = SHM_PKT_POOL_BUF_SIZE; > + params.buf_align = 0; > + params.num_bufs = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE; > + params.buf_type = ODP_BUFFER_TYPE_PACKET; > > - if (pool_base == NULL) { > - EXAMPLE_ERR("Error: packet pool mem alloc failed.\n"); > - exit(EXIT_FAILURE); > - } > + pool = odp_buffer_pool_create("packet_pool", ODP_SHM_NULL, ¶ms); > > - pool = odp_buffer_pool_create("packet_pool", pool_base, > - SHM_PKT_POOL_SIZE, > - SHM_PKT_POOL_BUF_SIZE, > - ODP_CACHE_LINE_SIZE, > - ODP_BUFFER_TYPE_PACKET); > if (pool == ODP_BUFFER_POOL_INVALID) { > EXAMPLE_ERR("Error: packet pool create failed.\n"); > exit(EXIT_FAILURE); > diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c > index ec115fc..b5d518c 100644 > --- a/example/ipsec/odp_ipsec.c > +++ b/example/ipsec/odp_ipsec.c > @@ -367,8 +367,7 @@ static > void ipsec_init_pre(void) > { > odp_queue_param_t qparam; > - void *pool_base; > - odp_shm_t shm; > + odp_buffer_pool_param_t params; > > /* > * Create queues > @@ -401,16 +400,12 @@ void ipsec_init_pre(void) > } > > /* Create output buffer pool */ > - shm = odp_shm_reserve("shm_out_pool", > - SHM_OUT_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); > - > - pool_base = odp_shm_addr(shm); > + params.buf_size = SHM_OUT_POOL_BUF_SIZE; > + params.buf_align = 0; > + params.num_bufs = SHM_PKT_POOL_BUF_COUNT; > + params.buf_type = ODP_BUFFER_TYPE_PACKET; > > - out_pool = odp_buffer_pool_create("out_pool", pool_base, > - SHM_OUT_POOL_SIZE, > - SHM_OUT_POOL_BUF_SIZE, > - ODP_CACHE_LINE_SIZE, > - ODP_BUFFER_TYPE_PACKET); > + out_pool = odp_buffer_pool_create("out_pool", ODP_SHM_NULL, ¶ms); > > if (ODP_BUFFER_POOL_INVALID == out_pool) { > EXAMPLE_ERR("Error: message pool create failed.\n"); > @@ -1175,12 +1170,12 @@ main(int argc, char *argv[]) > { > odph_linux_pthread_t thread_tbl[MAX_WORKERS]; > int num_workers; > - void *pool_base; > int i; > int first_core; > int core_count; > int stream_count; > odp_shm_t shm; > + odp_buffer_pool_param_t params; > > /* Init ODP before calling anything else */ > if (odp_init_global(NULL, NULL)) { > @@ -1240,42 +1235,28 @@ main(int argc, char *argv[]) > printf("First core: %i\n\n", first_core); > > /* Create packet buffer pool */ > - shm = odp_shm_reserve("shm_packet_pool", > - SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); > + params.buf_size = SHM_PKT_POOL_BUF_SIZE; > + params.buf_align = 0; > + params.num_bufs = SHM_PKT_POOL_BUF_COUNT; > + params.buf_type = ODP_BUFFER_TYPE_PACKET; > > - pool_base = odp_shm_addr(shm); > - > - if (NULL == pool_base) { > - EXAMPLE_ERR("Error: packet pool mem alloc failed.\n"); > - exit(EXIT_FAILURE); > - } > + pkt_pool = odp_buffer_pool_create("packet_pool", ODP_SHM_NULL, > + ¶ms); > > - pkt_pool = odp_buffer_pool_create("packet_pool", pool_base, > - SHM_PKT_POOL_SIZE, > - SHM_PKT_POOL_BUF_SIZE, > - ODP_CACHE_LINE_SIZE, > - ODP_BUFFER_TYPE_PACKET); > if (ODP_BUFFER_POOL_INVALID == pkt_pool) { > EXAMPLE_ERR("Error: packet pool create failed.\n"); > exit(EXIT_FAILURE); > } > > /* Create context buffer pool */ > - shm = odp_shm_reserve("shm_ctx_pool", > - SHM_CTX_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); > - > - pool_base = odp_shm_addr(shm); > + params.buf_size = SHM_CTX_POOL_BUF_SIZE; > + params.buf_align = 0; > + params.num_bufs = SHM_CTX_POOL_BUF_COUNT; > + params.buf_type = ODP_BUFFER_TYPE_RAW; > > - if (NULL == pool_base) { > - EXAMPLE_ERR("Error: context pool mem alloc failed.\n"); > - exit(EXIT_FAILURE); > - } > + ctx_pool = odp_buffer_pool_create("ctx_pool", ODP_SHM_NULL, > + ¶ms); > > - ctx_pool = odp_buffer_pool_create("ctx_pool", pool_base, > - SHM_CTX_POOL_SIZE, > - SHM_CTX_POOL_BUF_SIZE, > - ODP_CACHE_LINE_SIZE, > - ODP_BUFFER_TYPE_RAW); > if (ODP_BUFFER_POOL_INVALID == ctx_pool) { > EXAMPLE_ERR("Error: context pool create failed.\n"); > exit(EXIT_FAILURE); > diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c > index ebac8c5..3c1fd6a 100644 > --- a/example/l2fwd/odp_l2fwd.c > +++ b/example/l2fwd/odp_l2fwd.c > @@ -314,12 +314,12 @@ int main(int argc, char *argv[]) > { > odph_linux_pthread_t thread_tbl[MAX_WORKERS]; > odp_buffer_pool_t pool; > - void *pool_base; > int i; > int first_core; > int core_count; > odp_pktio_t pktio; > odp_shm_t shm; > + odp_buffer_pool_param_t params; > > /* Init ODP before calling anything else */ > if (odp_init_global(NULL, NULL)) { > @@ -383,20 +383,13 @@ int main(int argc, char *argv[]) > printf("First core: %i\n\n", first_core); > > /* Create packet pool */ > - shm = odp_shm_reserve("shm_packet_pool", > - SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); > - pool_base = odp_shm_addr(shm); > + params.buf_size = SHM_PKT_POOL_BUF_SIZE; > + params.buf_align = 0; > + params.num_bufs = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE; > + params.buf_type = ODP_BUFFER_TYPE_PACKET; > > - if (pool_base == NULL) { > - EXAMPLE_ERR("Error: packet pool mem alloc failed.\n"); > - exit(EXIT_FAILURE); > - } > + pool = odp_buffer_pool_create("packet pool", ODP_SHM_NULL, ¶ms); > > - pool = odp_buffer_pool_create("packet_pool", pool_base, > - SHM_PKT_POOL_SIZE, > - SHM_PKT_POOL_BUF_SIZE, > - ODP_CACHE_LINE_SIZE, > - ODP_BUFFER_TYPE_PACKET); > if (pool == ODP_BUFFER_POOL_INVALID) { > EXAMPLE_ERR("Error: packet pool create failed.\n"); > exit(EXIT_FAILURE); > diff --git a/example/odp_example/odp_example.c > b/example/odp_example/odp_example.c > index 9e7f090..bc67342 100644 > --- a/example/odp_example/odp_example.c > +++ b/example/odp_example/odp_example.c > @@ -954,13 +954,13 @@ int main(int argc, char *argv[]) > test_args_t args; > int num_workers; > odp_buffer_pool_t pool; > - void *pool_base; > odp_queue_t queue; > int i, j; > int prios; > int first_core; > odp_shm_t shm; > test_globals_t *globals; > + odp_buffer_pool_param_t params; > > printf("\nODP example starts\n\n"); > > @@ -1042,19 +1042,13 @@ int main(int argc, char *argv[]) > /* > * Create message pool > */ > - shm = odp_shm_reserve("msg_pool", > - MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); > > - pool_base = odp_shm_addr(shm); > + params.buf_size = sizeof(test_message_t); > + params.buf_align = 0; > + params.num_bufs = MSG_POOL_SIZE/sizeof(test_message_t); > + params.buf_type = ODP_BUFFER_TYPE_RAW; > > - if (pool_base == NULL) { > - EXAMPLE_ERR("Shared memory reserve failed.\n"); > - return -1; > - } > - > - pool = odp_buffer_pool_create("msg_pool", pool_base, MSG_POOL_SIZE, > - sizeof(test_message_t), > - ODP_CACHE_LINE_SIZE, > ODP_BUFFER_TYPE_RAW); > + pool = odp_buffer_pool_create("msg_pool", ODP_SHM_NULL, ¶ms); > > if (pool == ODP_BUFFER_POOL_INVALID) { > EXAMPLE_ERR("Pool create failed.\n"); > diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c > index 3e08b34..e0632cb 100644 > --- a/example/packet/odp_pktio.c > +++ b/example/packet/odp_pktio.c > @@ -296,11 +296,11 @@ int main(int argc, char *argv[]) > odph_linux_pthread_t thread_tbl[MAX_WORKERS]; > odp_buffer_pool_t pool; > int num_workers; > - void *pool_base; > int i; > int first_core; > int core_count; > odp_shm_t shm; > + odp_buffer_pool_param_t params; > > /* Init ODP before calling anything else */ > if (odp_init_global(NULL, NULL)) { > @@ -354,20 +354,13 @@ int main(int argc, char *argv[]) > printf("First core: %i\n\n", first_core); > > /* Create packet pool */ > - shm = odp_shm_reserve("shm_packet_pool", > - SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); > - pool_base = odp_shm_addr(shm); > + params.buf_size = SHM_PKT_POOL_BUF_SIZE; > + params.buf_align = 0; > + params.num_bufs = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE; > + params.buf_type = ODP_BUFFER_TYPE_PACKET; > > - if (pool_base == NULL) { > - EXAMPLE_ERR("Error: packet pool mem alloc failed.\n"); > - exit(EXIT_FAILURE); > - } > + pool = odp_buffer_pool_create("packet_pool", ODP_SHM_NULL, ¶ms); > > - pool = odp_buffer_pool_create("packet_pool", pool_base, > - SHM_PKT_POOL_SIZE, > - SHM_PKT_POOL_BUF_SIZE, > - ODP_CACHE_LINE_SIZE, > - ODP_BUFFER_TYPE_PACKET); > if (pool == ODP_BUFFER_POOL_INVALID) { > EXAMPLE_ERR("Error: packet pool create failed.\n"); > exit(EXIT_FAILURE); > diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c > index 9968bfe..0d6e31a 100644 > --- a/example/timer/odp_timer_test.c > +++ b/example/timer/odp_timer_test.c > @@ -244,12 +244,12 @@ int main(int argc, char *argv[]) > test_args_t args; > int num_workers; > odp_buffer_pool_t pool; > - void *pool_base; > odp_queue_t queue; > int first_core; > uint64_t cycles, ns; > odp_queue_param_t param; > odp_shm_t shm; > + odp_buffer_pool_param_t params; > > printf("\nODP timer example starts\n"); > > @@ -313,12 +313,13 @@ int main(int argc, char *argv[]) > */ > shm = odp_shm_reserve("msg_pool", > MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); > - pool_base = odp_shm_addr(shm); > > - pool = odp_buffer_pool_create("msg_pool", pool_base, MSG_POOL_SIZE, > - 0, > - ODP_CACHE_LINE_SIZE, > - ODP_BUFFER_TYPE_TIMEOUT); > + params.buf_size = 0; > + params.buf_align = 0; > + params.num_bufs = MSG_POOL_SIZE; > + params.buf_type = ODP_BUFFER_TYPE_TIMEOUT; > + > + pool = odp_buffer_pool_create("msg_pool", shm, ¶ms); > > if (pool == ODP_BUFFER_POOL_INVALID) { > EXAMPLE_ERR("Pool create failed.\n"); > diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c > index 7704181..1566f4f 100644 > --- a/test/api_test/odp_timer_ping.c > +++ b/test/api_test/odp_timer_ping.c > @@ -319,9 +319,8 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) > ping_arg_t pingarg; > odp_queue_t queue; > odp_buffer_pool_t pool; > - void *pool_base; > int i; > - odp_shm_t shm; > + odp_buffer_pool_param_t params; > > if (odp_test_global_init() != 0) > return -1; > @@ -334,14 +333,14 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) > /* > * Create message pool > */ > - shm = odp_shm_reserve("msg_pool", > - MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0); > - pool_base = odp_shm_addr(shm); > - > - pool = odp_buffer_pool_create("msg_pool", pool_base, MSG_POOL_SIZE, > - BUF_SIZE, > - ODP_CACHE_LINE_SIZE, > - ODP_BUFFER_TYPE_RAW); > + > + params.buf_size = BUF_SIZE; > + params.buf_align = 0; > + params.num_bufs = MSG_POOL_SIZE/BUF_SIZE; > + params.buf_type = ODP_BUFFER_TYPE_RAW; > + > + pool = odp_buffer_pool_create("msg_pool", ODP_SHM_NULL, ¶ms); > + > if (pool == ODP_BUFFER_POOL_INVALID) { > LOG_ERR("Pool create failed.\n"); > return -1; > -- > 1.8.3.2 > > > _______________________________________________ > lng-odp mailing list > [email protected] > http://lists.linaro.org/mailman/listinfo/lng-odp _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
