New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EVFILT_USER is not available on NetBSD #1232
Comments
I suspect you may not be able to use the kqueue() infrastructure -- and may have to resort to the poll() framework. The issue is that we rely on the EVFILT_USER to wake up kqueue when changing the list of descriptors to wake up, and to serialize access to the kqueue handling thread. (For example, closing the descriptor will prevent new callbacks form occurring, but we have no way to serialize against callbacks which may be running on that thread.) We could design a workaround for this. But I'm not sure how much I want to invest in that. Honestly NetBSD should probably just implement EVFILT_USER at this point. I may conditionalize the support for kqueue on having EVFILT_USER just to permit things to go forward. |
I've got a PR that basically prevents the use of kqueue unless you have EVFILT_USER. Without a working EVFILT_USER we would have to use cross signaling (e.g. via socketpair descriptors) which is going to impair scalability anyway. So you'll have a functional library, but you won't be as performant or scalable as FreeBSD on either NetBSD or OpenBSD. Someone in those projects should look at lifting the code from FreeBSD to implement EVFILT_USER. It can bring real significant wins in performance and scalability. |
If someone who is using NetBSD or OpenBSD wanted to contribute a working socketpair() based replacement (perhaps borrowing the logic from the poll() implementation) I would be open to that. I don't have the time to do this myself, nor the inclination, nor the platform(s) to test and validate such changes myself. |
NetBSD's kqueue does not support
EVFILT_USER
and so NNG does not currently build on that platform.As a quick hack I was able to
#ifdef
around the locations whereEVFILT_USER
is used and the project was able to build. So the lack ofEVFILT_USER
appears to be the only build issue currently.NNG & Platform details.
nng v1.3.0
NetBSD 9.0 amd64
Expected Behavior
NNG builds on NetBSD
Actual Behavior
Steps to Reproduce
Build on NetBSD 9.0.
The text was updated successfully, but these errors were encountered: