The build error observed with Linux kernel 4.19 when KNI ethtool
support enabled (CONFIG_RTE_KNI_KMOD_ETHTOOL=y)
.../build/build/kernel/linux/kni/kni_ethtool.c:193:3:
   error: ‘struct ethtool_ops’ has no member named ‘get_settings’;
  .get_settings  = kni_get_settings,
   ^~~~~~~~~~~~
.../build/build/kernel/linux/kni/kni_ethtool.c:194:3:
   error: ‘struct ethtool_ops’ has no member named ‘set_settings’;
  .set_settings  = kni_set_settings,
   ^~~~~~~~~~~~
With kernel 4.19 ethtool_ops `get_settings` & `set_settings` are
replaced with `get_link_ksettings` & `set_link_ksettings`
Commit 
9b3004953503 ("ethtool: drop get_settings and set_settings callbacks")
This fix practically removes `get_settings` & `set_settings` support
for the kernel versions that have the new ethtool_ops without
implementing the new ones.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 #define IGB_TEST_LEN (sizeof(igb_gstrings_test) / ETH_GSTRING_LEN)
 #endif /* ETHTOOL_TEST */
 
+#ifndef ETHTOOL_GLINKSETTINGS
 static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
 {
        struct igb_adapter *adapter = netdev_priv(netdev);
 #endif /* ETH_TP_MDI_X */
        return 0;
 }
+#endif
 
+#ifndef ETHTOOL_SLINKSETTINGS
 static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
 {
        struct igb_adapter *adapter = netdev_priv(netdev);
        clear_bit(__IGB_RESETTING, &adapter->state);
        return 0;
 }
+#endif
 
 static u32 igb_get_link(struct net_device *netdev)
 {
 #endif /* ETHTOOL_GRXRINGS */
 
 static const struct ethtool_ops igb_ethtool_ops = {
+#ifndef ETHTOOL_GLINKSETTINGS
        .get_settings           = igb_get_settings,
+#endif
+#ifndef ETHTOOL_SLINKSETTINGS
        .set_settings           = igb_set_settings,
+#endif
        .get_drvinfo            = igb_get_drvinfo,
        .get_regs_len           = igb_get_regs_len,
        .get_regs               = igb_get_regs,
 
 #endif /* CONFIG_DCB */
 
 extern void ixgbe_clean_rx_ring(struct ixgbe_ring *rx_ring);
+#ifndef ETHTOOL_GLINKSETTINGS
 extern int ixgbe_get_settings(struct net_device *netdev,
                              struct ethtool_cmd *ecmd);
+#endif
 extern int ixgbe_write_uc_addr_list(struct ixgbe_adapter *adapter,
                            struct net_device *netdev, unsigned int vfn);
 extern void ixgbe_full_sync_mac_table(struct ixgbe_adapter *adapter);
 
 #define IXGBE_TEST_LEN (sizeof(ixgbe_gstrings_test) / ETH_GSTRING_LEN)
 #endif /* ETHTOOL_TEST */
 
+#ifndef ETHTOOL_GLINKSETTINGS
 int ixgbe_get_settings(struct net_device *netdev,
                       struct ethtool_cmd *ecmd)
 {
 
        return 0;
 }
+#endif
 
+#ifndef ETHTOOL_SLINKSETTINGS
 static int ixgbe_set_settings(struct net_device *netdev,
                              struct ethtool_cmd *ecmd)
 {
        }
        return err;
 }
+#endif
 
 static void ixgbe_get_pauseparam(struct net_device *netdev,
                                 struct ethtool_pauseparam *pause)
 #endif /* ETHTOOL_GRXRINGS */
 //static
 struct ethtool_ops ixgbe_ethtool_ops = {
+#ifndef ETHTOOL_GLINKSETTINGS
        .get_settings           = ixgbe_get_settings,
+#endif
+#ifndef ETHTOOL_SLINKSETTINGS
        .set_settings           = ixgbe_set_settings,
+#endif
        .get_drvinfo            = ixgbe_get_drvinfo,
        .get_regs_len           = ixgbe_get_regs_len,
        .get_regs               = ixgbe_get_regs,
 
        priv->lad_dev->ethtool_ops->get_drvinfo(priv->lad_dev, info);
 }
 
+/* ETHTOOL_GLINKSETTINGS replaces ETHTOOL_GSET */
+#ifndef ETHTOOL_GLINKSETTINGS
 static int
 kni_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
 {
 
        return priv->lad_dev->ethtool_ops->get_settings(priv->lad_dev, ecmd);
 }
+#endif
 
+/* ETHTOOL_SLINKSETTINGS replaces ETHTOOL_SSET */
+#ifndef ETHTOOL_SLINKSETTINGS
 static int
 kni_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
 {
 
        return priv->lad_dev->ethtool_ops->set_settings(priv->lad_dev, ecmd);
 }
+#endif
 
 static void
 kni_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
 struct ethtool_ops kni_ethtool_ops = {
        .begin                  = kni_check_if_running,
        .get_drvinfo            = kni_get_drvinfo,
+#ifndef ETHTOOL_GLINKSETTINGS
        .get_settings           = kni_get_settings,
+#endif
+#ifndef ETHTOOL_SLINKSETTINGS
        .set_settings           = kni_set_settings,
+#endif
        .get_regs_len           = kni_get_regs_len,
        .get_regs               = kni_get_regs,
        .get_wol                = kni_get_wol,