diff mbox

linux-gen: scope ipc shared memory for packet pools only

Message ID 1468855603-10352-1-git-send-email-maxim.uvarov@linaro.org
State Superseded
Headers show

Commit Message

Maxim Uvarov July 18, 2016, 3:26 p.m. UTC
Instead of placing all allocation to shared memory, place
only packets pool.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
 platform/linux-generic/odp_pool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.7.1.250.gff4ea60

Comments

Mike Holmes July 18, 2016, 5:24 p.m. UTC | #1
On 18 July 2016 at 11:26, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> Instead of placing all allocation to shared memory, place

> only packets pool.

>

> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>


Reviewed-by: Mike Holmes <mike.holmes@linaro.org>



> ---

>  platform/linux-generic/odp_pool.c | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

>

> diff --git a/platform/linux-generic/odp_pool.c

> b/platform/linux-generic/odp_pool.c

> index ec6d86a..a9c64f9 100644

> --- a/platform/linux-generic/odp_pool.c

> +++ b/platform/linux-generic/odp_pool.c

> @@ -462,7 +462,8 @@ odp_pool_t odp_pool_create(const char *name,

>                            odp_pool_param_t *params)

>  {

>  #ifdef _ODP_PKTIO_IPC

> -       return _pool_create(name, params, ODP_SHM_PROC);

> +       if (params && (params->type == ODP_POOL_PACKET))

> +               return _pool_create(name, params, ODP_SHM_PROC);

>  #else

>         return _pool_create(name, params, 0);

>  #endif

> --

> 2.7.1.250.gff4ea60

>

>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
diff mbox

Patch

diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c
index ec6d86a..a9c64f9 100644
--- a/platform/linux-generic/odp_pool.c
+++ b/platform/linux-generic/odp_pool.c
@@ -462,7 +462,8 @@  odp_pool_t odp_pool_create(const char *name,
 			   odp_pool_param_t *params)
 {
 #ifdef _ODP_PKTIO_IPC
-	return _pool_create(name, params, ODP_SHM_PROC);
+	if (params && (params->type == ODP_POOL_PACKET))
+		return _pool_create(name, params, ODP_SHM_PROC);
 #else
 	return _pool_create(name, params, 0);
 #endif