diff mbox

example: l2fwd: fix a cpumask bug and compilation error

Message ID 1422361873-5188-1-git-send-email-ciprian.barbu@linaro.org
State New
Headers show

Commit Message

Ciprian Barbu Jan. 27, 2015, 12:31 p.m. UTC
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
---
Fix for https://bugs.linaro.org/show_bug.cgi?id=1146

 example/l2fwd/odp_l2fwd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Maxim Uvarov Jan. 28, 2015, 1:11 p.m. UTC | #1
short subject says that you fixed compilation error, what is compilation 
error was there?

Please change description to something more clear and put reference to 
bug to long log.

Maxim.

On 01/27/2015 03:31 PM, Ciprian Barbu wrote:
> Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
> ---
> Fix for https://bugs.linaro.org/show_bug.cgi?id=1146
>
>   example/l2fwd/odp_l2fwd.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c
> index 10d5d32..74eaf84 100644
> --- a/example/l2fwd/odp_l2fwd.c
> +++ b/example/l2fwd/odp_l2fwd.c
> @@ -146,6 +146,7 @@ static void *pktio_queue_thread(void *arg)
>   	}
>   
>   /* unreachable */
> +	return NULL;
>   }
>   
>   /**
> @@ -393,7 +394,7 @@ int main(int argc, char *argv[])
>   		odph_linux_pthread_create(&thread_tbl[i], &thd_mask,
>   					  thr_run_func,
>   					  &gbl_args->thread[i]);
> -		cpu = odp_cpumask_next(&thd_mask, cpu);
> +		cpu = odp_cpumask_next(&cpumask, cpu);
>   	}
>   
>   	/* Master thread waits for other threads to exit */
Ciprian Barbu Jan. 28, 2015, 4 p.m. UTC | #2
Ignore this patch, I will create a new bug for the missing return
statements and send 2 patches instead.

On Wed, Jan 28, 2015 at 3:11 PM, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> short subject says that you fixed compilation error, what is compilation
> error was there?
>
> Please change description to something more clear and put reference to bug
> to long log.
>
> Maxim.
>
>
> On 01/27/2015 03:31 PM, Ciprian Barbu wrote:
>>
>> Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
>> ---
>> Fix for https://bugs.linaro.org/show_bug.cgi?id=1146
>>
>>   example/l2fwd/odp_l2fwd.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c
>> index 10d5d32..74eaf84 100644
>> --- a/example/l2fwd/odp_l2fwd.c
>> +++ b/example/l2fwd/odp_l2fwd.c
>> @@ -146,6 +146,7 @@ static void *pktio_queue_thread(void *arg)
>>         }
>>     /* unreachable */
>> +       return NULL;
>>   }
>>     /**
>> @@ -393,7 +394,7 @@ int main(int argc, char *argv[])
>>                 odph_linux_pthread_create(&thread_tbl[i], &thd_mask,
>>                                           thr_run_func,
>>                                           &gbl_args->thread[i]);
>> -               cpu = odp_cpumask_next(&thd_mask, cpu);
>> +               cpu = odp_cpumask_next(&cpumask, cpu);
>>         }
>>         /* Master thread waits for other threads to exit */
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c
index 10d5d32..74eaf84 100644
--- a/example/l2fwd/odp_l2fwd.c
+++ b/example/l2fwd/odp_l2fwd.c
@@ -146,6 +146,7 @@  static void *pktio_queue_thread(void *arg)
 	}
 
 /* unreachable */
+	return NULL;
 }
 
 /**
@@ -393,7 +394,7 @@  int main(int argc, char *argv[])
 		odph_linux_pthread_create(&thread_tbl[i], &thd_mask,
 					  thr_run_func,
 					  &gbl_args->thread[i]);
-		cpu = odp_cpumask_next(&thd_mask, cpu);
+		cpu = odp_cpumask_next(&cpumask, cpu);
 	}
 
 	/* Master thread waits for other threads to exit */