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

tcp_bpf: update the rmem scheduling for ingress redirection #7904

Open
wants to merge 2 commits into
base: bpf_base
Choose a base branch
from

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: tcp_bpf: update the rmem scheduling for ingress redirection
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=900001

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 2aa587f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=900001
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 19039f2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=900001
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 98cd619
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=900001
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: db123e4
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=900001
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 5ac9b4e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=900001
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 5ac9b4e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=900001
version: 1

Cong Wang and others added 2 commits October 18, 2024 11:13
When bpf_tcp_ingress() is called, the skmsg is being redirected to the
ingress of the destination socket. Therefore, we should charge its
receive socket buffer, instead of sending socket buffer.

Because sk_rmem_schedule() tests pfmemalloc of skb, we need to
introduce a wrapper and call it for skmsg.

Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Although we sk_rmem_schedule and add sk_msg to the ingress_msg of sk_redir
in bpf_tcp_ingress, we do not update sk_rmem_alloc. As a result, except
for the global memory limit, the rmem of sk_redir is nearly unlimited.

Thus, add sk_rmem_alloc related logic to limit the recv buffer.

Signed-off-by: Zijian Zhang <zijianzhang@bytedance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants