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, 2.0 has been updated via 75f3d60e6b31544bb9b273364b2cce502262c1f8 (commit) via 61d636209fe064bca7e645af3938739290020875 (commit) via 29e1c5d318822f1ab14e9d82b75f66159f42efcc (commit) via 2d187fd4a4039778ca8ed78dc23ea1da436d427b (commit) via b920c02af3e0c179435db03c71694ace2a62c4f1 (commit) via 59877869efeb29038ba82a4b4771f5864438f8a8 (commit) via 19fe9172ee1fd069a2db86c554db41cbfc69c42d (commit) via 80b0d616f750e824a4bf0b0f3406ea3a3173ae0e (commit) from 00c7441fae53949dd87855d48102f932f8f64537 (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 75f3d60e6b31544bb9b273364b2cce502262c1f8 Author: Yi He yi.he@linaro.org Date: Mon Dec 4 15:36:08 2017 +0800
linux-dpdk: fix inconsistent *_INVALID defines
Fixed inconsistent defines of ODP_BUFFER_INVALID, ODP_EVENT_INVALID and ODP_TIMEOUT_INVALID as NULL instead of 0xffffffff for linux-dpdk platform, to align with linux-generic as well as abi compatible headers.
Signed-off-by: Yi He yi.he@linaro.org Reviewed-by: Honnappa Nagarahalli honnappa.nagarahalli@arm.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-dpdk/include/odp/api/plat/buffer_types.h b/platform/linux-dpdk/include/odp/api/plat/buffer_types.h index 809768f3..0f5f7baa 100644 --- a/platform/linux-dpdk/include/odp/api/plat/buffer_types.h +++ b/platform/linux-dpdk/include/odp/api/plat/buffer_types.h @@ -31,7 +31,7 @@ extern "C" {
typedef ODP_HANDLE_T(odp_buffer_t);
-#define ODP_BUFFER_INVALID _odp_cast_scalar(odp_buffer_t, 0xffffffff) +#define ODP_BUFFER_INVALID _odp_cast_scalar(odp_buffer_t, NULL)
typedef ODP_HANDLE_T(odp_buffer_seg_t);
diff --git a/platform/linux-dpdk/include/odp/api/plat/event_types.h b/platform/linux-dpdk/include/odp/api/plat/event_types.h index e0f68e34..ecda702c 100644 --- a/platform/linux-dpdk/include/odp/api/plat/event_types.h +++ b/platform/linux-dpdk/include/odp/api/plat/event_types.h @@ -32,7 +32,7 @@ extern "C" {
typedef ODP_HANDLE_T(odp_event_t);
-#define ODP_EVENT_INVALID _odp_cast_scalar(odp_event_t, 0xffffffff) +#define ODP_EVENT_INVALID _odp_cast_scalar(odp_event_t, NULL)
/** * Event types diff --git a/platform/linux-dpdk/include/odp/api/plat/timer_types.h b/platform/linux-dpdk/include/odp/api/plat/timer_types.h index 2ae8bfec..3d97993b 100644 --- a/platform/linux-dpdk/include/odp/api/plat/timer_types.h +++ b/platform/linux-dpdk/include/odp/api/plat/timer_types.h @@ -37,7 +37,7 @@ typedef ODP_HANDLE_T(odp_timer_t);
typedef ODP_HANDLE_T(odp_timeout_t);
-#define ODP_TIMEOUT_INVALID _odp_cast_scalar(odp_timeout_t, 0xffffffff) +#define ODP_TIMEOUT_INVALID _odp_cast_scalar(odp_timeout_t, NULL)
/** * @}
commit 61d636209fe064bca7e645af3938739290020875 Author: Yi He yi.he@linaro.org Date: Fri Dec 1 16:31:40 2017 +0800
linux-dpdk: fix platform tests
Fixed search path in pktio_run.sh for pktio_main executable, and Makefile.am to run platform tests with wrapper script.
Signed-off-by: Yi He yi.he@linaro.org Reviewed-by: Honnappa Nagarahalli honnappa.nagarahalli@arm.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-dpdk/test/Makefile.am b/platform/linux-dpdk/test/Makefile.am index a872400e..8cb27b14 100644 --- a/platform/linux-dpdk/test/Makefile.am +++ b/platform/linux-dpdk/test/Makefile.am @@ -14,8 +14,6 @@ SUBDIRS += validation/api/pktio endif endif
-TEST_EXTENSIONS = .sh - TESTNAME = linux-dpdk
TESTENV = tests-$(TESTNAME).env diff --git a/platform/linux-dpdk/test/validation/api/pktio/pktio_run.sh b/platform/linux-dpdk/test/validation/api/pktio/pktio_run.sh index 538c87d0..a08256a6 100755 --- a/platform/linux-dpdk/test/validation/api/pktio/pktio_run.sh +++ b/platform/linux-dpdk/test/validation/api/pktio/pktio_run.sh @@ -23,7 +23,7 @@ # running stand alone out of tree requires setting PATH PATH=${TEST_DIR}/api/pktio:$PATH PATH=$(dirname $0):$PATH -PATH=$(dirname $0)/../../../../common_plat/validation/api/pktio:$PATH +PATH=$(dirname $0)/../../../../../../test/validation/api/pktio:$PATH PATH=.:$PATH
pktio_main_path=$(which pktio_main${EXEEXT})
commit 29e1c5d318822f1ab14e9d82b75f66159f42efcc Author: Balakrishna Garapati balakrishna.garapati@linaro.org Date: Thu Nov 30 22:50:48 2017 +0100
linux-dpdk: crypto bug fixes
Signed-off-by: Balakrishna Garapati balakrishna.garapati@linaro.org Reviewed-by: Yi He yi.he@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c index 9844f2dd..ea014c8e 100644 --- a/platform/linux-dpdk/odp_crypto.c +++ b/platform/linux-dpdk/odp_crypto.c @@ -808,40 +808,53 @@ int odp_crypto_session_create(odp_crypto_session_param_t *param, /* Default to successful result */ *status = ODP_CRYPTO_SES_CREATE_ERR_NONE;
- /* Cipher Data */ - cipher_xform.cipher.key.data = rte_malloc("crypto key", - param->cipher_key.length, 0); - if (cipher_xform.cipher.key.data == NULL) { - ODP_ERR("Failed to allocate memory for cipher key\n"); - /* remove the crypto_session_entry_t */ - memset(entry, 0, sizeof(*entry)); - free_session(entry); - return -1; - } - cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cipher_xform.next = NULL; - cipher_xform.cipher.key.length = param->cipher_key.length; - memcpy(cipher_xform.cipher.key.data, - param->cipher_key.data, - param->cipher_key.length); - - /* Authentication Data */ - auth_xform.auth.key.data = rte_malloc("auth key", - param->auth_key.length, 0); - if (auth_xform.auth.key.data == NULL) { - ODP_ERR("Failed to allocate memory for auth key\n"); - /* remove the crypto_session_entry_t */ - memset(entry, 0, sizeof(*entry)); - free_session(entry); - return -1; + + if (param->cipher_key.length) { + /* Cipher Data */ + cipher_xform.cipher.key.data = rte_malloc("crypto key", + param->cipher_key.length, 0); + if (cipher_xform.cipher.key.data == NULL) { + ODP_ERR("Failed to allocate memory for cipher key\n"); + /* remove the crypto_session_entry_t */ + memset(entry, 0, sizeof(*entry)); + free_session(entry); + return -1; + } + + cipher_xform.cipher.key.length = param->cipher_key.length; + memcpy(cipher_xform.cipher.key.data, + param->cipher_key.data, + param->cipher_key.length); + } else { + cipher_xform.cipher.key.data = 0; + cipher_xform.cipher.key.length = 0; } + auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH; auth_xform.next = NULL; - auth_xform.auth.key.length = param->auth_key.length; - memcpy(auth_xform.auth.key.data, - param->auth_key.data, - param->auth_key.length); + + if (param->auth_key.length) { + /* Authentication Data */ + auth_xform.auth.key.data = rte_malloc("auth key", + param->auth_key.length, 0); + if (auth_xform.auth.key.data == NULL) { + ODP_ERR("Failed to allocate memory for auth key\n"); + /* remove the crypto_session_entry_t */ + memset(entry, 0, sizeof(*entry)); + free_session(entry); + return -1; + } + auth_xform.auth.key.length = param->auth_key.length; + memcpy(auth_xform.auth.key.data, + param->auth_key.data, + param->auth_key.length); + } else { + auth_xform.auth.key.data = 0; + auth_xform.auth.key.length = 0; + } +
/* Derive order */ if (ODP_CRYPTO_OP_ENCODE == param->op) @@ -1271,11 +1284,13 @@ int odp_crypto_int(odp_packet_t pkt_in, memcpy(op->sym->cipher.iv.data, param->override_iv_ptr, entry->iv.length); + op->sym->cipher.iv.phys_addr = + rte_malloc_virt2phy(op->sym->cipher.iv.data); + op->sym->cipher.iv.length = entry->iv.length; } else if (entry->iv.data) { memcpy(op->sym->cipher.iv.data, entry->iv.data, entry->iv.length); - op->sym->cipher.iv.phys_addr = rte_malloc_virt2phy(op->sym->cipher.iv.data); op->sym->cipher.iv.length = entry->iv.length; @@ -1326,7 +1341,7 @@ int odp_crypto_int(odp_packet_t pkt_in, (rc_auth == ODP_CRYPTO_ALG_ERR_NONE);
_odp_buffer_event_subtype_set(packet_to_buffer(out_pkt), - ODP_EVENT_PACKET_BASIC); + ODP_EVENT_PACKET_CRYPTO); op_result = get_op_result_from_packet(out_pkt); *op_result = local_result;
commit 2d187fd4a4039778ca8ed78dc23ea1da436d427b Author: Balakrishna Garapati balakrishna.garapati@linaro.org Date: Thu Nov 30 14:57:27 2017 +0100
linux-dpdk: changes which are needed for odp_crypto to work
All the changes are within the linux-dpdk/odp_crypto.c file: 1) Added missing brackets which made it impossible to create a crypto session 2) Increased the number of queues created, from nb_queue_pairs - 1 to nb_queue_pairs, what seems to work better 3) Removed a memory leak - the memory allocated for iv and aad were not freed
Signed-off-by: Szymon Sliwa szs@semihalf.com Signed-off-by: Balakrishna Garapati balakrishna.garapati@linaro.org Reviewed-by: Yi He yi.he@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c index 8e0f8a9d..9844f2dd 100644 --- a/platform/linux-dpdk/odp_crypto.c +++ b/platform/linux-dpdk/odp_crypto.c @@ -271,7 +271,7 @@ int odp_crypto_init_global(void)
qp_conf.nb_descriptors = NB_MBUF;
- for (queue_pair = 0; queue_pair < nb_queue_pairs - 1; + for (queue_pair = 0; queue_pair < nb_queue_pairs; queue_pair++) { rc = rte_cryptodev_queue_pair_setup(cdev_id, queue_pair, @@ -898,11 +898,12 @@ int odp_crypto_session_create(odp_crypto_session_param_t *param, /* Setup session */ session = rte_cryptodev_sym_session_create(cdev_id, first_xform);
- if (session == NULL) + if (session == NULL) { /* remove the crypto_session_entry_t */ memset(entry, 0, sizeof(*entry)); free_session(entry); return -1; + }
entry->rte_session = (intptr_t)session; entry->cipher_xform = cipher_xform; @@ -1216,6 +1217,9 @@ int odp_crypto_int(odp_packet_t pkt_in, goto err; }
+ op->sym->auth.aad.data = NULL; + op->sym->cipher.iv.data = NULL; + odp_spinlock_unlock(&global->lock);
/* Set crypto operation data parameters */ @@ -1242,9 +1246,8 @@ int odp_crypto_int(odp_packet_t pkt_in, if (aad_len > 0) { op->sym->auth.aad.data = rte_malloc("aad", aad_len, 0); if (op->sym->auth.aad.data == NULL) { - rte_crypto_op_free(op); ODP_ERR("Failed to allocate memory for AAD"); - goto err; + goto err_op_free; }
memcpy(op->sym->auth.aad.data, aad_head, aad_len); @@ -1254,16 +1257,14 @@ int odp_crypto_int(odp_packet_t pkt_in, }
if (entry->iv.length == 0) { - rte_crypto_op_free(op); ODP_ERR("Wrong IV length"); - goto err; + goto err_op_free; }
op->sym->cipher.iv.data = rte_malloc("iv", entry->iv.length, 0); if (op->sym->cipher.iv.data == NULL) { - rte_crypto_op_free(op); ODP_ERR("Failed to allocate memory for IV"); - goto err; + goto err_op_free; }
if (param->override_iv_ptr) { @@ -1300,18 +1301,16 @@ int odp_crypto_int(odp_packet_t pkt_in, rc = rte_cryptodev_enqueue_burst(rte_session->dev_id, queue_pair, &op, 1); if (rc == 0) { - rte_crypto_op_free(op); ODP_ERR("Failed to enqueue packet"); - goto err; + goto err_op_free; }
rc = rte_cryptodev_dequeue_burst(rte_session->dev_id, queue_pair, &op, 1);
if (rc == 0) { - rte_crypto_op_free(op); ODP_ERR("Failed to dequeue packet"); - goto err; + goto err_op_free; }
out_pkt = (odp_packet_t)op->sym->m_src; @@ -1331,6 +1330,8 @@ int odp_crypto_int(odp_packet_t pkt_in, op_result = get_op_result_from_packet(out_pkt); *op_result = local_result;
+ rte_free(op->sym->cipher.iv.data); + rte_free(op->sym->auth.aad.data); rte_crypto_op_free(op);
/* Synchronous, simply return results */ @@ -1338,6 +1339,11 @@ int odp_crypto_int(odp_packet_t pkt_in,
return 0;
+err_op_free: + rte_free(op->sym->cipher.iv.data); + rte_free(op->sym->auth.aad.data); + rte_crypto_op_free(op); + err: if (allocated) { odp_packet_free(out_pkt);
commit b920c02af3e0c179435db03c71694ace2a62c4f1 Author: Balakrishna Garapati balakrishna.garapati@linaro.org Date: Tue Nov 14 17:32:03 2017 +0100
test: enable dpdk initialization before running validation on linux-dpdk
Signed-off-by: Balakrishna Garapati balakrishna.garapati@linaro.org Reviewed-by: Yi He yi.he@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-generic/test/wrapper-script.sh b/platform/linux-generic/test/wrapper-script.sh new file mode 100755 index 00000000..977a032a --- /dev/null +++ b/platform/linux-generic/test/wrapper-script.sh @@ -0,0 +1,3 @@ +#wrapper script for pre setting environment for validation suit. +#currently this is empty but needs to be created to make it align with +#linux-dpdk. diff --git a/test/Makefile.inc b/test/Makefile.inc index eaf791e0..3e7dfe57 100644 --- a/test/Makefile.inc +++ b/test/Makefile.inc @@ -20,6 +20,8 @@ AM_CFLAGS = $(CUNIT_CFLAGS)
AM_LDFLAGS = -L$(LIB) -static
+LOG_COMPILER = $(top_srcdir)/platform/@with_platform@/test/wrapper-script.sh + @VALGRIND_CHECK_RULES@
TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform} \ diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am index 1dccd82e..4417c484 100644 --- a/test/performance/Makefile.am +++ b/test/performance/Makefile.am @@ -31,6 +31,6 @@ odp_sched_latency_SOURCES = odp_sched_latency.c odp_scheduling_SOURCES = odp_scheduling.c odp_pktio_perf_SOURCES = odp_pktio_perf.c
-dist_check_SCRIPTS = $(TESTSCRIPTS) +dist_check_SCRIPTS = $(TESTSCRIPTS) $(LOG_COMPILER)
dist_check_DATA = udp64.pcap
commit 59877869efeb29038ba82a4b4771f5864438f8a8 Author: Honnappa Nagarahalli honnappa.nagarahalli@arm.com Date: Tue Nov 21 15:23:50 2017 -0600
linux-dpdk: pktio: Do not reset parse fields when parsing not enabled
When parsing of the packet is not enabled, application will not look at parse meta data fields.
Signed-off-by: Honnappa Nagarahalli honnappa.nagarahalli@arm.com Reviewed-by: Ola Liljedahl ola.Liljedahl@arm.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Yi He yi.he@linaro.org
diff --git a/platform/linux-dpdk/pktio/dpdk.c b/platform/linux-dpdk/pktio/dpdk.c index 832ac7ac..2d95e902 100644 --- a/platform/linux-dpdk/pktio/dpdk.c +++ b/platform/linux-dpdk/pktio/dpdk.c @@ -403,13 +403,14 @@ static int recv_pkt_dpdk(pktio_entry_t *pktio_entry, int index, for (i = 0; i < nb_rx; ++i) { odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt_table[i]);
- packet_parse_reset(pkt_hdr); pkt_hdr->input = pktio_entry->s.handle;
if (!pktio_cls_enabled(pktio_entry) && - pktio_entry->s.config.parser.layer) + pktio_entry->s.config.parser.layer) { + packet_parse_reset(pkt_hdr); packet_parse_layer(pkt_hdr, pktio_entry->s.config.parser.layer); + } packet_set_ts(pkt_hdr, ts); }
commit 19fe9172ee1fd069a2db86c554db41cbfc69c42d Author: Honnappa Nagarahalli honnappa.nagarahalli@arm.com Date: Tue Nov 21 14:26:00 2017 -0600
linux-dpdk: pool: Remove unused CONFIG_POOL_MAX_NUM
CONFIG_POOL_MAX_NUM is not used in linux-dpdk.
Signed-off-by: Honnappa Nagarahalli honnappa.nagarahalli@arm.com Reviewed-by: Ola Liljedahl ola.Liljedahl@arm.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Yi He yi.he@linaro.org
diff --git a/platform/linux-dpdk/include/odp_config_internal.h b/platform/linux-dpdk/include/odp_config_internal.h index 6aadc93f..f36fcb92 100644 --- a/platform/linux-dpdk/include/odp_config_internal.h +++ b/platform/linux-dpdk/include/odp_config_internal.h @@ -119,11 +119,6 @@ extern "C" { */ #define CONFIG_BURST_SIZE 16
-/* - * Maximum number of events in a pool - */ -#define CONFIG_POOL_MAX_NUM (1 * 1024 * 1024) - /* * Maximum number of events in a thread local pool cache */ diff --git a/platform/linux-dpdk/pool/dpdk.c b/platform/linux-dpdk/pool/dpdk.c index 90d2d7c6..94143dfe 100644 --- a/platform/linux-dpdk/pool/dpdk.c +++ b/platform/linux-dpdk/pool/dpdk.c @@ -137,12 +137,12 @@ static int dpdk_pool_capability(odp_pool_capability_t *capa) capa->buf.max_pools = ODP_CONFIG_POOLS; capa->buf.max_align = ODP_CONFIG_BUFFER_ALIGN_MAX; capa->buf.max_size = MAX_SIZE; - capa->buf.max_num = CONFIG_POOL_MAX_NUM; + capa->buf.max_num = 0;
/* Packet pools */ capa->pkt.max_pools = ODP_CONFIG_POOLS; capa->pkt.max_len = 0; - capa->pkt.max_num = CONFIG_POOL_MAX_NUM; + capa->pkt.max_num = 0; capa->pkt.min_headroom = CONFIG_PACKET_HEADROOM; capa->pkt.min_tailroom = CONFIG_PACKET_TAILROOM; capa->pkt.max_segs_per_pkt = CONFIG_PACKET_MAX_SEGS; @@ -152,7 +152,7 @@ static int dpdk_pool_capability(odp_pool_capability_t *capa)
/* Timeout pools */ capa->tmo.max_pools = ODP_CONFIG_POOLS; - capa->tmo.max_num = CONFIG_POOL_MAX_NUM; + capa->tmo.max_num = 0;
return 0; } @@ -258,11 +258,6 @@ static int check_params(odp_pool_param_t *params)
switch (params->type) { case ODP_POOL_BUFFER: - if (params->buf.num > capa.buf.max_num) { - printf("buf.num too large %u\n", params->buf.num); - return -1; - } - if (params->buf.size > capa.buf.max_size) { printf("buf.size too large %u\n", params->buf.size); return -1; @@ -276,12 +271,6 @@ static int check_params(odp_pool_param_t *params) break;
case ODP_POOL_PACKET: - if (params->pkt.num > capa.pkt.max_num) { - printf("pkt.num too large %u\n", params->pkt.num); - - return -1; - } - if (params->pkt.seg_len > capa.pkt.max_seg_len) { printf("pkt.seg_len too large %u\n", params->pkt.seg_len); @@ -297,10 +286,6 @@ static int check_params(odp_pool_param_t *params) break;
case ODP_POOL_TIMEOUT: - if (params->tmo.num > capa.tmo.max_num) { - printf("tmo.num too large %u\n", params->tmo.num); - return -1; - } break;
default:
commit 80b0d616f750e824a4bf0b0f3406ea3a3173ae0e Author: Honnappa Nagarahalli honnappa.nagarahalli@arm.com Date: Tue Nov 21 14:21:18 2017 -0600
linux-generic: pool: allocate ring memory based on pool size
Adjust the size of ring based on configured number of buffers in the pool.
Signed-off-by: Honnappa Nagarahalli honnappa.nagarahalli@arm.com Reviewed-by: Ola Liljedahl ola.Liljedahl@arm.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Yi He yi.he@linaro.org
diff --git a/platform/linux-generic/include/odp_config_internal.h b/platform/linux-generic/include/odp_config_internal.h index 9b334df4..9720581a 100644 --- a/platform/linux-generic/include/odp_config_internal.h +++ b/platform/linux-generic/include/odp_config_internal.h @@ -147,11 +147,6 @@ */ #define CONFIG_BURST_SIZE 16
-/* - * Maximum number of events in a pool - */ -#define CONFIG_POOL_MAX_NUM (1 * 1024 * 1024) - /* * Maximum number of events in a thread local pool cache */ diff --git a/platform/linux-generic/include/odp_pool_internal.h b/platform/linux-generic/include/odp_pool_internal.h index 60687b3d..a124697e 100644 --- a/platform/linux-generic/include/odp_pool_internal.h +++ b/platform/linux-generic/include/odp_pool_internal.h @@ -41,7 +41,7 @@ typedef struct { ring_t hdr;
/* Ring data: buffer handles */ - uint32_t buf[CONFIG_POOL_MAX_NUM]; + uint32_t buf[];
} pool_ring_t ODP_ALIGNED_CACHE;
diff --git a/platform/linux-generic/pool/generic.c b/platform/linux-generic/pool/generic.c index c55f6757..7a068472 100644 --- a/platform/linux-generic/pool/generic.c +++ b/platform/linux-generic/pool/generic.c @@ -156,11 +156,12 @@ static int generic_pool_term_local(void) return 0; }
-static pool_t *reserve_pool(void) +static pool_t *reserve_pool(uint32_t ring_size) { int i; pool_t *pool; char ring_name[ODP_POOL_NAME_LEN]; + uint32_t ring_shm_size;
for (i = 0; i < ODP_CONFIG_POOLS; i++) { pool = pool_entry(i); @@ -169,10 +170,13 @@ static pool_t *reserve_pool(void) if (pool->reserved == 0) { pool->reserved = 1; UNLOCK(&pool->lock); - sprintf(ring_name, "pool_ring_%d", i); + snprintf(ring_name, ODP_POOL_NAME_LEN, + "pool_ring_%d", i); + ring_shm_size = sizeof(pool_ring_t) + + sizeof(pool->ring->buf[0]) * ring_size; pool->ring_shm = odp_shm_reserve(ring_name, - sizeof(pool_ring_t), + ring_shm_size, ODP_CACHE_LINE_SIZE, 0); if (odp_unlikely(pool->ring_shm == ODP_SHM_INVALID)) { ODP_ERR("Unable to alloc pool ring %d\n", i); @@ -395,7 +399,12 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, if (uarea_size) uarea_size = ROUNDUP_CACHE_LINE(uarea_size);
- pool = reserve_pool(); + if (num <= RING_SIZE_MIN) + ring_size = RING_SIZE_MIN; + else + ring_size = ROUNDUP_POWER2_U32(num); + + pool = reserve_pool(ring_size);
if (pool == NULL) { ODP_ERR("No more free pools"); @@ -431,11 +440,6 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, FIRST_HP_SIZE - 1) / FIRST_HP_SIZE); }
- if (num <= RING_SIZE_MIN) - ring_size = RING_SIZE_MIN; - else - ring_size = ROUNDUP_POWER2_U32(num); - pool->ring_mask = ring_size - 1; pool->num = num; pool->align = align; @@ -506,11 +510,6 @@ static int check_params(odp_pool_param_t *params)
switch (params->type) { case ODP_POOL_BUFFER: - if (params->buf.num > capa.buf.max_num) { - printf("buf.num too large %u\n", params->buf.num); - return -1; - } - if (params->buf.size > capa.buf.max_size) { printf("buf.size too large %u\n", params->buf.size); return -1; @@ -550,10 +549,6 @@ static int check_params(odp_pool_param_t *params) break;
case ODP_POOL_TIMEOUT: - if (params->tmo.num > capa.tmo.max_num) { - printf("tmo.num too large %u\n", params->tmo.num); - return -1; - } break;
default: @@ -663,12 +658,12 @@ static int generic_pool_capability(odp_pool_capability_t *capa) capa->buf.max_pools = ODP_CONFIG_POOLS; capa->buf.max_align = ODP_CONFIG_BUFFER_ALIGN_MAX; capa->buf.max_size = MAX_SIZE; - capa->buf.max_num = CONFIG_POOL_MAX_NUM; + capa->buf.max_num = 0;
/* Packet pools */ capa->pkt.max_pools = ODP_CONFIG_POOLS; capa->pkt.max_len = CONFIG_PACKET_MAX_LEN; - capa->pkt.max_num = CONFIG_POOL_MAX_NUM; + capa->pkt.max_num = 0; capa->pkt.min_headroom = CONFIG_PACKET_HEADROOM; capa->pkt.max_headroom = CONFIG_PACKET_HEADROOM; capa->pkt.min_tailroom = CONFIG_PACKET_TAILROOM; @@ -679,7 +674,7 @@ static int generic_pool_capability(odp_pool_capability_t *capa)
/* Timeout pools */ capa->tmo.max_pools = ODP_CONFIG_POOLS; - capa->tmo.max_num = CONFIG_POOL_MAX_NUM; + capa->tmo.max_num = 0;
return 0; }
-----------------------------------------------------------------------
Summary of changes: .../linux-dpdk/include/odp/api/plat/buffer_types.h | 2 +- .../linux-dpdk/include/odp/api/plat/event_types.h | 2 +- .../linux-dpdk/include/odp/api/plat/timer_types.h | 2 +- platform/linux-dpdk/include/odp_config_internal.h | 5 - platform/linux-dpdk/odp_crypto.c | 107 ++++++++++++--------- platform/linux-dpdk/pktio/dpdk.c | 5 +- platform/linux-dpdk/pool/dpdk.c | 21 +--- platform/linux-dpdk/test/Makefile.am | 2 - .../test/validation/api/pktio/pktio_run.sh | 2 +- .../linux-generic/include/odp_config_internal.h | 5 - platform/linux-generic/include/odp_pool_internal.h | 2 +- platform/linux-generic/pool/generic.c | 37 +++---- platform/linux-generic/test/wrapper-script.sh | 3 + test/Makefile.inc | 2 + test/performance/Makefile.am | 2 +- 15 files changed, 97 insertions(+), 102 deletions(-) create mode 100755 platform/linux-generic/test/wrapper-script.sh
hooks/post-receive