From 0bdb080c70495ea4efbed7661b4fe6100bd5adde Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Thu, 21 Feb 2019 10:23:08 +0100 Subject: Revert "backports: Remove unused parts" This reverts commit ab3fd3b9a801a9faa2619e2e65207e736f859a6d. --- .../0038-ethtool_rxfh_indir/igb_rxfh_indir.patch | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch (limited to 'patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch') diff --git a/patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch b/patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch new file mode 100644 index 00000000..73666630 --- /dev/null +++ b/patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch @@ -0,0 +1,92 @@ +--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c ++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c +@@ -2860,19 +2860,28 @@ static void igb_ethtool_complete(struct + pm_runtime_put(&adapter->pdev->dev); + } + ++#if LINUX_VERSION_IS_GEQ(3,3,0) + static u32 igb_get_rxfh_indir_size(struct net_device *netdev) + { + return IGB_RETA_SIZE; + } + ++#if LINUX_VERSION_IS_GEQ(3,19,0) + static int igb_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, + u8 *hfunc) ++#elif LINUX_VERSION_IS_GEQ(3,16,0) ++static int igb_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key) ++#else ++static int igb_get_rxfh(struct net_device *netdev, u32 *indir) ++#endif + { + struct igb_adapter *adapter = netdev_priv(netdev); + int i; + ++#if LINUX_VERSION_IS_GEQ(3,19,0) + if (hfunc) + *hfunc = ETH_RSS_HASH_TOP; ++#endif + if (!indir) + return 0; + for (i = 0; i < IGB_RETA_SIZE; i++) +@@ -2880,6 +2889,7 @@ static int igb_get_rxfh(struct net_devic + + return 0; + } ++#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */ + + void igb_write_rss_indir_tbl(struct igb_adapter *adapter) + { +@@ -2916,18 +2926,28 @@ void igb_write_rss_indir_tbl(struct igb_ + } + } + ++#if LINUX_VERSION_IS_GEQ(3,3,0) ++#if LINUX_VERSION_IS_GEQ(3,19,0) + static int igb_set_rxfh(struct net_device *netdev, const u32 *indir, + const u8 *key, const u8 hfunc) ++#elif LINUX_VERSION_IS_GEQ(3,16,0) ++static int igb_set_rxfh(struct net_device *netdev, const u32 *indir, ++ const u8 *key) ++#else ++static int igb_set_rxfh(struct net_device *netdev, const u32 *indir) ++#endif + { + struct igb_adapter *adapter = netdev_priv(netdev); + struct e1000_hw *hw = &adapter->hw; + int i; + u32 num_queues; + ++#if LINUX_VERSION_IS_GEQ(3,19,0) + /* We do not allow change in unsupported parameters */ + if (key || + (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)) + return -EOPNOTSUPP; ++#endif + if (!indir) + return 0; + +@@ -2956,6 +2976,7 @@ static int igb_set_rxfh(struct net_devic + + return 0; + } ++#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */ + + static unsigned int igb_max_channels(struct igb_adapter *adapter) + { +@@ -3075,9 +3096,15 @@ static const struct ethtool_ops igb_etht + .set_eee = igb_set_eee, + .get_module_info = igb_get_module_info, + .get_module_eeprom = igb_get_module_eeprom, ++#if LINUX_VERSION_IS_GEQ(3,16,0) + .get_rxfh_indir_size = igb_get_rxfh_indir_size, + .get_rxfh = igb_get_rxfh, + .set_rxfh = igb_set_rxfh, ++#elif LINUX_VERSION_IS_GEQ(3,3,0) ++ .get_rxfh_indir_size = igb_get_rxfh_indir_size, ++ .get_rxfh_indir = igb_get_rxfh, ++ .set_rxfh_indir = igb_set_rxfh, ++#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */ + .get_channels = igb_get_channels, + .set_channels = igb_set_channels, + .begin = igb_ethtool_begin, -- cgit v1.2.3