@@ -790,9 +790,9 @@ do { \
790790#define ENA_DEVLINK_RECEIVES_DEVICE_ON_ALLOC
791791#endif
792792
793- #if LINUX_VERSION_CODE >= KERNEL_VERSION (5 , 16 , 0 ) || \
793+ #if ( KERNEL_VERSION ( 5 , 16 , 0 ) <= LINUX_VERSION_CODE && LINUX_VERSION_CODE < KERNEL_VERSION (6 , 3 , 0 ) ) || \
794794 (defined(SUSE_VERSION ) && (SUSE_VERSION == 15 && SUSE_PATCHLEVEL >= 4 )) || \
795- (defined(RHEL_RELEASE_CODE ) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION (9 , 0 ))
795+ (defined(RHEL_RELEASE_CODE ) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION (9 , 0 ) && !(defined( FEDORA_RELEASE )) )
796796#define ENA_DEVLINK_RELOAD_SUPPORT_ADVERTISEMENT_NEEDED
797797#endif
798798
@@ -866,8 +866,8 @@ static inline void netdev_rss_key_fill(void *buffer, size_t len)
866866 * UEK ***********|--------------|--------|------|
867867 */
868868#if (defined(IS_UEK ) && !ENA_KERNEL_VERSION_GTE (4 , 1 , 12 , 124 , 43 , 1 )) || \
869- (defined(ubuntu )) || \
870- (!defined(IS_UEK ) && !defined(ubuntu ) && \
869+ (defined(UBUNTU_VERSION_CODE )) || \
870+ (!defined(IS_UEK ) && !defined(UBUNTU_VERSION_CODE ) && \
871871 !(KERNEL_VERSION (4 , 4 , 216 ) <= LINUX_VERSION_CODE && LINUX_VERSION_CODE < KERNEL_VERSION (4 , 5 , 0 )))
872872static inline int page_ref_count (struct page * page )
873873{
@@ -967,7 +967,11 @@ xdp_prepare_buff(struct xdp_buff *xdp, unsigned char *hard_start,
967967#define ENA_XDP_XMIT_FREES_FAILED_DESCS_INTERNALLY
968968#endif
969969
970- #if LINUX_VERSION_CODE < KERNEL_VERSION (5 , 15 , 0 ) && \
970+ #if (LINUX_VERSION_CODE < KERNEL_VERSION (5 , 15 , 0 ) && \
971+ !(LINUX_VERSION_CODE >= KERNEL_VERSION (5 , 10 , 188 ) && \
972+ LINUX_VERSION_CODE < KERNEL_VERSION (5 , 11 , 0 )) && \
973+ !(LINUX_VERSION_CODE >= KERNEL_VERSION (5 , 4 , 251 ) && \
974+ LINUX_VERSION_CODE < KERNEL_VERSION (5 , 5 , 0 ))) && \
971975 !(defined(RHEL_RELEASE_CODE ) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION (8 , 6 )) && \
972976 !(defined(SUSE_VERSION ) && (SUSE_VERSION == 15 && SUSE_PATCHLEVEL >= 4 )) && \
973977 !(defined(SUSE_VERSION ) && (SUSE_VERSION == 15 && SUSE_PATCHLEVEL == 3 ) && \
@@ -989,7 +993,8 @@ static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
989993#if LINUX_VERSION_CODE >= KERNEL_VERSION (5 , 17 , 0 ) || \
990994 (defined(RHEL_RELEASE_CODE ) && \
991995 RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION (8 , 7 ) && \
992- RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION (9 , 0 ))
996+ RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION (9 , 0 )) || \
997+ (defined(SUSE_VERSION ) && (SUSE_VERSION == 15 && SUSE_PATCHLEVEL >= 5 ))
993998#define ENA_ETHTOOL_RX_BUFF_SIZE_CHANGE
994999#endif
9951000
@@ -1062,6 +1067,10 @@ static inline bool ktime_after(const ktime_t cmp1, const ktime_t cmp2)
10621067#define ENA_PHC_SUPPORT_GETTIME64_EXTENDED
10631068#endif /* ENA_PHC_SUPPORT_GETTIME64_EXTENDED */
10641069
1070+ #if ((LINUX_VERSION_CODE >= KERNEL_VERSION (3 , 0 , 0 )) && (LINUX_VERSION_CODE < KERNEL_VERSION (6 , 2 , 0 )))
1071+ #define ENA_PHC_SUPPORT_ADJFREQ
1072+ #endif /* ENA_PHC_SUPPORT_ADJFREQ */
1073+
10651074#if ((LINUX_VERSION_CODE < KERNEL_VERSION (3 , 7 , 0 )) && \
10661075 !(RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION (6 , 4 ))))
10671076#define ptp_clock_register (info , parent ) ptp_clock_register(info)
@@ -1093,7 +1102,10 @@ static inline void ena_netif_napi_add(struct net_device *dev,
10931102 int (* poll )(struct napi_struct * , int ))
10941103{
10951104#if (LINUX_VERSION_CODE < KERNEL_VERSION (6 , 1 , 0 )) && \
1096- !(RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION (9 , 2 )))
1105+ !(RHEL_RELEASE_CODE && \
1106+ ((RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION (8 , 8 )) && \
1107+ (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION (9 , 0 ))) || \
1108+ (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION (9 , 2 )))
10971109#ifndef NAPI_POLL_WEIGHT
10981110#define NAPI_POLL_WEIGHT 64
10991111#endif
@@ -1103,6 +1115,11 @@ static inline void ena_netif_napi_add(struct net_device *dev,
11031115#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0) */
11041116}
11051117
1118+ #if defined(ENA_DEVLINK_SUPPORT ) && LINUX_VERSION_CODE < KERNEL_VERSION (6 , 3 , 0 )
1119+ #define devl_param_driverinit_value_get devlink_param_driverinit_value_get
1120+ #define devl_param_driverinit_value_set devlink_param_driverinit_value_set
1121+ #endif
1122+
11061123#if (RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE <= RHEL_RELEASE_VERSION (7 , 4 ))) || \
11071124 (defined(UBUNTU_VERSION_CODE ) && UBUNTU_VERSION_CODE < UBUNTU_VERSION (4 , 5 , 0 , 0 )) || \
11081125 (defined(IS_UEK ) && !ENA_KERNEL_VERSION_GTE (4 , 1 , 12 , 105 , 0 , 0 ))
0 commit comments