[ovs-dev] [compat 6/6] datapath: Introduce more compat support for <net/netlink.h>.

Jesse Gross jesse at nicira.com
Sat Dec 11 23:01:45 UTC 2010


On Fri, Dec 10, 2010 at 2:47 PM, Ben Pfaff <blp at nicira.com> wrote:
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)
> +/* This function was introduced in 2.6.31, but initially it performed an
> + * unaligned access, so we replace it up to 2.6.34 where it was fixed.  */
> +#define nla_get_be64 rpl_nla_get_be64
> +static inline __be64 nla_get_be64(const struct nlattr *nla)
> +{
> +        __be64 tmp;
> +
> +       /* The additional cast is necessary because  */
> +        nla_memcpy(&tmp, (struct nlattr *) nla, sizeof(tmp));
> +
> +        return tmp;
> +}
> +#endif  /* !HAVE_NLA_GET_BE64 */

There isn't a HAVE_NLA_GET_BE64 - the test is based on version.




More information about the dev mailing list