diff options
author | Bill Fischofer <bill.fischofer@linaro.org> | 2015-07-09 16:46:24 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-07-21 18:02:36 +0300 |
commit | 5be42d9a8508a4e45786c59bd6bd0e058059540f (patch) | |
tree | ce3c7d2a39a6887cb2355dced95e650896b3dc14 /example | |
parent | 207142018cfd228f95bb5b124f9562ed3fa82312 (diff) |
api: pool: remove shm paramter from odp_pool_create()
This patch removes the 2nd parameter to odp_pool_create() because it has two
major issues:
1. Applications have no way to know how big a shm area is required for a given
pool since that information is implementation specific. So there's no portable
means of using this parameter.
2. Some implementations (e.g., odp-dpdk) cannot accept an external memory area
for pool creation since they need to control the memory themselves.
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
test/validation/pktio/pktio.c
test/validation/pool/pool.c
helper/test/odp_chksum.c
Diffstat (limited to 'example')
-rw-r--r-- | example/classifier/odp_classifier.c | 2 | ||||
-rw-r--r-- | example/generator/odp_generator.c | 4 | ||||
-rw-r--r-- | example/ipsec/odp_ipsec.c | 8 | ||||
-rw-r--r-- | example/packet/odp_pktio.c | 2 | ||||
-rw-r--r-- | example/timer/odp_timer_test.c | 2 |
5 files changed, 8 insertions, 10 deletions
diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c index 7de11c6..4f741d0 100644 --- a/example/classifier/odp_classifier.c +++ b/example/classifier/odp_classifier.c @@ -440,7 +440,7 @@ int main(int argc, char *argv[]) params.pkt.num = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE; params.type = ODP_POOL_PACKET; - pool = odp_pool_create("packet_pool", ODP_SHM_NULL, ¶ms); + pool = odp_pool_create("packet_pool", ¶ms); if (pool == ODP_POOL_INVALID) { EXAMPLE_ERR("Error: packet pool create failed.\n"); diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index d35f4aa..d6bf880 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -655,7 +655,7 @@ int main(int argc, char *argv[]) params.pkt.num = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE; params.type = ODP_POOL_PACKET; - pool = odp_pool_create("packet_pool", ODP_SHM_NULL, ¶ms); + pool = odp_pool_create("packet_pool", ¶ms); if (pool == ODP_POOL_INVALID) { EXAMPLE_ERR("Error: packet pool create failed.\n"); @@ -682,7 +682,7 @@ int main(int argc, char *argv[]) params.tmo.num = tparams.num_timers; /* One timeout per timer */ params.type = ODP_POOL_TIMEOUT; - tmop = odp_pool_create("timeout_pool", ODP_SHM_NULL, ¶ms); + tmop = odp_pool_create("timeout_pool", ¶ms); if (pool == ODP_POOL_INVALID) { EXAMPLE_ERR("Error: packet pool create failed.\n"); diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c index 134245c..d54ac79 100644 --- a/example/ipsec/odp_ipsec.c +++ b/example/ipsec/odp_ipsec.c @@ -354,7 +354,7 @@ void ipsec_init_pre(void) params.pkt.num = SHM_PKT_POOL_BUF_COUNT; params.type = ODP_POOL_PACKET; - out_pool = odp_pool_create("out_pool", ODP_SHM_NULL, ¶ms); + out_pool = odp_pool_create("out_pool", ¶ms); if (ODP_POOL_INVALID == out_pool) { EXAMPLE_ERR("Error: message pool create failed.\n"); @@ -1298,8 +1298,7 @@ main(int argc, char *argv[]) params.pkt.num = SHM_PKT_POOL_BUF_COUNT; params.type = ODP_POOL_PACKET; - pkt_pool = odp_pool_create("packet_pool", ODP_SHM_NULL, - ¶ms); + pkt_pool = odp_pool_create("packet_pool", ¶ms); if (ODP_POOL_INVALID == pkt_pool) { EXAMPLE_ERR("Error: packet pool create failed.\n"); @@ -1312,8 +1311,7 @@ main(int argc, char *argv[]) params.buf.num = SHM_CTX_POOL_BUF_COUNT; params.type = ODP_POOL_BUFFER; - ctx_pool = odp_pool_create("ctx_pool", ODP_SHM_NULL, - ¶ms); + ctx_pool = odp_pool_create("ctx_pool", ¶ms); if (ODP_POOL_INVALID == ctx_pool) { EXAMPLE_ERR("Error: context pool create failed.\n"); diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c index 040571b..a3a8692 100644 --- a/example/packet/odp_pktio.c +++ b/example/packet/odp_pktio.c @@ -381,7 +381,7 @@ int main(int argc, char *argv[]) params.pkt.num = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE; params.type = ODP_POOL_PACKET; - pool = odp_pool_create("packet_pool", ODP_SHM_NULL, ¶ms); + pool = odp_pool_create("packet_pool", ¶ms); if (pool == ODP_POOL_INVALID) { EXAMPLE_ERR("Error: packet pool create failed.\n"); diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c index ccd07fd..5090c05 100644 --- a/example/timer/odp_timer_test.c +++ b/example/timer/odp_timer_test.c @@ -394,7 +394,7 @@ int main(int argc, char *argv[]) params.tmo.num = NUM_TMOS; params.type = ODP_POOL_TIMEOUT; - gbls->pool = odp_pool_create("msg_pool", ODP_SHM_NULL, ¶ms); + gbls->pool = odp_pool_create("msg_pool", ¶ms); if (gbls->pool == ODP_POOL_INVALID) { EXAMPLE_ERR("Pool create failed.\n"); |