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: improve ingress redirection performance with message corking #8541

Closed

Conversation

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

Pull request for series with
subject: tcp_bpf: improve ingress redirection performance with message corking
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=936737

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 63817c7
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=936737
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 201b62c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=936737
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

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

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 11ba7ce
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=936737
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 236d391
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=936737
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

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

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 4e4136c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=936737
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

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

@kernel-patches-daemon-bpf
Copy link
Author

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

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: ae0a457
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=941243
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: f4edc66
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=941243
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 6ca2162
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=941243
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: a259804
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=941243
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 79db658
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=941243
version: 2

Cong Wang and others added 2 commits March 20, 2025 10:39
The name sk_msg_alloc is misleading, that function does not allocate
sk_msg at all, it simply refills sock page frags. Rename it to
sk_msg_expand() to better reflect what it actually does.

Signed-off-by: Cong Wang <[email protected]>
Optimizing redirect ingress performance requires frequent allocation and
deallocation of sk_msg structures. Introduce a dedicated kmem_cache for
sk_msg to reduce memory allocation overhead and improve performance.

Reviewed-by: Cong Wang <[email protected]>
Signed-off-by: Zijian Zhang <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: e16e64f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=941243
version: 2

Cong Wang and others added 2 commits March 20, 2025 10:39
This patch aims to save some space in struct sk_psock and prepares for
the next patch which will add more fields.

psock->eval can only have 4 possible values, make it 8-bit is
sufficient.

psock->redir_ingress is just a boolean, using 1 bit is enough.

Signed-off-by: Cong Wang <[email protected]>
The TCP_BPF ingress redirection path currently lacks the message corking
mechanism found in standard TCP. This causes the sender to wake up the
receiver for every message, even when messages are small, resulting in
reduced throughput compared to regular TCP in certain scenarios.

This change introduces a kernel worker-based intermediate layer to provide
automatic message corking for TCP_BPF. While this adds a slight latency
overhead, it significantly improves overall throughput by reducing
unnecessary wake-ups and reducing the sock lock contention.

Reviewed-by: Amery Hung <[email protected]>
Co-developed-by: Cong Wang <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: Zijian Zhang <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=936737 irrelevant now. Closing PR.

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.

None yet

0 participants