Subject: Re: [PATCH net-next] net: netdevsim: Support setting dev->perm_addr

From: Toke Høiland-Jørgensen <[email-masked]>
Date: Tue, 04 Feb 2025 12:20:56 +0100

Jakub Kicinski <[email-masked]> writes:

> On Mon, 03 Feb 2025 18:21:24 +0100 Toke Høiland-Jørgensen wrote:
>> Network management daemons that match on the device permanent address
>> currently have no virtual interface types to test against.
>> NetworkManager, in particular, has carried an out of tree patch to set
>> the permanent address on netdevsim devices to use in its CI for this
>> purpose.
>> 
>> To support this use case, add a debugfs file for netdevsim to set the
>> permanent address to an arbitrary value.
>
> netdevsim is not for user space testing. We have gone down the path
> of supporting random features in it already, and then wasted time trying
> to maintain them thru various devlink related perturbations, just to
> find out that the features weren't actually used any more.
>
> NetworkManager can do the HW testing using virtme-ng.

Sorry if I'm being dense, but how would that work? What device type
would one create inside a virtme-ng environment that would have a
perm_addr set?

> If you want to go down the netdevsim path you must provide a meaningful 
> in-tree test, but let's be clear that we will 100% delete both the test
> and the netdevsim functionality if it causes any issues.

Can certainly add a test case, sure! Any preference for where to put it?
Somewhere in selftests/net, I guess, but where? rtnetlink.sh and
bpf_offload.py seem to be the only files currently doing anything with
netdevsim. I could add a case to the former?

-Toke