Skip to content

Commit ab4d68f

Browse files
committed
Fix ethtool_ts_info compilation on all drivers on RH 9.6
1 parent be774e9 commit ab4d68f

File tree

12 files changed

+65
-7
lines changed

12 files changed

+65
-7
lines changed

drivers/intel/e1000e/e1000e-3.8.7-zc/src/ethtool.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2810,7 +2810,12 @@ static int e1000e_set_eee(struct net_device *netdev,
28102810

28112811
#ifdef ETHTOOL_GET_TS_INFO
28122812
static int e1000e_get_ts_info(struct net_device *netdev,
2813-
struct ethtool_ts_info *info)
2813+
#ifdef HAVE_ETHTOOL_GET_TS_KERNEL
2814+
struct kernel_ethtool_ts_info *info
2815+
#else
2816+
struct ethtool_ts_info *info
2817+
#endif
2818+
)
28142819
{
28152820
struct e1000_adapter *adapter = netdev_priv(netdev);
28162821

drivers/intel/e1000e/e1000e-3.8.7-zc/src/kcompat.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7501,6 +7501,11 @@ static inline int pci_enable_pcie_error_reporting(struct pci_dev __always_unused
75017501
#define HAVE_ETHTOOL_KEEE
75027502
#endif
75037503

7504+
/* HAVE_PF_RING */
7505+
#if (RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,6)))
7506+
#define HAVE_ETHTOOL_GET_TS_KERNEL
7507+
#endif
7508+
75047509
#endif
75057510

75067511
#endif

drivers/intel/i40e/i40e-2.24.6-zc/src/i40e_ethtool.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3077,7 +3077,12 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset,
30773077

30783078
#ifdef HAVE_ETHTOOL_GET_TS_INFO
30793079
static int i40e_get_ts_info(struct net_device *dev,
3080-
struct ethtool_ts_info *info)
3080+
#ifdef HAVE_ETHTOOL_GET_TS_KERNEL
3081+
struct kernel_ethtool_ts_info *info
3082+
#else
3083+
struct ethtool_ts_info *info
3084+
#endif
3085+
)
30813086
{
30823087
#ifdef HAVE_PTP_1588_CLOCK
30833088
struct i40e_pf *pf = i40e_netdev_to_pf(dev);

drivers/intel/i40e/i40e-2.24.6-zc/src/kcompat.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7074,6 +7074,9 @@ _kc_napi_busy_loop(unsigned int napi_id,
70747074
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0))
70757075
#define strlcpy(...) (ssize_t)(strscpy(__VA_ARGS__))
70767076
#endif
7077+
#if (RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,6)))
7078+
#define HAVE_ETHTOOL_GET_TS_KERNEL
7079+
#endif
70777080

70787081
/*****************************************************************************/
70797082
/*

drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_ethtool.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,13 @@ static int iavf_set_rxfh(struct net_device *netdev, const u32 *indir,
12751275
* Based on device features enabled, report the Tx and Rx timestamp
12761276
* capabilities, as well as the PTP hardware clock index to user space.
12771277
*/
1278-
static int iavf_get_ts_info(struct net_device *netdev, struct ethtool_ts_info *info)
1278+
static int iavf_get_ts_info(struct net_device *netdev,
1279+
#ifdef HAVE_ETHTOOL_GET_TS_KERNEL
1280+
struct kernel_ethtool_ts_info *info
1281+
#else
1282+
struct ethtool_ts_info *info
1283+
#endif
1284+
)
12791285
{
12801286
struct iavf_adapter *adapter = netdev_priv(netdev);
12811287

drivers/intel/iavf/iavf-4.9.5-zc/src/kcompat.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6991,6 +6991,10 @@ _kc_napi_busy_loop(unsigned int napi_id,
69916991
#define xdp_do_flush_map() do {} while (0)
69926992
#endif
69936993

6994+
#if (RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,6)))
6995+
#define HAVE_ETHTOOL_GET_TS_KERNEL
6996+
#endif
6997+
69946998
/*****************************************************************************/
69956999
/*
69967000
* Load the implementations file which actually defines kcompat backports.

drivers/intel/ice/ice-1.12.7-zc/src/ice_ethtool.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4959,7 +4959,13 @@ ice_set_rxfh(struct net_device *netdev, const u32 *indir, const u8 *key)
49594959
#endif /* ETHTOOL_GRSSH && ETHTOOL_SRSSH */
49604960

49614961
static int
4962-
ice_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
4962+
ice_get_ts_info(struct net_device *dev,
4963+
#ifdef HAVE_ETHTOOL_GET_TS_KERNEL
4964+
struct kernel_ethtool_ts_info *info
4965+
#else
4966+
struct ethtool_ts_info *info
4967+
#endif
4968+
)
49634969
{
49644970
struct ice_pf *pf = ice_netdev_to_pf(dev);
49654971

drivers/intel/ice/ice-1.12.7-zc/src/kcompat.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3298,6 +3298,13 @@ _kc_napi_busy_loop(unsigned int napi_id,
32983298
#define HAVE_GRO_HEADER
32993299
#endif /* >=5.12.0 */
33003300

3301+
/*****************************************************************************/
3302+
3303+
/* HAVE_PF_RING */
3304+
#if (RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,6)))
3305+
#define HAVE_ETHTOOL_GET_TS_KERNEL
3306+
#endif
3307+
33013308
/*****************************************************************************/
33023309
/*
33033310
* Load the implementations file which actually defines kcompat backports.

drivers/intel/igb/igb-5.16.11-zc/src/igb_ethtool.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2610,7 +2610,12 @@ static void igb_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
26102610

26112611
#ifdef HAVE_ETHTOOL_GET_TS_INFO
26122612
static int igb_get_ts_info(struct net_device *dev,
2613-
struct ethtool_ts_info *info)
2613+
#ifdef HAVE_ETHTOOL_GET_TS_KERNEL
2614+
struct kernel_ethtool_ts_info *info
2615+
#else
2616+
struct ethtool_ts_info *info
2617+
#endif
2618+
)
26142619
{
26152620
struct igb_adapter *adapter = netdev_priv(dev);
26162621

drivers/intel/igb/igb-5.16.11-zc/src/kcompat.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6945,6 +6945,11 @@ _kc_napi_busy_loop(unsigned int napi_id,
69456945
#define HAVE_GRO_HEADER
69466946
#endif /* >=5.12.0 */
69476947

6948+
/* HAVE_PF_RING */
6949+
#if (RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,6)))
6950+
#define HAVE_ETHTOOL_GET_TS_KERNEL
6951+
#endif
6952+
69486953
/*****************************************************************************/
69496954
/* HAVE_PF_RING */
69506955
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0))

drivers/intel/ixgbe/ixgbe-5.19.6-zc/src/ixgbe_ethtool.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4495,7 +4495,12 @@ static int ixgbe_set_rxfh(struct net_device *netdev, const u32 *indir,
44954495

44964496
#ifdef HAVE_ETHTOOL_GET_TS_INFO
44974497
static int ixgbe_get_ts_info(struct net_device *dev,
4498-
struct ethtool_ts_info *info)
4498+
#ifdef HAVE_ETHTOOL_GET_TS_KERNEL
4499+
struct kernel_ethtool_ts_info *info
4500+
#else
4501+
struct ethtool_ts_info *info
4502+
#endif
4503+
)
44994504
{
45004505
struct ixgbe_adapter *adapter = netdev_priv(dev);
45014506

drivers/intel/ixgbe/ixgbe-5.19.6-zc/src/kcompat.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7092,9 +7092,11 @@ _kc_napi_busy_loop(unsigned int napi_id,
70927092
/*****************************************************************************/
70937093
/* HAVE_PF_RING */
70947094
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0))
7095-
70967095
#define strlcpy(...) (void)(strscpy(__VA_ARGS__))
7096+
#endif
70977097

7098+
#if (RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,6)))
7099+
#define HAVE_ETHTOOL_GET_TS_KERNEL
70987100
#endif
70997101

71007102
/*****************************************************************************/

0 commit comments

Comments
 (0)