[dpdk-stable] [PATCH 18.11 1/2] kni: fix build error on openSUSE 15.2 - pci clearing

Kevin Traynor ktraynor at redhat.com
Mon Sep 28 11:05:46 CEST 2020


On 25/09/2020 14:09, Luca Boccassi wrote:
> On Fri, 2020-09-25 at 14:01 +0100, Kevin Traynor wrote:
>> Similar to
>> commit 8c70f4af0f40 ("kni: fix ethtool build error on kernel 5.7")
>> openSUSE LEAP 15.2 also needs to use the new
>> pci_aer_clear_nonfatal_status() function instead of
>> pci_cleanup_aer_uncorrect_error_status().
>>
>> Add macros for openSUSE 15.2 and extend compatibility.
>>
>> Reported-by: Abhishek Marathe <Abhishek.Marathe at microsoft.com>
>> Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
>> ---
>>  kernel/linux/kni/compat.h              | 5 ++++-
>>  kernel/linux/kni/ethtool/igb/kcompat.h | 8 ++++++--
>>  2 files changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
>> index 3c3855dcfa..bf5e6e2b17 100644
>> --- a/kernel/linux/kni/compat.h
>> +++ b/kernel/linux/kni/compat.h
>> @@ -15,5 +15,8 @@
>>  #endif
>>  #ifdef CONFIG_SUSE_KERNEL
>> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 57))
>> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 18))
>> +/* SLES15 SP2 is 5.3.18 based */
>> +#define SLE_VERSION_CODE SLE_VERSION(15, 2, 0)
>> +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 57))
>>  /* SLES12SP3 is at least 4.4.57+ based */
>>  #define SLE_VERSION_CODE SLE_VERSION(12, 3, 0)
>> diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
>> index f74038b3eb..459fda3dad 100644
>> --- a/kernel/linux/kni/ethtool/igb/kcompat.h
>> +++ b/kernel/linux/kni/ethtool/igb/kcompat.h
>> @@ -685,5 +685,8 @@ struct _kc_ethtool_pauseparam {
>>  #endif
>>  #ifdef CONFIG_SUSE_KERNEL
>> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 57))
>> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 18))
>> +/* SLES15 SP2 is 5.3.18 based */
>> +#define SLE_VERSION_CODE SLE_VERSION(15, 2, 0)
>> +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 57))
>>  /* SLES12SP3 is at least 4.4.57+ based */
>>  #define SLE_VERSION_CODE SLE_VERSION(12, 3, 0)
>> @@ -3965,5 +3968,6 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
>>  #endif
>>  
>> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
>> +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)) \
>> +	|| (SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(15, 2, 0)))
>>  #define pci_cleanup_aer_uncorrect_error_status \
>>  	pci_aer_clear_nonfatal_status
> 
> Acked-by: Luca Boccassi <bluca at debian.org>
> 

Applied, thanks.



More information about the stable mailing list