Skip to content
LinkState
Go back

Offload intent vs capture reality after NIC upgrades

Introduction to NIC and Kernel Upgrades

A NIC or kernel upgrade typically follows these steps:

  1. Pre‑upgrade inventory – record NIC model, firmware, driver (ethtool -i <iface>), offload flags (ethtool -k <iface>), and kernel release (uname -r).
  2. Package update – install the new kernel and matching NIC driver (via package manager or source compile).
  3. Reboot – load the new kernel and driver modules.
  4. Post‑upgrade validation – repeat the inventory, compare to the baseline, and verify datapath behavior.

If any step is omitted, the intended offload configuration (set in /etc/network/interfaces, Netplan, or a CM tool) can diverge from the actual driver state exposed after the upgrade. This divergence appears in capture semantics—checksums, segmentation, and retransmission patterns—often making the same retransmission case look radically different before and after the maintenance window.

Verifying that intended and actual states match is the first line of defense against mysterious retransmission spikes, CPU regressions, or latency issues.


Understanding Intended Offload Settings

Offload Types

OffloadDirectionWhat it doesTypical tunables
TSO (TCP Segmentation Offload)TxKernel gives NIC a large TCP segment (≤64 KB); NIC splits into MSS‑sized frames, adds seq numbers, computes checksum.net.ipv4.tcp_tso_win_divisor, net.ipv4.tcp_tso_autosize
GSO (Generic Segmentation Offload)TxSoftware fallback for TSO when NIC lacks hardware support; still produces large SKBs for later hardware segmentation.Same as TSO
GRO (Generic Receive Offload)RxDriver coalesces incoming packets into a larger SKB before passing up the stack.`ethtool -K gro on
LRO (Large Receive Offload)RxNIC‑specific; merges consecutive TCP packets into one larger packet before handing to stack.`ethtool -K lro on
TXCSUM / RXCSUMTx/RxNIC calculates IPv4/TCP/UDP checksums on Tx; on Rx, NIC verifies and optionally strips checksum.`ethtool -K txcsum on
SCATTER‑GATHER (SG)Tx/RxAllows NIC to use fragmented buffers (multiple pages) for a single packet, reducing copy overhead.Usually always on; can be disabled via `ethtool -K sg on
TXVLAN / RXVLANTx/RxNIC inserts/extracts VLAN tags.`ethtool -K txvlan on
Ntuple filteringRxDirects packets to specific queues based on flow hash.ethtool -N <iface> flow-type tcp4 …
RSS / RPS / XPSRx/TxSpreads receive queues across CPUs (RSS in NIC, RPS in kernel, XPS for transmit)./sys/class/net/<iface>/queues/rx-*/rps_cpus, etc.

Configuring for Optimal Performance

For 10 GbE+ NICs a performance‑oriented baseline typically enables:

These settings are persisted via:

Tools for Verifying Intended Settings

ToolWhat it showsTypical usage
ethtool -k <iface>List of offload features and current on/off state.Baseline before upgrade.
ethtool -i <iface>Driver name, version, firmware version, bus info.Verify driver/firmware match.
ethtool -S <iface>NIC‑specific statistics (tx/tso_bytes, rx/gro_flush, etc.).Correlate offload usage with counters.
`sysctl -a | grep -E ‘tsogrolro
ip link show <iface>Current MTU, qdisc, and offload flags (<NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> plus txqueuelen).Quick sanity check.
/sys/class/net/<iface>/device/Direct access to PCI config, firmware version, driver‑specific attributes.Low‑level verification.

A simple validation script:

#!/usr/bin/env bash
IFACE=eth0
BASELINE=$(ethtool -k "$IFACE")
POST=$(ethtool -k "$IFACE")
diff -u <(echo "$BASELINE") <(echo "$POST") && \
    echo "Offload state unchanged" || \
    echo "Offload drift detected!"

If drift appears, re‑apply the intended settings or investigate why the driver/kernel altered them.


Actual Driver State After Upgrade

Verifying Driver Version and Compatibility

After a kernel upgrade the NIC driver may be:

Check the driver:

ethtool -i eth0
# Example output:
# driver: i40e
# version: 2.9.21
# firmware-version: 6.0 0x80000c21 1.1326.0
# bus-info: 0000:3b:00.0
# supports-statistics: yes
# supports-test: yes
# supports-eeprom-access: yes
# supports-register-dump: yes
# supports-priv-flags: yes

If the driver is out‑of‑tree, verify it loaded cleanly:

dmesg | grep -i eth0   # look for “version magic” mismatches
cat /proc/sys/kernel/modules_disabled   # 0 = modules allowed; 1 = disabled (secure boot)

Checking Driver Configuration and Settings

Even when the driver loads, its default offload mask may differ from the previous version. Many drivers expose module parameters to set defaults:

systool -v -m i40e | grep -A2 Parameters
# or
modinfo i40e | grep parm

If the driver does not expose offload defaults, the initial state after probe is determined by:

To see what the driver actually programmed into the NIC after probe:

# Capture pre‑load state (if possible via initramfs shell)
ethtool -k eth0 > /tmp/pre.txt
# After boot:
ethtool -k eth0 > /tmp/post.txt
diff -u /tmp/pre.txt /tmp/post.txt

A non‑empty diff indicates the driver (or an early‑boot script) altered offloads.

Troubleshooting Driver‑Related Issues After Upgrade

SymptomLikely causeDiagnostic command
All offloads disabled after upgradeDriver reset to safe defaults; missing firmware; module param overriding.`dmesg
TX checksum offload missing but RX presentAsymmetric offload support in newer driver; NIC feature bits changed.ethtool -k eth0 | grep txcsum; compare ethtool -i eth0 bus‑info to vendor datasheet.
Increased interrupt rate, CPU spikesGRO/LRO disabled inadvertently; Rx queue starved.cat /proc/interrupts | grep eth0; ethtool -S eth0 | grep rx_packets vs rx_gro_flush.
Packet loss under burstTSO disabled causing many small packets; NIC tx ring too small.ethtool -g eth0 (show ring sizes); increase with ethtool -G eth0 tx 4096.
Link flaps after upgradeFirmware incompatibility; driver not handling new PHY registers.ethtool eth0; `dmesg

Address mismatches by re‑applying the intended offload settings (ethtool -K …), updating firmware, or reinstalling the driver against the correct kernel headers.


Bottom line: After any NIC or kernel upgrade, compare the intended offload configuration (what you configured) with the actual driver state (what ethtool -k reports) and validate capture semantics. This practice prevents offload‑drift‑induced retransmission mysteries and ensures predictable performance.


Share this post on:

Previous Post
BQL and TSQ under east-west RPC floods
Next Post
Model explanations do not prove generated intent