On Tue, Aug 29, 2023 at 7:42 PM Philip Prindeville
<philipp_s...@redfish-solutions.com> wrote:
>
> Hi,
>
> I was looking at a way to address 
> https://github.com/openwrt/openwrt/issues/13329 by leveraging hotplug instead 
> (per Gorki's suggestion).
>
> Then it wouldn't matter if the drivers were loaded at preinit time (marked as 
> "required to boot" in netdevices.mk) or not.
>
> But when I went to look into this, I noticed that "ifup" actions are 
> generated for interfaces, but not for the device creation itself.
>
> If I look for devices generating ADD events, I only see dummy, loopback, SQM, 
> XFRM, et. but not actual Ethernet NIC's.  And /sys/class/net/eth0 has a 
> uevent entry.
>
> Why are we not seeing hotplug events for actual network hardware?
>
> Any ideas what's required to have network interfaces generate ADD events?

To my knowledge, this comes from netifd in system-linux.c.
There are a bunch of netlink events handling.
RTM_NEWLINK should be investigated if it works.
If the kernel sends this message type, there should be a hotplug event
(unless some message parsing decides against it).

I've seen a case (many years back) that the linux ethernet driver (for
a Freescale eth driver) wasn't working properly, and there were no
netlink events.
Luckily, this was fixed by a kernel update.

I'm not sure if this can also be a case of netifd starting too late
(in the boot process) to be able to trigger hotplug events.
i.e. the interface is up, and then no events are set?

But, that (netifd/system-linux.c) is where I would start an
investigation to see if the hotplug events are working for network
devices/interfaces.

>
> Thanks,
>
> -Philip
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to