Skip to content
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

net_local: fix error when work with epoll #8010

Merged
merged 1 commit into from Dec 30, 2022

Conversation

zhhyu7
Copy link
Contributor

@zhhyu7 zhhyu7 commented Dec 30, 2022

epoll_wait collects revent by checking fds->revent, but local_socket will copy fds to the other two private pollfd shandow struct, then the pipe_poll will not be able to update fds->revent directly, so need local_socket save fds and implement a private poll_notify function to passing revent to original fds->revent.

Signed-off-by: zhanghongyu zhanghongyu@xiaomi.com

Summary

Impact

Testing

net/local/local_netpoll.c Outdated Show resolved Hide resolved
net/local/local_netpoll.c Outdated Show resolved Hide resolved
net/local/local_netpoll.c Outdated Show resolved Hide resolved
epoll_wait collects revent by checking fds->revent,
but local_socket will copy fds to the other two private pollfd shandow struct,
then the pipe_poll will not be able to update fds->revent directly,
so need local_socket save fds and implement a private poll_notify function
to passing revent to original fds->revent.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit 43cc4bd into apache:master Dec 30, 2022
@zhhyu7 zhhyu7 deleted the upstream-1 branch February 9, 2023 13:26
@jerpelea jerpelea added this to To-Add in Release Notes - 12.1.0 Apr 3, 2023
@jerpelea jerpelea moved this from To-Add to Added in Release Notes - 12.1.0 Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants