[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/2] util: fix functions that retrieve SRIOV VF info



On 12/20/2012 01:01 PM, Laine Stump wrote:
> This patch resolves:
> 
>   https://bugzilla.redhat.com/show_bug.cgi?id=889319
> 

> 
> Of course we also need to continue working on systems with older
> kernels, so that one bit of code is compiled conditionally. The one
> time this could cause problems is if the libvirt binary was built on a
> system without IFLA_EXT_MASK which was subsequently updated to a
> kernel that *did* have it. That could be solved by manually providing
> the values of IFLA_EXT_MASK and RTEXT_FILTER_VF and adding it to the
> message anyway, but I'm uncertain what that might actually do on a
> system that didn't support the message, so for the time being we'll
> just fail in that case (which will very likely never happen anyway).

Well, there are indeed people that like to compile against the oldest
supported kernel then run that same binary across a range of kernels
[1]; but if someone IS interested in that scenario, they can go ahead
and submit a followon patch at that time.  Besides, most people that use
pre-built libvirt get it from a distro, and distros happen to match
their builds to their kernels; not to mention that with open source, you
can always recompile yourself to pick up any differences in the build
dependencies you want to have.

[1] I've noticed that the most common case of building against the
oldest supported version then reusing that binary happens in the case of
non-free software - after all, it is easier to ship binary-only
executables that work across the widest range of systems than it is to
have one binary per system, if you aren't going to give your users the
freedom of recompiling from source.

>  
> +# if defined(IFLA_EXT_MASK) && defined(RTEXT_FILTER_VF)
> +    /* if this filter exists in the kernel's netlink implementation,
> +     * we need to set it, otherwise the response message will not
> +     * contain the IFLA_VFINFO_LIST that we're looking for.
> +     */
> +    if (nla_put(nl_msg, IFLA_EXT_MASK, RTEXT_FILTER_VF) < 0)
> +       goto buffer_too_small;
> +# endif
> +

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]