Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32 lines
665 B
Bash
32 lines
665 B
Bash
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
source ethtool-common.sh
|
|
|
|
NSIM_NETDEV=$(make_netdev)
|
|
|
|
set -o pipefail
|
|
|
|
FEATS="
|
|
tx-checksum-ip-generic
|
|
tx-scatter-gather
|
|
tx-tcp-segmentation
|
|
generic-segmentation-offload
|
|
generic-receive-offload"
|
|
|
|
for feat in $FEATS ; do
|
|
s=$(ethtool --json -k $NSIM_NETDEV | jq ".[].\"$feat\".active" 2>/dev/null)
|
|
check $? "$s" true
|
|
|
|
s=$(ethtool --json -k $NSIM_NETDEV | jq ".[].\"$feat\".fixed" 2>/dev/null)
|
|
check $? "$s" false
|
|
done
|
|
|
|
if [ $num_errors -eq 0 ]; then
|
|
echo "PASSED all $((num_passes)) checks"
|
|
exit 0
|
|
else
|
|
echo "FAILED $num_errors/$((num_errors+num_passes)) checks"
|
|
exit 1
|
|
fi
|