On Thu, Nov 3, 2011 at 1:26 PM, Pravin B Shelar <[email protected]> wrote:
> diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c
> index a468ac8..a9212d0 100644
> --- a/datapath/vport-internal_dev.c
> +++ b/datapath/vport-internal_dev.c
> @@ -37,27 +39,35 @@ static inline struct internal_dev 
> *internal_dev_priv(struct net_device *netdev)
>  }
>
>  /* This function is only called by the kernel network layer.*/
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
> +static struct rtnl_link_stats64 *internal_dev_get_stats(struct net_device 
> *netdev,
> +                                       struct rtnl_link_stats64 *stats)
> +{
> +#else
>  static struct net_device_stats *internal_dev_sys_stats(struct net_device 
> *netdev)
> +
>  {
> -       struct vport *vport = internal_dev_get_vport(netdev);
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
>        struct net_device_stats *stats = &internal_dev_priv(netdev)->stats;
> +#else
> +       struct net_device_stats *stats = &netdev->stats;
> +#endif
> +#endif

The code looks good but this is extremely difficult to read.  Can you
please line up the arguments for the 64-bit prototype, remove the
extra blank line, etc?
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to