diff mbox

[PATCHv2] linux-generic: sched: do not allocate sheduler info in shm area

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

Commit Message

Maxim Uvarov May 30, 2016, 8:26 p.m. UTC
Patch:
637a482 linux-generic: schedule: clean interface towards pktio
Broke ipc pktio work. Restore original logic back. Idea here the following
that 2 processes roll in the same name space instance and should not
overlap each other shared memory files. There is no reason in putting
sheduler internal structures to shared memory.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Cc: Petri Savolainen <petri.savolainen@nokia.com>
---
 v2: add ifdefs.

 platform/linux-generic/odp_schedule.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Maxim Uvarov May 31, 2016, 6:58 a.m. UTC | #1
On 05/31/16 09:39, Savolainen, Petri (Nokia - FI/Espoo) wrote:
>
>> -----Original Message-----
>> From: Maxim Uvarov [mailto:maxim.uvarov@linaro.org]
>> Sent: Monday, May 30, 2016 11:26 PM
>> To: lng-odp@lists.linaro.org
>> Cc: Maxim Uvarov <maxim.uvarov@linaro.org>; Savolainen, Petri (Nokia -
>> FI/Espoo) <petri.savolainen@nokia.com>
>> Subject: [PATCHv2] linux-generic: sched: do not allocate sheduler info in
>> shm area
>>
>> Patch:
>> 637a482 linux-generic: schedule: clean interface towards pktio
>> Broke ipc pktio work. Restore original logic back. Idea here the following
>> that 2 processes roll in the same name space instance and should not
>> overlap each other shared memory files. There is no reason in putting
>> sheduler internal structures to shared memory.
>>
>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
>> Cc: Petri Savolainen <petri.savolainen@nokia.com>
>> ---
>>   v2: add ifdefs.
>>
>>   platform/linux-generic/odp_schedule.c | 9 ++++++++-
>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-
>> generic/odp_schedule.c
>> index 56f40a3..7c355eb 100644
>> --- a/platform/linux-generic/odp_schedule.c
>> +++ b/platform/linux-generic/odp_schedule.c
>> @@ -22,6 +22,9 @@
>>   #include <odp/api/thrmask.h>
>>   #include <odp_config_internal.h>
>>   #include <odp_schedule_internal.h>
>> +#ifdef _ODP_PKTIO_IPC
>> +#include <odp_pool_internal.h>
>> +#endif
>>
>>   /* Number of priority levels  */
>>   #define NUM_PRIO 8
>> @@ -153,7 +156,11 @@ int odp_schedule_init_global(void)
>>   	params.buf.num   = num_cmd;
>>   	params.type      = ODP_POOL_BUFFER;
>>
>> -	pool = odp_pool_create("odp_sched_pool", &params);
>> +#ifdef _ODP_PKTIO_IPC
>> +	pool = _pool_create("odp_sched_pool", &params, 0);
>> +#else
>> +	pool = odp_pool_create("odp_sched_pool", &params, 0);
>
> odp_pool_create() does have only two parameters. This line will not compile in the default configuration.
>
> -Petri
>
I should never create patches late night and test them. Thanks. will 
send v3.

Maxim.
diff mbox

Patch

diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c
index 56f40a3..7c355eb 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -22,6 +22,9 @@ 
 #include <odp/api/thrmask.h>
 #include <odp_config_internal.h>
 #include <odp_schedule_internal.h>
+#ifdef _ODP_PKTIO_IPC
+#include <odp_pool_internal.h>
+#endif
 
 /* Number of priority levels  */
 #define NUM_PRIO 8
@@ -153,7 +156,11 @@  int odp_schedule_init_global(void)
 	params.buf.num   = num_cmd;
 	params.type      = ODP_POOL_BUFFER;
 
-	pool = odp_pool_create("odp_sched_pool", &params);
+#ifdef _ODP_PKTIO_IPC
+	pool = _pool_create("odp_sched_pool", &params, 0);
+#else
+	pool = odp_pool_create("odp_sched_pool", &params, 0);
+#endif
 	if (pool == ODP_POOL_INVALID) {
 		ODP_ERR("Schedule init: Pool create failed.\n");
 		return -1;