Commit da109a29 authored by Thomas Haller's avatar Thomas Haller

all/ethtool: add support for all currently supported kernel features

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":

    #define NETIF_F_NEVER_CHANGE (NETIF_F_VLAN_CHALLENGED | \
                                  NETIF_F_LLTX | NETIF_F_NETNS_LOCAL)
parent 9e7c960f
......@@ -5871,19 +5871,58 @@ static const NMMetaPropertyInfo *const property_infos_DCB[] = {
#undef _CURRENT_NM_META_SETTING_TYPE
#define _CURRENT_NM_META_SETTING_TYPE NM_META_SETTING_TYPE_ETHTOOL
static const NMMetaPropertyInfo *const property_infos_ETHTOOL[] = {
PROPERTY_INFO_ETHTOOL (FEATURE_ESP_HW_OFFLOAD),
PROPERTY_INFO_ETHTOOL (FEATURE_ESP_TX_CSUM_HW_OFFLOAD),
PROPERTY_INFO_ETHTOOL (FEATURE_FCOE_MTU),
PROPERTY_INFO_ETHTOOL (FEATURE_GRO),
PROPERTY_INFO_ETHTOOL (FEATURE_GSO),
PROPERTY_INFO_ETHTOOL (FEATURE_HIGHDMA),
PROPERTY_INFO_ETHTOOL (FEATURE_HW_TC_OFFLOAD),
PROPERTY_INFO_ETHTOOL (FEATURE_L2_FWD_OFFLOAD),
PROPERTY_INFO_ETHTOOL (FEATURE_LOOPBACK),
PROPERTY_INFO_ETHTOOL (FEATURE_LRO),
PROPERTY_INFO_ETHTOOL (FEATURE_NTUPLE),
PROPERTY_INFO_ETHTOOL (FEATURE_RX),
PROPERTY_INFO_ETHTOOL (FEATURE_RXHASH),
PROPERTY_INFO_ETHTOOL (FEATURE_RXVLAN),
PROPERTY_INFO_ETHTOOL (FEATURE_RX_ALL),
PROPERTY_INFO_ETHTOOL (FEATURE_RX_FCS),
PROPERTY_INFO_ETHTOOL (FEATURE_RX_GRO_HW),
PROPERTY_INFO_ETHTOOL (FEATURE_RX_UDP_TUNNEL_PORT_OFFLOAD),
PROPERTY_INFO_ETHTOOL (FEATURE_RX_VLAN_FILTER),
PROPERTY_INFO_ETHTOOL (FEATURE_RX_VLAN_STAG_FILTER),
PROPERTY_INFO_ETHTOOL (FEATURE_RX_VLAN_STAG_HW_PARSE),
PROPERTY_INFO_ETHTOOL (FEATURE_SG),
PROPERTY_INFO_ETHTOOL (FEATURE_TLS_HW_RECORD),
PROPERTY_INFO_ETHTOOL (FEATURE_TLS_HW_TX_OFFLOAD),
PROPERTY_INFO_ETHTOOL (FEATURE_TSO),
PROPERTY_INFO_ETHTOOL (FEATURE_TX),
PROPERTY_INFO_ETHTOOL (FEATURE_TXVLAN),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_CHECKSUM_FCOE_CRC),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_CHECKSUM_IPV4),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_CHECKSUM_IPV6),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_CHECKSUM_IP_GENERIC),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_CHECKSUM_SCTP),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_ESP_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_FCOE_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_GRE_CSUM_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_GRE_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_GSO_PARTIAL),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_GSO_ROBUST),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_IPXIP4_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_IPXIP6_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_NOCACHE_COPY),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_SCATTER_GATHER),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_SCATTER_GATHER_FRAGLIST),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_SCTP_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_TCP6_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_TCP_ECN_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_TCP_MANGLEID_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_TCP_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_UDP_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_UDP_TNL_CSUM_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_UDP_TNL_SEGMENTATION),
PROPERTY_INFO_ETHTOOL (FEATURE_TX_VLAN_STAG_HW_INSERT),
NULL,
};
......
......@@ -31,19 +31,58 @@ G_BEGIN_DECLS
/*****************************************************************************/
#define NM_ETHTOOL_OPTNAME_FEATURE_GRO "feature-gro"
#define NM_ETHTOOL_OPTNAME_FEATURE_GSO "feature-gso"
#define NM_ETHTOOL_OPTNAME_FEATURE_LRO "feature-lro"
#define NM_ETHTOOL_OPTNAME_FEATURE_NTUPLE "feature-ntuple"
#define NM_ETHTOOL_OPTNAME_FEATURE_RX "feature-rx"
#define NM_ETHTOOL_OPTNAME_FEATURE_RXHASH "feature-rxhash"
#define NM_ETHTOOL_OPTNAME_FEATURE_RXVLAN "feature-rxvlan"
#define NM_ETHTOOL_OPTNAME_FEATURE_SG "feature-sg"
#define NM_ETHTOOL_OPTNAME_FEATURE_TSO "feature-tso"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX "feature-tx"
#define NM_ETHTOOL_OPTNAME_FEATURE_TXVLAN "feature-txvlan"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP6_SEGMENTATION "feature-tx-tcp6-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP_SEGMENTATION "feature-tx-tcp-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_ESP_HW_OFFLOAD "feature-esp-hw-offload"
#define NM_ETHTOOL_OPTNAME_FEATURE_ESP_TX_CSUM_HW_OFFLOAD "feature-esp-tx-csum-hw-offload"
#define NM_ETHTOOL_OPTNAME_FEATURE_FCOE_MTU "feature-fcoe-mtu"
#define NM_ETHTOOL_OPTNAME_FEATURE_GRO "feature-gro"
#define NM_ETHTOOL_OPTNAME_FEATURE_GSO "feature-gso"
#define NM_ETHTOOL_OPTNAME_FEATURE_HIGHDMA "feature-highdma"
#define NM_ETHTOOL_OPTNAME_FEATURE_HW_TC_OFFLOAD "feature-hw-tc-offload"
#define NM_ETHTOOL_OPTNAME_FEATURE_L2_FWD_OFFLOAD "feature-l2-fwd-offload"
#define NM_ETHTOOL_OPTNAME_FEATURE_LOOPBACK "feature-loopback"
#define NM_ETHTOOL_OPTNAME_FEATURE_LRO "feature-lro"
#define NM_ETHTOOL_OPTNAME_FEATURE_NTUPLE "feature-ntuple"
#define NM_ETHTOOL_OPTNAME_FEATURE_RX "feature-rx"
#define NM_ETHTOOL_OPTNAME_FEATURE_RXHASH "feature-rxhash"
#define NM_ETHTOOL_OPTNAME_FEATURE_RXVLAN "feature-rxvlan"
#define NM_ETHTOOL_OPTNAME_FEATURE_RX_ALL "feature-rx-all"
#define NM_ETHTOOL_OPTNAME_FEATURE_RX_FCS "feature-rx-fcs"
#define NM_ETHTOOL_OPTNAME_FEATURE_RX_GRO_HW "feature-rx-gro-hw"
#define NM_ETHTOOL_OPTNAME_FEATURE_RX_UDP_TUNNEL_PORT_OFFLOAD "feature-rx-udp_tunnel-port-offload"
#define NM_ETHTOOL_OPTNAME_FEATURE_RX_VLAN_FILTER "feature-rx-vlan-filter"
#define NM_ETHTOOL_OPTNAME_FEATURE_RX_VLAN_STAG_FILTER "feature-rx-vlan-stag-filter"
#define NM_ETHTOOL_OPTNAME_FEATURE_RX_VLAN_STAG_HW_PARSE "feature-rx-vlan-stag-hw-parse"
#define NM_ETHTOOL_OPTNAME_FEATURE_SG "feature-sg"
#define NM_ETHTOOL_OPTNAME_FEATURE_TLS_HW_RECORD "feature-tls-hw-record"
#define NM_ETHTOOL_OPTNAME_FEATURE_TLS_HW_TX_OFFLOAD "feature-tls-hw-tx-offload"
#define NM_ETHTOOL_OPTNAME_FEATURE_TSO "feature-tso"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX "feature-tx"
#define NM_ETHTOOL_OPTNAME_FEATURE_TXVLAN "feature-txvlan"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_CHECKSUM_FCOE_CRC "feature-tx-checksum-fcoe-crc"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_CHECKSUM_IPV4 "feature-tx-checksum-ipv4"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_CHECKSUM_IPV6 "feature-tx-checksum-ipv6"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_CHECKSUM_IP_GENERIC "feature-tx-checksum-ip-generic"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_CHECKSUM_SCTP "feature-tx-checksum-sctp"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_ESP_SEGMENTATION "feature-tx-esp-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_FCOE_SEGMENTATION "feature-tx-fcoe-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_GRE_CSUM_SEGMENTATION "feature-tx-gre-csum-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_GRE_SEGMENTATION "feature-tx-gre-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_GSO_PARTIAL "feature-tx-gso-partial"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_GSO_ROBUST "feature-tx-gso-robust"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_IPXIP4_SEGMENTATION "feature-tx-ipxip4-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_IPXIP6_SEGMENTATION "feature-tx-ipxip6-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_NOCACHE_COPY "feature-tx-nocache-copy"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_SCATTER_GATHER "feature-tx-scatter-gather"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_SCATTER_GATHER_FRAGLIST "feature-tx-scatter-gather-fraglist"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_SCTP_SEGMENTATION "feature-tx-sctp-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP6_SEGMENTATION "feature-tx-tcp6-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP_ECN_SEGMENTATION "feature-tx-tcp-ecn-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP_MANGLEID_SEGMENTATION "feature-tx-tcp-mangleid-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_TCP_SEGMENTATION "feature-tx-tcp-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_UDP_SEGMENTATION "feature-tx-udp-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_UDP_TNL_CSUM_SEGMENTATION "feature-tx-udp_tnl-csum-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_UDP_TNL_SEGMENTATION "feature-tx-udp_tnl-segmentation"
#define NM_ETHTOOL_OPTNAME_FEATURE_TX_VLAN_STAG_HW_INSERT "feature-tx-vlan-stag-hw-insert"
gboolean nm_ethtool_optname_is_feature (const char *optname);
......
......@@ -35,36 +35,114 @@
const NMEthtoolData *const nm_ethtool_data[_NM_ETHTOOL_ID_NUM + 1] = {
/* indexed by NMEthtoolID */
ETHT_DATA (FEATURE_ESP_HW_OFFLOAD),
ETHT_DATA (FEATURE_ESP_TX_CSUM_HW_OFFLOAD),
ETHT_DATA (FEATURE_FCOE_MTU),
ETHT_DATA (FEATURE_GRO),
ETHT_DATA (FEATURE_GSO),
ETHT_DATA (FEATURE_HIGHDMA),
ETHT_DATA (FEATURE_HW_TC_OFFLOAD),
ETHT_DATA (FEATURE_L2_FWD_OFFLOAD),
ETHT_DATA (FEATURE_LOOPBACK),
ETHT_DATA (FEATURE_LRO),
ETHT_DATA (FEATURE_NTUPLE),
ETHT_DATA (FEATURE_RX),
ETHT_DATA (FEATURE_RXHASH),
ETHT_DATA (FEATURE_RXVLAN),
ETHT_DATA (FEATURE_RX_ALL),
ETHT_DATA (FEATURE_RX_FCS),
ETHT_DATA (FEATURE_RX_GRO_HW),
ETHT_DATA (FEATURE_RX_UDP_TUNNEL_PORT_OFFLOAD),
ETHT_DATA (FEATURE_RX_VLAN_FILTER),
ETHT_DATA (FEATURE_RX_VLAN_STAG_FILTER),
ETHT_DATA (FEATURE_RX_VLAN_STAG_HW_PARSE),
ETHT_DATA (FEATURE_SG),
ETHT_DATA (FEATURE_TLS_HW_RECORD),
ETHT_DATA (FEATURE_TLS_HW_TX_OFFLOAD),
ETHT_DATA (FEATURE_TSO),
ETHT_DATA (FEATURE_TX),
ETHT_DATA (FEATURE_TXVLAN),
ETHT_DATA (FEATURE_TX_CHECKSUM_FCOE_CRC),
ETHT_DATA (FEATURE_TX_CHECKSUM_IPV4),
ETHT_DATA (FEATURE_TX_CHECKSUM_IPV6),
ETHT_DATA (FEATURE_TX_CHECKSUM_IP_GENERIC),
ETHT_DATA (FEATURE_TX_CHECKSUM_SCTP),
ETHT_DATA (FEATURE_TX_ESP_SEGMENTATION),
ETHT_DATA (FEATURE_TX_FCOE_SEGMENTATION),
ETHT_DATA (FEATURE_TX_GRE_CSUM_SEGMENTATION),
ETHT_DATA (FEATURE_TX_GRE_SEGMENTATION),
ETHT_DATA (FEATURE_TX_GSO_PARTIAL),
ETHT_DATA (FEATURE_TX_GSO_ROBUST),
ETHT_DATA (FEATURE_TX_IPXIP4_SEGMENTATION),
ETHT_DATA (FEATURE_TX_IPXIP6_SEGMENTATION),
ETHT_DATA (FEATURE_TX_NOCACHE_COPY),
ETHT_DATA (FEATURE_TX_SCATTER_GATHER),
ETHT_DATA (FEATURE_TX_SCATTER_GATHER_FRAGLIST),
ETHT_DATA (FEATURE_TX_SCTP_SEGMENTATION),
ETHT_DATA (FEATURE_TX_TCP6_SEGMENTATION),
ETHT_DATA (FEATURE_TX_TCP_ECN_SEGMENTATION),
ETHT_DATA (FEATURE_TX_TCP_MANGLEID_SEGMENTATION),
ETHT_DATA (FEATURE_TX_TCP_SEGMENTATION),
ETHT_DATA (FEATURE_TX_UDP_SEGMENTATION),
ETHT_DATA (FEATURE_TX_UDP_TNL_CSUM_SEGMENTATION),
ETHT_DATA (FEATURE_TX_UDP_TNL_SEGMENTATION),
ETHT_DATA (FEATURE_TX_VLAN_STAG_HW_INSERT),
[_NM_ETHTOOL_ID_NUM] = NULL,
};
const guint8 const _by_name[_NM_ETHTOOL_ID_NUM] = {
/* sorted by optname. */
NM_ETHTOOL_ID_FEATURE_ESP_HW_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_ESP_TX_CSUM_HW_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_FCOE_MTU,
NM_ETHTOOL_ID_FEATURE_GRO,
NM_ETHTOOL_ID_FEATURE_GSO,
NM_ETHTOOL_ID_FEATURE_HIGHDMA,
NM_ETHTOOL_ID_FEATURE_HW_TC_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_L2_FWD_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_LOOPBACK,
NM_ETHTOOL_ID_FEATURE_LRO,
NM_ETHTOOL_ID_FEATURE_NTUPLE,
NM_ETHTOOL_ID_FEATURE_RX,
NM_ETHTOOL_ID_FEATURE_RX_ALL,
NM_ETHTOOL_ID_FEATURE_RX_FCS,
NM_ETHTOOL_ID_FEATURE_RX_GRO_HW,
NM_ETHTOOL_ID_FEATURE_RX_UDP_TUNNEL_PORT_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_RX_VLAN_FILTER,
NM_ETHTOOL_ID_FEATURE_RX_VLAN_STAG_FILTER,
NM_ETHTOOL_ID_FEATURE_RX_VLAN_STAG_HW_PARSE,
NM_ETHTOOL_ID_FEATURE_RXHASH,
NM_ETHTOOL_ID_FEATURE_RXVLAN,
NM_ETHTOOL_ID_FEATURE_SG,
NM_ETHTOOL_ID_FEATURE_TLS_HW_RECORD,
NM_ETHTOOL_ID_FEATURE_TLS_HW_TX_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_TSO,
NM_ETHTOOL_ID_FEATURE_TX,
NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_FCOE_CRC,
NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IP_GENERIC,
NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IPV4,
NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IPV6,
NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_SCTP,
NM_ETHTOOL_ID_FEATURE_TX_ESP_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_FCOE_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_GRE_CSUM_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_GRE_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_GSO_PARTIAL,
NM_ETHTOOL_ID_FEATURE_TX_GSO_ROBUST,
NM_ETHTOOL_ID_FEATURE_TX_IPXIP4_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_IPXIP6_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_NOCACHE_COPY,
NM_ETHTOOL_ID_FEATURE_TX_SCATTER_GATHER,
NM_ETHTOOL_ID_FEATURE_TX_SCATTER_GATHER_FRAGLIST,
NM_ETHTOOL_ID_FEATURE_TX_SCTP_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_TCP_ECN_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_TCP_MANGLEID_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_TCP_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_TCP6_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_UDP_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_UDP_TNL_CSUM_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_UDP_TNL_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_VLAN_STAG_HW_INSERT,
NM_ETHTOOL_ID_FEATURE_TXVLAN,
};
......
......@@ -29,20 +29,59 @@ typedef enum {
_NM_ETHTOOL_ID_FIRST = 0,
_NM_ETHTOOL_ID_FEATURE_FIRST = _NM_ETHTOOL_ID_FIRST,
NM_ETHTOOL_ID_FEATURE_GRO = _NM_ETHTOOL_ID_FEATURE_FIRST,
NM_ETHTOOL_ID_FEATURE_ESP_HW_OFFLOAD = _NM_ETHTOOL_ID_FEATURE_FIRST,
NM_ETHTOOL_ID_FEATURE_ESP_TX_CSUM_HW_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_FCOE_MTU,
NM_ETHTOOL_ID_FEATURE_GRO,
NM_ETHTOOL_ID_FEATURE_GSO,
NM_ETHTOOL_ID_FEATURE_HIGHDMA,
NM_ETHTOOL_ID_FEATURE_HW_TC_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_L2_FWD_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_LOOPBACK,
NM_ETHTOOL_ID_FEATURE_LRO,
NM_ETHTOOL_ID_FEATURE_NTUPLE,
NM_ETHTOOL_ID_FEATURE_RX,
NM_ETHTOOL_ID_FEATURE_RXHASH,
NM_ETHTOOL_ID_FEATURE_RXVLAN,
NM_ETHTOOL_ID_FEATURE_RX_ALL,
NM_ETHTOOL_ID_FEATURE_RX_FCS,
NM_ETHTOOL_ID_FEATURE_RX_GRO_HW,
NM_ETHTOOL_ID_FEATURE_RX_UDP_TUNNEL_PORT_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_RX_VLAN_FILTER,
NM_ETHTOOL_ID_FEATURE_RX_VLAN_STAG_FILTER,
NM_ETHTOOL_ID_FEATURE_RX_VLAN_STAG_HW_PARSE,
NM_ETHTOOL_ID_FEATURE_SG,
NM_ETHTOOL_ID_FEATURE_TLS_HW_RECORD,
NM_ETHTOOL_ID_FEATURE_TLS_HW_TX_OFFLOAD,
NM_ETHTOOL_ID_FEATURE_TSO,
NM_ETHTOOL_ID_FEATURE_TX,
NM_ETHTOOL_ID_FEATURE_TXVLAN,
NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_FCOE_CRC,
NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IPV4,
NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IPV6,
NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IP_GENERIC,
NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_SCTP,
NM_ETHTOOL_ID_FEATURE_TX_ESP_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_FCOE_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_GRE_CSUM_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_GRE_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_GSO_PARTIAL,
NM_ETHTOOL_ID_FEATURE_TX_GSO_ROBUST,
NM_ETHTOOL_ID_FEATURE_TX_IPXIP4_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_IPXIP6_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_NOCACHE_COPY,
NM_ETHTOOL_ID_FEATURE_TX_SCATTER_GATHER,
NM_ETHTOOL_ID_FEATURE_TX_SCATTER_GATHER_FRAGLIST,
NM_ETHTOOL_ID_FEATURE_TX_SCTP_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_TCP6_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_TCP_ECN_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_TCP_MANGLEID_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_TCP_SEGMENTATION,
_NM_ETHTOOL_ID_FEATURE_LAST = NM_ETHTOOL_ID_FEATURE_TX_TCP_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_UDP_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_UDP_TNL_CSUM_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_UDP_TNL_SEGMENTATION,
NM_ETHTOOL_ID_FEATURE_TX_VLAN_STAG_HW_INSERT,
_NM_ETHTOOL_ID_FEATURE_LAST = NM_ETHTOOL_ID_FEATURE_TX_VLAN_STAG_HW_INSERT,
_NM_ETHTOOL_ID_FEATURE_NUM = (_NM_ETHTOOL_ID_FEATURE_LAST - _NM_ETHTOOL_ID_FEATURE_FIRST + 1),
_NM_ETHTOOL_ID_LAST = _NM_ETHTOOL_ID_FEATURE_LAST,
......
......@@ -276,31 +276,70 @@ static const NMEthtoolFeatureInfo _ethtool_feature_infos[_NM_ETHTOOL_ID_FEATURE_
* ("feature-tx-tcp-segmentation"). */
/* names from ethtool utility, which are aliases for multiple features. */
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_SG, "tx-scatter-gather",
"tx-scatter-gather-fraglist"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TSO, "tx-tcp-segmentation",
"tx-tcp-ecn-segmentation",
"tx-tcp-mangleid-segmentation",
"tx-tcp6-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX, "tx-checksum-ipv4",
"tx-checksum-ip-generic",
"tx-checksum-ipv6",
"tx-checksum-fcoe-crc",
"tx-checksum-sctp"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_SG, "tx-scatter-gather",
"tx-scatter-gather-fraglist"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TSO, "tx-tcp-segmentation",
"tx-tcp-ecn-segmentation",
"tx-tcp-mangleid-segmentation",
"tx-tcp6-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX, "tx-checksum-ipv4",
"tx-checksum-ip-generic",
"tx-checksum-ipv6",
"tx-checksum-fcoe-crc",
"tx-checksum-sctp"),
/* names from ethtool utility, which are aliases for one feature. */
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_GRO, "rx-gro"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_GSO, "tx-generic-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_LRO, "rx-lro"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_NTUPLE, "rx-ntuple-filter"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RX, "rx-checksum"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RXHASH, "rx-hashing"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RXVLAN, "rx-vlan-hw-parse"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TXVLAN, "tx-vlan-hw-insert"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_GRO, "rx-gro"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_GSO, "tx-generic-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_LRO, "rx-lro"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_NTUPLE, "rx-ntuple-filter"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RX, "rx-checksum"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RXHASH, "rx-hashing"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RXVLAN, "rx-vlan-hw-parse"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TXVLAN, "tx-vlan-hw-insert"),
/* names of features, as known by kernel. */
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_TCP6_SEGMENTATION, "tx-tcp6-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_TCP_SEGMENTATION, "tx-tcp-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_ESP_HW_OFFLOAD, "esp-hw-offload"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_ESP_TX_CSUM_HW_OFFLOAD, "esp-tx-csum-hw-offload"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_FCOE_MTU, "fcoe-mtu"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_HIGHDMA, "highdma"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_HW_TC_OFFLOAD, "hw-tc-offload"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_L2_FWD_OFFLOAD, "l2-fwd-offload"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_LOOPBACK, "loopback"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RX_ALL, "rx-all"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RX_FCS, "rx-fcs"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RX_GRO_HW, "rx-gro-hw"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RX_UDP_TUNNEL_PORT_OFFLOAD, "rx-udp_tunnel-port-offload"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RX_VLAN_FILTER, "rx-vlan-filter"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RX_VLAN_STAG_FILTER, "rx-vlan-stag-filter"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_RX_VLAN_STAG_HW_PARSE, "rx-vlan-stag-hw-parse"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TLS_HW_RECORD, "tls-hw-record"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TLS_HW_TX_OFFLOAD, "tls-hw-tx-offload"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_FCOE_CRC, "tx-checksum-fcoe-crc"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IPV4, "tx-checksum-ipv4"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IPV6, "tx-checksum-ipv6"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IP_GENERIC, "tx-checksum-ip-generic"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_SCTP, "tx-checksum-sctp"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_ESP_SEGMENTATION, "tx-esp-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_FCOE_SEGMENTATION, "tx-fcoe-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_GRE_CSUM_SEGMENTATION, "tx-gre-csum-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_GRE_SEGMENTATION, "tx-gre-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_GSO_PARTIAL, "tx-gso-partial"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_GSO_ROBUST, "tx-gso-robust"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_IPXIP4_SEGMENTATION, "tx-ipxip4-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_IPXIP6_SEGMENTATION, "tx-ipxip6-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_NOCACHE_COPY, "tx-nocache-copy"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_SCATTER_GATHER, "tx-scatter-gather"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_SCATTER_GATHER_FRAGLIST, "tx-scatter-gather-fraglist"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_SCTP_SEGMENTATION, "tx-sctp-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_TCP6_SEGMENTATION, "tx-tcp6-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_TCP_ECN_SEGMENTATION, "tx-tcp-ecn-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_TCP_MANGLEID_SEGMENTATION, "tx-tcp-mangleid-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_TCP_SEGMENTATION, "tx-tcp-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_UDP_SEGMENTATION, "tx-udp-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_UDP_TNL_CSUM_SEGMENTATION, "tx-udp_tnl-csum-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_UDP_TNL_SEGMENTATION, "tx-udp_tnl-segmentation"),
ETHT_FEAT (NM_ETHTOOL_ID_FEATURE_TX_VLAN_STAG_HW_INSERT, "tx-vlan-stag-hw-insert"),
};
/* the number of kernel features that we handle. It essentially is the sum of all
......
......@@ -477,19 +477,58 @@ const char *const _nm_ethtool_ifcfg_names[] = {
#define ETHT_NAME(eid, ename) \
[eid - _NM_ETHTOOL_ID_FEATURE_FIRST] = ""ename""
/* indexed by NMEthtoolID - _NM_ETHTOOL_ID_FEATURE_FIRST */
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_GRO, "gro"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_GSO, "gso"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_LRO, "lro"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_NTUPLE, "ntuple"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RX, "rx"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RXHASH, "rxhash"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RXVLAN, "rxvlan"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_SG, "sg"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TSO, "tso"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX, "tx"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TXVLAN, "txvlan"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_TCP6_SEGMENTATION, "tx-tcp6-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_TCP_SEGMENTATION, "tx-tcp-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_ESP_HW_OFFLOAD, "esp-hw-offload"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_ESP_TX_CSUM_HW_OFFLOAD, "esp-tx-csum-hw-offload"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_FCOE_MTU, "fcoe-mtu"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_GRO, "gro"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_GSO, "gso"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_HIGHDMA, "highdma"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_HW_TC_OFFLOAD, "hw-tc-offload"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_L2_FWD_OFFLOAD, "l2-fwd-offload"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_LOOPBACK, "loopback"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_LRO, "lro"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_NTUPLE, "ntuple"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RX, "rx"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RXHASH, "rxhash"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RXVLAN, "rxvlan"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RX_ALL, "rx-all"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RX_FCS, "rx-fcs"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RX_GRO_HW, "rx-gro-hw"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RX_UDP_TUNNEL_PORT_OFFLOAD, "rx-udp_tunnel-port-offload"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RX_VLAN_FILTER, "rx-vlan-filter"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RX_VLAN_STAG_FILTER, "rx-vlan-stag-filter"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_RX_VLAN_STAG_HW_PARSE, "rx-vlan-stag-hw-parse"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_SG, "sg"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TLS_HW_RECORD, "tls-hw-record"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TLS_HW_TX_OFFLOAD, "tls-hw-tx-offload"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TSO, "tso"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX, "tx"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TXVLAN, "txvlan"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_FCOE_CRC, "tx-checksum-fcoe-crc"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IPV4, "tx-checksum-ipv4"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IPV6, "tx-checksum-ipv6"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_IP_GENERIC, "tx-checksum-ip-generic"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_CHECKSUM_SCTP, "tx-checksum-sctp"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_ESP_SEGMENTATION, "tx-esp-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_FCOE_SEGMENTATION, "tx-fcoe-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_GRE_CSUM_SEGMENTATION, "tx-gre-csum-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_GRE_SEGMENTATION, "tx-gre-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_GSO_PARTIAL, "tx-gso-partial"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_GSO_ROBUST, "tx-gso-robust"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_IPXIP4_SEGMENTATION, "tx-ipxip4-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_IPXIP6_SEGMENTATION, "tx-ipxip6-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_NOCACHE_COPY, "tx-nocache-copy"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_SCATTER_GATHER, "tx-scatter-gather"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_SCATTER_GATHER_FRAGLIST, "tx-scatter-gather-fraglist"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_SCTP_SEGMENTATION, "tx-sctp-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_TCP6_SEGMENTATION, "tx-tcp6-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_TCP_ECN_SEGMENTATION, "tx-tcp-ecn-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_TCP_MANGLEID_SEGMENTATION, "tx-tcp-mangleid-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_TCP_SEGMENTATION, "tx-tcp-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_UDP_SEGMENTATION, "tx-udp-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_UDP_TNL_CSUM_SEGMENTATION, "tx-udp_tnl-csum-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_UDP_TNL_SEGMENTATION, "tx-udp_tnl-segmentation"),
ETHT_NAME (NM_ETHTOOL_ID_FEATURE_TX_VLAN_STAG_HW_INSERT, "tx-vlan-stag-hw-insert"),
};
const NMEthtoolData *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment