On Fri, Sep 13, 2013 at 2:37 PM, Jesse Gross <je...@nicira.com> wrote:
> The symbol HAVE_NET_DEVICE_OPS was removed in 3.1 even though these ops
> still exist, so on newer kernels we define the symbol ourselves. However,
> SLES 11 SP3 appears to have backported this symbol removal. This simply
> defines the symbol on all kernels where it is relevant, unless it is
> already defined.
>
> Reported-by: Cristina Palomo Regidor <cristina.palomo.regi...@ericsson.com>
> Signed-off-by: Jesse Gross <je...@nicira.com>
Acked-by: Pravin B Shelar <pshe...@nicira.com>

> ---
> On master, this code can be removed altogether because all kernels 2.6.32+
> use net_device_ops. Therefore, this is just a patch for older branches.
> ---
>  datapath/vport-internal_dev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c
> index 4dc2eb4..992eb1d 100644
> --- a/datapath/vport-internal_dev.c
> +++ b/datapath/vport-internal_dev.c
> @@ -35,9 +35,11 @@
>  #include "vport-internal_dev.h"
>  #include "vport-netdev.h"
>
> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)
> +#ifndef HAVE_NET_DEVICE_OPS
>  #define HAVE_NET_DEVICE_OPS
>  #endif
> +#endif
>
>  struct internal_dev {
>         struct vport *vport;
> --
> 1.8.1.2
>
> _______________________________________________
> 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