Re: [PATCH] util: Fix configure.ac check for DEVLINK_CMD_ESWITCH_GET

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

 




On 09/19/2017 08:26 AM, Andrea Bolognani wrote:
> On Tue, 2017-09-19 at 07:27 -0400, John Ferlan wrote:
>>> First of all, you're removing a number of checks
>>> on unrelated symbols
>>> that are still used in the code, and if any of those is not present
>>> then we shouldn't compile the relevant bits at all.
>>
>> I checked - up through 4.8 "most" are available. At 4.8 the *ESWITCH*
>> ones were added. Checking for a minimum version for a symbol is
>> something we do in other code under the assumption that any symbol that
>> is in a counted enum/list for a command or structure before it is
>> available. Otherwise, we'd have more symbol and field checking all over
>> the place.
> 
> Okay, I see what you were aiminig for now, and I don't disagree
> with it; however, the rationale was not explained clearly in the
> original commit message.
> 

OK - I did have it at one point, but the damn commit message got so long
I just trimmed out that part...

>>> Second, we're using
>>> DEVLINK_CMD_ESWITCH_GET in the code, but as you
>>> explain that version is only available in newer kernels.
>>>
>>> I think the approach need to be more nuanced:
>>>
>>>   - use
>>> DEVLINK_CMD_ESWITCH_GET or DEVLINK_CMD_ESWITCH_MODE_GET,
>>>     depending on which on is available, with the former one being the
>>>     preferred option;
>>
>> That's another option to what I posted a few moments ago to use:
>>
>> # ifndef...
> 
> Sure, that would work too, and look a little bit better than
> what I proposed.
> 

So is this methodology preferred over what Jano posts?

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux