diff mbox

example: classifier: fix add queue param init call

Message ID 1449825388-13506-1-git-send-email-bala.manoharan@linaro.org
State Accepted
Commit ad7b60240e2e25f4812cf2df53a1b1cb950c1b36
Headers show

Commit Message

Balasubramanian Manoharan Dec. 11, 2015, 9:16 a.m. UTC
Fixes crash caused by queue param not being initialized.

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
---
 example/classifier/odp_classifier.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Maxim Uvarov Dec. 11, 2015, 9:26 a.m. UTC | #1
Ok, you added that init() inside that commit of api-next:

commit 8da0ee0b2a43bfdd5b0d37d2d2a10a45bbf2d7bd
Author: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Date:   Thu Dec 3 16:16:06 2015 +0530

     example: classifier: add odp_cls_cos_pool_set() api

     Adds packet pool to CoS using odp_cls_cos_pool_set() api.

     Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
     Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
     Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
     Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

That is why it does not fail on api-next. So we can apply that change 
now to master as bugfix
and port all commit later, closer to next release.

Maxim.

On 12/11/2015 12:16, Balasubramanian Manoharan wrote:
> Fixes crash caused by queue param not being initialized.
>
> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
> ---
>   example/classifier/odp_classifier.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
> index c8f264f..81e6bf0 100644
> --- a/example/classifier/odp_classifier.c
> +++ b/example/classifier/odp_classifier.c
> @@ -401,6 +401,7 @@ static void configure_cos_queue(odp_pktio_t pktio, appl_args_t *args)
>   		};
>   
>   		stats->pmr = odp_pmr_create(&match);
> +		odp_queue_param_init(&qparam);
>   		qparam.sched.prio = i % odp_schedule_num_prio();
>   		qparam.sched.sync = ODP_SCHED_SYNC_NONE;
>   		qparam.sched.group = ODP_SCHED_GROUP_ALL;
Balasubramanian Manoharan Dec. 11, 2015, 9:31 a.m. UTC | #2
It is fine from my side.

Regards,
Bala

On 11 December 2015 at 14:56, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> Ok, you added that init() inside that commit of api-next:
>
> commit 8da0ee0b2a43bfdd5b0d37d2d2a10a45bbf2d7bd
> Author: Balasubramanian Manoharan <bala.manoharan@linaro.org>
> Date:   Thu Dec 3 16:16:06 2015 +0530
>
>     example: classifier: add odp_cls_cos_pool_set() api
>
>     Adds packet pool to CoS using odp_cls_cos_pool_set() api.
>
>     Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>     Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
>     Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
>     Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
>
> That is why it does not fail on api-next. So we can apply that change now to
> master as bugfix
> and port all commit later, closer to next release.
>
> Maxim.
>
> On 12/11/2015 12:16, Balasubramanian Manoharan wrote:
>>
>> Fixes crash caused by queue param not being initialized.
>>
>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>> ---
>>   example/classifier/odp_classifier.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/example/classifier/odp_classifier.c
>> b/example/classifier/odp_classifier.c
>> index c8f264f..81e6bf0 100644
>> --- a/example/classifier/odp_classifier.c
>> +++ b/example/classifier/odp_classifier.c
>> @@ -401,6 +401,7 @@ static void configure_cos_queue(odp_pktio_t pktio,
>> appl_args_t *args)
>>                 };
>>                 stats->pmr = odp_pmr_create(&match);
>> +               odp_queue_param_init(&qparam);
>>                 qparam.sched.prio = i % odp_schedule_num_prio();
>>                 qparam.sched.sync = ODP_SCHED_SYNC_NONE;
>>                 qparam.sched.group = ODP_SCHED_GROUP_ALL;
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
Stuart Haslam Dec. 11, 2015, 10:03 a.m. UTC | #3
On Fri, Dec 11, 2015 at 02:46:28PM +0530, Balasubramanian Manoharan wrote:
> Fixes crash caused by queue param not being initialized.
> 
> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

That fixed it..

Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>

> ---
>  example/classifier/odp_classifier.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
> index c8f264f..81e6bf0 100644
> --- a/example/classifier/odp_classifier.c
> +++ b/example/classifier/odp_classifier.c
> @@ -401,6 +401,7 @@ static void configure_cos_queue(odp_pktio_t pktio, appl_args_t *args)
>  		};
>  
>  		stats->pmr = odp_pmr_create(&match);
> +		odp_queue_param_init(&qparam);
>  		qparam.sched.prio = i % odp_schedule_num_prio();
>  		qparam.sched.sync = ODP_SCHED_SYNC_NONE;
>  		qparam.sched.group = ODP_SCHED_GROUP_ALL;
> -- 
> 1.9.1
Maxim Uvarov Dec. 11, 2015, 12:37 p.m. UTC | #4
Merged,
Maxim.

On 12/11/2015 13:03, Stuart Haslam wrote:
> On Fri, Dec 11, 2015 at 02:46:28PM +0530, Balasubramanian Manoharan wrote:
>> Fixes crash caused by queue param not being initialized.
>>
>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
> That fixed it..
>
> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
>
>> ---
>>   example/classifier/odp_classifier.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
>> index c8f264f..81e6bf0 100644
>> --- a/example/classifier/odp_classifier.c
>> +++ b/example/classifier/odp_classifier.c
>> @@ -401,6 +401,7 @@ static void configure_cos_queue(odp_pktio_t pktio, appl_args_t *args)
>>   		};
>>   
>>   		stats->pmr = odp_pmr_create(&match);
>> +		odp_queue_param_init(&qparam);
>>   		qparam.sched.prio = i % odp_schedule_num_prio();
>>   		qparam.sched.sync = ODP_SCHED_SYNC_NONE;
>>   		qparam.sched.group = ODP_SCHED_GROUP_ALL;
>> -- 
>> 1.9.1
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
index c8f264f..81e6bf0 100644
--- a/example/classifier/odp_classifier.c
+++ b/example/classifier/odp_classifier.c
@@ -401,6 +401,7 @@  static void configure_cos_queue(odp_pktio_t pktio, appl_args_t *args)
 		};
 
 		stats->pmr = odp_pmr_create(&match);
+		odp_queue_param_init(&qparam);
 		qparam.sched.prio = i % odp_schedule_num_prio();
 		qparam.sched.sync = ODP_SCHED_SYNC_NONE;
 		qparam.sched.group = ODP_SCHED_GROUP_ALL;