On Wed, Sep 10, 2025 at 04:57:54PM +0200, Sabrina Dubroca wrote:
2025-09-09, 08:18:52 +0000, Hangbin Liu wrote:
+__check_offload() +{
- local dev=$1
- local opt=$2
- local expect=$3
- ip netns exec "$ns" ethtool --json -k "$dev" | \
jq -r -e ".[].\"$opt\".active == ${expect}" >/dev/null
Sorry Hangbin, I should have noticed this when we discussed the IPsec test, since the problem is similar for the other features set in netdev_compute_features_from_lowers:
`ethtool -k` does not test the dev->*_features (mpls, vlan, etc) set in the new common function, it only checks dev->features and dev->hw_features. So this will not test the new function.
Hmm, that make the selftest more complex. A very easy way to verify whether the feature is set is using tracepoint. But Paolo said adding new tracepoint is not welcomed.
Since all these flags are fixed after compute from lower devices. We need to find out a proper device and test the features are inherited.
The next question is how to test gso_partial_features, vlan_features, hw_enc_features, mpls_features (maybe also tso_max_segs/size in future) effectively.
The veth device only has hw_enc_features and mpls_features, while it's hw_enc_features doesn't have NETIF_F_HW_ESP. The netdevsim device only have hw_enc_features.
For mpls_features, seem we only able to test NETIF_F_GSO_SOFTWARE, but I'm not sure how to check mpls gso..
For hw_enc_features NETIF_F_HW_ESP. Does sending ipsec data and see if netdevsim has pkts count enough??
Any advices? Should we just drop the selftest?
Thanks Hangbin