Chapter 34. Configuring ethtool offload features

Network interface cards can use the TCP offload engine (TOE) to offload processing certain operations to the network controller to improve the network throughput.

34.1. Offload features supported by NetworkManager

You can set the following ethtool offload features using NetworkManager:

  • ethtool.feature-esp-hw-offload
  • ethtool.feature-esp-tx-csum-hw-offload
  • ethtool.feature-fcoe-mtu
  • ethtool.feature-gro
  • ethtool.feature-gso
  • ethtool.feature-highdma
  • ethtool.feature-hw-tc-offload
  • ethtool.feature-l2-fwd-offload
  • ethtool.feature-loopback
  • ethtool.feature-lro
  • ethtool.feature-macsec-hw-offload
  • ethtool.feature-ntuple
  • ethtool.feature-rx
  • ethtool.feature-rx-all
  • ethtool.feature-rx-fcs
  • ethtool.feature-rx-gro-hw
  • ethtool.feature-rx-gro-list
  • ethtool.feature-rx-udp_tunnel-port-offload
  • ethtool.feature-rx-udp-gro-forwarding
  • ethtool.feature-rx-vlan-filter
  • ethtool.feature-rx-vlan-stag-filter
  • ethtool.feature-rx-vlan-stag-hw-parse
  • ethtool.feature-rxhash
  • ethtool.feature-rxvlan
  • ethtool.feature-sg
  • ethtool.feature-tls-hw-record
  • ethtool.feature-tls-hw-rx-offload
  • ethtool.feature-tls-hw-tx-offload
  • ethtool.feature-tso
  • ethtool.feature-tx
  • ethtool.feature-tx-checksum-fcoe-crc
  • ethtool.feature-tx-checksum-ip-generic
  • ethtool.feature-tx-checksum-ipv4
  • ethtool.feature-tx-checksum-ipv6
  • ethtool.feature-tx-checksum-sctp
  • ethtool.feature-tx-esp-segmentation
  • ethtool.feature-tx-fcoe-segmentation
  • ethtool.feature-tx-gre-csum-segmentation
  • ethtool.feature-tx-gre-segmentation
  • ethtool.feature-tx-gso-list
  • ethtool.feature-tx-gso-partial
  • ethtool.feature-tx-gso-robust
  • ethtool.feature-tx-ipxip4-segmentation
  • ethtool.feature-tx-ipxip6-segmentation
  • ethtool.feature-tx-nocache-copy
  • ethtool.feature-tx-scatter-gather
  • ethtool.feature-tx-scatter-gather-fraglist
  • ethtool.feature-tx-sctp-segmentation
  • ethtool.feature-tx-tcp-ecn-segmentation
  • ethtool.feature-tx-tcp-mangleid-segmentation
  • ethtool.feature-tx-tcp-segmentation
  • ethtool.feature-tx-tcp6-segmentation
  • ethtool.feature-tx-tunnel-remcsum-segmentation
  • ethtool.feature-tx-udp-segmentation
  • ethtool.feature-tx-udp_tnl-csum-segmentation
  • ethtool.feature-tx-udp_tnl-segmentation
  • ethtool.feature-tx-vlan-stag-hw-insert
  • ethtool.feature-txvlan

For details about the individual offload features, see the documentation of the ethtool utility and the kernel documentation.

34.2. Configuring an ethtool offload feature by using nmcli

You can use NetworkManager to enable and disable ethtool offload features in a connection profile.

Procedure

  1. For example, to enable the RX offload feature and disable TX offload in the enp1s0 connection profile, enter:

    # nmcli con modify enp1s0 ethtool.feature-rx on ethtool.feature-tx off

    This command explicitly enables RX offload and disables TX offload.

  2. To remove the setting of an offload feature that you previously enabled or disabled, set the feature’s parameter to ignore. For example, to remove the configuration for TX offload, enter:

    # nmcli con modify enp1s0 ethtool.feature-tx ignore
  3. Reactivate the network profile:

    # nmcli connection up enp1s0

Verification

  • Use the ethtool -k command to display the current offload features of a network device:

    # ethtool -k network_device

34.3. Configuring an ethtool offload feature by using the network RHEL System Role

You can use the network RHEL System Role to configure ethtool features of a NetworkManager connection.

Important

When you run a play that uses the network RHEL System Role, the system role overrides an existing connection profile with the same name if the value of settings does not match the ones specified in the play. Therefore, always specify the whole configuration of the network connection profile in the play, even if, for example the IP configuration, already exists. Otherwise the role resets these values to their defaults.

Depending on whether it already exists, the procedure creates or updates the enp1s0 connection profile with the following settings:

  • A static IPv4 address - 198.51.100.20 with a /24 subnet mask
  • A static IPv6 address - 2001:db8:1::1 with a /64 subnet mask
  • An IPv4 default gateway - 198.51.100.254
  • An IPv6 default gateway - 2001:db8:1::fffe
  • An IPv4 DNS server - 198.51.100.200
  • An IPv6 DNS server - 2001:db8:1::ffbb
  • A DNS search domain - example.com
  • ethtool features:

    • Generic receive offload (GRO): disabled
    • Generic segmentation offload (GSO): enabled
    • TX stream control transmission protocol (SCTP) segmentation: disabled

Perform this procedure on the Ansible control node.

Prerequisites

  • You have prepared the control node and the managed nodes
  • You are logged in to the control node as a user who can run playbooks on the managed nodes.
  • The account you use to connect to the managed nodes has sudo permissions on them.
  • The managed nodes or groups of managed nodes on which you want to run this playbook are listed in the Ansible inventory file.

Procedure

  1. Create a playbook file, for example ~/configure-ethernet-device-with-ethtool-features.yml, with the following content:

    ---
    - name: Configure the network
      hosts: managed-node-01.example.com
      tasks:
      - name: Configure an Ethernet connection with ethtool features
        include_role:
          name: rhel-system-roles.network
    
        vars:
          network_connections:
            - name: enp1s0
              type: ethernet
              autoconnect: yes
              ip:
                address:
                  - 198.51.100.20/24
                  - 2001:db8:1::1/64
                gateway4: 198.51.100.254
                gateway6: 2001:db8:1::fffe
                dns:
                  - 198.51.100.200
                  - 2001:db8:1::ffbb
                dns_search:
                  - example.com
              ethtool:
                features:
                  gro: "no"
                  gso: "yes"
                  tx_sctp_segmentation: "no"
              state: up
  2. Run the playbook:

    # ansible-playbook ~/configure-ethernet-device-with-ethtool-features.yml

Additional resources

  • /usr/share/ansible/roles/rhel-system-roles.network/README.md file