[ovs-dev] [PATCH] datapath: Simplify vport-netdev-hook compatibility code.

Jesse Gross jesse at nicira.com
Tue Oct 29 23:26:52 UTC 2013


On Tue, Oct 29, 2013 at 2:10 PM, Pravin B Shelar <pshelar at nicira.com> wrote:
> diff --git a/datapath/linux/compat/include/linux/netdevice.h b/datapath/linux/compat/include/linux/netdevice.h
> index c5c366b..14624bb 100644
> --- a/datapath/linux/compat/include/linux/netdevice.h
> +++ b/datapath/linux/compat/include/linux/netdevice.h
>  #ifdef HAVE_RHEL_OVS_HOOK
> -extern struct sk_buff *(*openvswitch_handle_frame_hook)(struct sk_buff *skb);
> -extern int nr_bridges;
> +typedef struct sk_buff *(openvswitch_handle_frame_hook_t)(struct sk_buff *skb);
> +extern openvswitch_handle_frame_hook_t *openvswitch_handle_frame_hook;
>  #endif

[...]

>  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) || \
>      defined HAVE_RHEL_OVS_HOOK
> -static inline int netdev_rx_handler_register(struct net_device *dev,
> -                                            void *rx_handler,
> -                                            void *rx_handler_data)
> -{
> +
>  #ifdef HAVE_RHEL_OVS_HOOK

Should we combine these two blocks to make it easier to read?

Acked-by: Jesse Gross <jesse at nicira.com>



More information about the dev mailing list