[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cd37574b-0c15-481d-84dd-8ccc830efd06@redhat.com>
Date: Thu, 11 Sep 2025 17:41:24 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Hangbin Liu <liuhangbin@...il.com>, Sabrina Dubroca <sd@...asysnail.net>
Cc: netdev@...r.kernel.org, Jay Vosburgh <jv@...sburgh.net>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Jiri Pirko <jiri@...nulli.us>,
Simon Horman <horms@...nel.org>, Ido Schimmel <idosch@...dia.com>,
Shuah Khan <shuah@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
Stanislav Fomichev <stfomichev@...il.com>,
Kuniyuki Iwashima <kuniyu@...gle.com>,
Alexander Lobakin <aleksander.lobakin@...el.com>, bridge@...ts.linux.dev,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCHv3 net-next 5/5] selftests/net: add offload checking test
for virtual interface
On 9/11/25 8:54 AM, Hangbin Liu wrote:
> 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?
Uhm... one possible way of testing netdev_compute_features_from_lowers()
correctness is transmitting over the relevant device (bridge/team/bond)
"arbitrary" GSO packets and verify that the packet is segmented (or not)
before reaching the lower.
GSO packet injection can be done with some work via the tun device (in
tap mode), and the virtio hdr.
That is limited to some GSO types (i.e. no ipsec pkts), and can become
easily very complex.
What about giving it a shot for UDP tunnel GSO types?
Thanks,
Paolo
Powered by blists - more mailing lists