[PATCH] eloop: Remove epoll and kqueue implementations
Nicolas Escande
nico.escande at gmail.com
Thu Oct 3 06:59:51 PDT 2024
Hello Benjamin,
On Thu Sep 26, 2024 at 5:34 PM CEST, Benjamin Berg wrote:
> From: Benjamin Berg <benjamin.berg at intel.com>
>
> Both of these implementations are broken by design currently and will
> not work correctly with any socket that needs to be registered for
> multiple event types (reading, writing, exception).
>
> The reason for this is that the eloop_register_sock API can only take
> one event at a time resulting in multiple entries for the FD. However,
> epoll_ctl() will refuse to register the FD a second time and kqueue()
> will happily overwrite the earlier information. As such, neither
> implementation is working correctly.
I never even realized that sometimes hostapd registers a socket for writing.
> Simply remove both, I doubt anyone ever tried to use them as at least
> DBus is broken. Also, I don't expect that hostapd/wpa_supplicant has a
> lot of FDs/sockets making this a micro-optimization which is likely
> pointless in the first place.
>
Actually, in our product we heavily use the epoll implementation, but with a
very light config / feature set (no dbus or dpp...) so we never encountered a
problem of that nature.
Instead of removing the code, we could $(error ) or # error for incompatible
configs ? But it seems hard to maintain in the long run when we add new stuff.
Either way, I don't really care as long as the poll implementationworks, we'll
switch to it if need be.
More information about the Hostap
mailing list