I am still see compilation error on centos 6.5

  CC [M]  /home/pravin/ovs/w8/datapath/linux/actions.o

/home/pravin/ovs/w8/datapath/linux/actions.c: In function ‘ovs_execute_actions’:

/home/pravin/ovs/w8/datapath/linux/actions.c:1034: error: implicit
declaration of function ‘this_cpu_read’

/home/pravin/ovs/w8/datapath/linux/actions.c:1034: error:
‘exec_actions_level’ undeclared (first use in this function)

/home/pravin/ovs/w8/datapath/linux/actions.c:1034: error: (Each
undeclared identifier is reported only once

/home/pravin/ovs/w8/datapath/linux/actions.c:1034: error: for each
function it appears in.)

/home/pravin/ovs/w8/datapath/linux/actions.c:1046: error: implicit
declaration of function ‘this_cpu_inc’

/home/pravin/ovs/w8/datapath/linux/actions.c:1053: error: implicit
declaration of function ‘this_cpu_dec’


On Tue, Sep 9, 2014 at 4:50 PM, Andy Zhou <az...@nicira.com> wrote:
> The upstream modules uses this_cpu_xxx APIs. Add those functions for
> older kernel (<3.0.0) that does not provide them.
>
> VMware-BZ: #1319082
>
> Signed-off-by: Andy Zhou <az...@nicira.com>
> ---
>  datapath/linux/compat/include/asm/percpu.h | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/datapath/linux/compat/include/asm/percpu.h 
> b/datapath/linux/compat/include/asm/percpu.h
> index 65bce08..f68ef30 100644
> --- a/datapath/linux/compat/include/asm/percpu.h
> +++ b/datapath/linux/compat/include/asm/percpu.h
> @@ -3,8 +3,24 @@
>
>  #include_next <asm/percpu.h>
>
> -#if !defined this_cpu_ptr && !defined HAVE_THIS_CPU_PTR
> +#if !defined HAVE_THIS_CPU_PTR
> +
> +#if !defined this_cpu_ptr
>  #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, smp_processor_id())
>  #endif
>
> +#if !defined this_cpu_read
> +#define this_cpu_read(ptr) percpu_read(ptr)
> +#endif
> +
> +#if !defined this_cpu_inc
> +#define this_cpu_inc(ptr) percpu_add(ptr, 1)
> +#endif
> +
> +#if !defined this_cpu_dec
> +#define this_cpu_dec(ptr) percpu_sub(ptr, 1)
> +#endif
> +
> +#endif /* !defined HAVE_THIS_CPU_PTR */
> +
>  #endif
> --
> 1.9.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to