[dpdk-dev] [PATCH] eal: fix compile error in eal_timer.c

David Marchand david.marchand at 6wind.com
Mon Jan 4 10:01:08 CET 2016


Hello,

Four mails for this ? :-)
Please test off-list when you are not sure how to send patches.

On Sun, Jan 3, 2016 at 3:49 PM, Yi Lu <luyi68 at live.com> wrote:

> Error message:
> /root/dpdk-2.2.0/lib/librte_eal/linuxapp/eal/eal_timer.c: In function
> ‘rte_eal_hpet_init’:
> /root/dpdk-2.2.0/lib/librte_eal/linuxapp/eal/eal_timer.c:222:2: error:
> implicit declaration of function ‘rte_thread_setname’
> [-Werror=implicit-function-declaration]
>   ret = rte_thread_setname(msb_inc_thread_id, thread_name);
>   ^
> /root/dpdk-2.2.0/lib/librte_eal/linuxapp/eal/eal_timer.c:222:2: error:
> nested extern declaration of ‘rte_thread_setname’ [-Werror=nested-externs]
> cc1: all warnings being treated as errors
>
> Fixes: badb3688ffa8 ("eal/linux: fix build with glibc < 2.12")
>


Well, this problem was not seen before as you need to enable hpet support.
Title and commitlog should, at least, mention hpet.



> Signed-off-by: Yi Lu <luyi68 at live.com>
> ---
>  lib/librte_eal/linuxapp/eal/eal_timer.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_eal/linuxapp/eal/eal_timer.c
> b/lib/librte_eal/linuxapp/eal/eal_timer.c
> index 9ceff33..bcadf09 100644
> --- a/lib/librte_eal/linuxapp/eal/eal_timer.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_timer.c
> @@ -50,6 +50,7 @@
>  #include <rte_memory.h>
>  #include <rte_memzone.h>
>  #include <rte_eal.h>
> +#include <rte_lcore.h>
>  #include <rte_debug.h>
>
>  #include "eal_private.h"
>


Initial patch preferred eal_thread.h inclusion, but since
rte_thread_setname is defined in rte_lcore.h, I am fine with your patch.
So ack once the commitlog mentions hpet.

Thanks.

-- 
David Marchand


More information about the dev mailing list