Netifd claim failed

Hi,

I have a x86 platform using i210 and i225 intel device as NIC.
I am using OpenWRT 21.02.3.

I am facing issue when the board boot up.
The i225 (ethA) is not setup by netifd with static ip address as set in the /etc/config/network.
This is the netifd log, and claim device returns "failed" :

Fri Jun 10 13:45:14 2022 daemon.err netifd[7191]: device_set_present(771): Network device 'ethA' is now present
Fri Jun 10 13:45:14 2022 daemon.err netifd[7191]: interface_set_available(483): Interface 'lan_a', available=1
Fri Jun 10 13:45:14 2022 daemon.err netifd[7191]: device_claim(524): Claim Network device ethA, new active count: 1
Fri Jun 10 13:45:14 2022 daemon.err netifd[7191]: __device_add_user(849): Add user for device 'ethA', refcount=3
Fri Jun 10 13:45:14 2022 daemon.err netifd[7191]: device_claim(524): Claim Network device ethA, new active count: 2
Fri Jun 10 13:45:14 2022 daemon.err netifd[7191]: device_claim(544): claim Network device ethA failed: -1

Once the system is booted up, by restarting the /etc/init.d/network service, claim is OK and NIC interface ethA is correctly configured by netifd.

I set a 10 seconds sleep in /etc/init.d/network script as described below and the problem never happened :

 start_service() {
    init_switch

    sleep 10
...
}

I am suspecting that i225 module takes some time to load and so the device is not present at that time when netifd is started by /etc/init.d/network script service.

Has someone already got this kind of issue with netifd ?

Thanks in advance
Benoit

It is finally solved on my side.
I created a hotplug scripts to rename the ethernet NIC interface.
And the hotplug scripts happened after the network service that launches the netifd service.
So the ethA interface was not present when netifd was running.

In the hotplug script, I add the /etc/init.d/network reload once the interface is renamed and it works like a charm.

Thanks
Benoit

Yea, in the future, you should mention you renamed the interfaces.

Glad you figured it out.

Ok sounds good.
Sorry for this point.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.