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
sock_map: fix ->poll() and update selftests #1831
Conversation
Master branch: 1997152 |
Master branch: a3debf1 |
de4ab64
to
0eb4fc6
Compare
Master branch: 2248c2f |
0eb4fc6
to
45e6ded
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=552643 expired. Closing PR. |
Master branch: 2248c2f |
45e6ded
to
f9b4983
Compare
Master branch: ca3a86d |
f9b4983
to
fc81d5c
Compare
ca3a86d
to
79e2c30
Compare
Master branch: 79e2c30 |
fc81d5c
to
a9e0eb3
Compare
Master branch: ced1858 |
a9e0eb3
to
ed7e2cb
Compare
Master branch: 4ccb9f0 |
ed7e2cb
to
f8dc383
Compare
Master branch: 571fa24 |
f8dc383
to
9f17158
Compare
e992d80
to
d2ada69
Compare
Master branch: 732b74d |
d2ada69
to
7c58409
Compare
Master branch: 732b74d |
7c58409
to
675f655
Compare
Master branch: 6020e87 |
675f655
to
3c92e3a
Compare
Master branch: 28fd085 |
3c92e3a
to
fcf499a
Compare
Master branch: 1acfe7c |
fcf499a
to
a266973
Compare
Master branch: e8522c1 |
a266973
to
a236692
Compare
e8522c1
to
04f8ef5
Compare
The proto ops ->stream_memory_read() is currently only used by TCP to check whether psock queue is empty or not. We need to rename it before reusing it for non-TCP protocols, and adjust the exsiting users accordingly. Cc: John Fastabend <john.fastabend@gmail.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jakub Sitnicki <jakub@cloudflare.com> Cc: Lorenz Bauer <lmb@cloudflare.com> Signed-off-by: Cong Wang <cong.wang@bytedance.com>
tcp_bpf_sock_is_readable() is pretty much generic, we can extract it and reuse it for non-TCP sockets. Cc: John Fastabend <john.fastabend@gmail.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jakub Sitnicki <jakub@cloudflare.com> Cc: Lorenz Bauer <lmb@cloudflare.com> Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Yucong noticed we can't poll() sockets in sockmap even when they are the destination sockets of redirections. This is because we never poll any psock queues in ->poll(), except for TCP. With ->sock_is_readable() now we can overwrite >sock_is_readable(), invoke and implement it for both UDP and AF_UNIX sockets. Reported-by: Yucong Sun <sunyucong@gmail.com> Cc: John Fastabend <john.fastabend@gmail.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jakub Sitnicki <jakub@cloudflare.com> Cc: Lorenz Bauer <lmb@cloudflare.com> Signed-off-by: Cong Wang <cong.wang@bytedance.com>
We use non-blocking sockets in those tests, retrying for EAGAIN is ugly because there is no upper bound for the packet arrival time, at least in theory. After we fix poll() on sockmap sockets, now we can switch to select()+recv(). Cc: John Fastabend <john.fastabend@gmail.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jakub Sitnicki <jakub@cloudflare.com> Cc: Lorenz Bauer <lmb@cloudflare.com> Signed-off-by: Yucong Sun <sunyucong@gmail.com> Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Master branch: 04f8ef5 |
a236692
to
1a75560
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=560171 irrelevant now. Closing PR. |
Pull request for series with
subject: sock_map: fix ->poll() and update selftests
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=552643