kni: fix SLE version detection
detect SLE version reverse chronologically as ">=" is being used. Fixes: 2972254ce163 ("kni: fix build on Suse 12 SP3") Cc: stable@dpdk.org Signed-off-by: Nirmoy Das <ndas@suse.de> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
f181011359
commit
d8bc68bcd2
@ -697,22 +697,22 @@ struct _kc_ethtool_pauseparam {
|
||||
#define SLE_VERSION(a,b,c) KERNEL_VERSION(a,b,c)
|
||||
#endif
|
||||
#ifdef CONFIG_SUSE_KERNEL
|
||||
#if ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,27) )
|
||||
/* SLES11 GA is 2.6.27 based */
|
||||
#define SLE_VERSION_CODE SLE_VERSION(11,0,0)
|
||||
#elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32) )
|
||||
/* SLES11 SP1 is 2.6.32 based */
|
||||
#define SLE_VERSION_CODE SLE_VERSION(11,1,0)
|
||||
#if (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)
|
||||
#elif ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,28) )
|
||||
/* SLES12 is at least 3.12.28+ based */
|
||||
#define SLE_VERSION_CODE SLE_VERSION(12,0,0)
|
||||
#elif ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,61)) && \
|
||||
(LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)))
|
||||
/* SLES11 SP3 is at least 3.0.61+ based */
|
||||
#define SLE_VERSION_CODE SLE_VERSION(11,3,0)
|
||||
#elif ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,28) )
|
||||
/* SLES12 is at least 3.12.28+ based */
|
||||
#define SLE_VERSION_CODE SLE_VERSION(12,0,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)
|
||||
#elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32) )
|
||||
/* SLES11 SP1 is 2.6.32 based */
|
||||
#define SLE_VERSION_CODE SLE_VERSION(11,1,0)
|
||||
#elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,27) )
|
||||
/* SLES11 GA is 2.6.27 based */
|
||||
#define SLE_VERSION_CODE SLE_VERSION(11,0,0)
|
||||
#endif /* LINUX_VERSION_CODE == KERNEL_VERSION(x,y,z) */
|
||||
#endif /* CONFIG_SUSE_KERNEL */
|
||||
#ifndef SLE_VERSION_CODE
|
||||
|
Loading…
x
Reference in New Issue
Block a user