1. 10 Aug, 2018 3 commits
    • Thomas Haller's avatar
      all/ethtool: add support for all currently supported kernel features · da109a29
      Thomas Haller authored
      As of upstream kernel v4.18-rc8.
      Note that we name the features like they are called in ethtool's
      ioctl API ETH_SS_FEATURES.
      Except, for features like "tx-gro", which ethtool utility aliases
      as "gro". So, for those features where ethtool has a built-in,
      alternative name, we prefer the alias.
      And again, note that a few aliases of ethtool utility ("sg", "tso", "tx")
      actually affect more than one underlying kernel feature.
      Note that 3 kernel features which are announced via ETH_SS_FEATURES are
      explicitly exluded because kernel marks them as "never_changed":
                                        NETIF_F_LLTX | NETIF_F_NETNS_LOCAL)
    • Thomas Haller's avatar
      platform/ethtool: add code to get/set offload features via ethtool · c085b6e3
      Thomas Haller authored
      Also, add two more features "tx-tcp-segmentation" and
      "tx-tcp6-segmentation". There are two reasons for that:
       - systemd-networkd supports setting these two features,
         so lets support them too (apparently they are important
         enough for networkd).
       - these two features are already implicitly covered by "tso".
         Like for the "ethtool" program, "tso" is an alias for several
         actual features. By adding two features that are already
         also covered by an alias (which sets multiple kernel names
         at once), we showcase how aliases for the same feature can
         coexist. In particular, note how setting
         "tso on tx-tcp6-segmentation off" will behave as one would
         expect: all 4 tso features covered by the alias are enabled,
         except that particular one.
    • Thomas Haller's avatar
      libnm, cli, ifcfg-rh: add NMSettingEthtool setting · df30651b
      Thomas Haller authored
      Note that in NetworkManager API (D-Bus, libnm, and nmcli),
      the features are called "feature-xyz". The "feature-" prefix
      is used, because NMSettingEthtool possibly will gain support
      for options that are not only -K|--offload|--features, for
      example -C|--coalesce.
      The "xzy" suffix is either how ethtool utility calls the feature
      ("tso", "rx"). Or, if ethtool utility specifies no alias for that
      feature, it's the name from kernel's ETH_SS_FEATURES ("tx-tcp6-segmentation").
      If possible, we prefer ethtool utility's naming.
      Also note, how the features "feature-sg", "feature-tso", and
      "feature-tx" actually refer to multiple underlying kernel features
      at once. This too follows what ethtool utility does.
      The functionality is not yet implemented server-side.