Skip to contentSkip to conversation

Fixes for "use bpf_iter in bpf schedulers" v8

PATCH Superseded Geliang Tang 3 participants 6 messages Oct 24, 2024

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Geliang Tang

author reviewer
#0 lore raw

cover Fixes for "use bpf_iter in bpf schedulers" v8

From: Geliang Tang <[email protected]>

Fix mptcp_join.sh (22) and packetdrill errors in "use bpf_iter in bpf schedulers" (v8) reported by CI.

Depends on:
- "use bpf_iter in bpf schedulers" v8

Based-on: <[email protected]>

Geliang Tang (2):
Squash to "mptcp: check sk_stream_memory_free in loop" Squash to "selftests/bpf: Add bpf_burst scheduler & test"

 net/mptcp/protocol.c                                | 5 +++--
 tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
Signature · 1 line
2.45.2
author reviewer
#1 lore raw

PATCH 1/2 Squash to "mptcp: check sk_stream_memory_free in loop"

From: Geliang Tang <[email protected]>

Fix mptcp_join.sh (22) and packetdrill errors reported by CI.

Move sk_stream_memory_free check before "send_info[backup].ssk = ssk".

---
 net/mptcp/protocol.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
net/mptcp/protocol.c +3 -2
index f36e63b84b88..2ae9b8012dcd 100644
@@ -1444,8 +1444,7 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)
 
 		trace_mptcp_subflow_get_send(subflow);
 		ssk =  mptcp_subflow_tcp_sock(subflow);
-		if (!mptcp_subflow_active(subflow) ||
-		    !sk_stream_memory_free(ssk))
+		if (!mptcp_subflow_active(subflow))
 			continue;
 
 		tout = max(tout, mptcp_timeout_from_subflow(subflow));
@@ -1461,6 +1460,8 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)
 
 		linger_time = div_u64((u64)READ_ONCE(ssk->sk_wmem_queued) << 32, pace);
 		if (linger_time < send_info[backup].linger_time) {
+			if (!sk_stream_memory_free(ssk))
+				continue;
 			send_info[backup].ssk = ssk;
 			send_info[backup].linger_time = linger_time;
 		}
Signature · 1 line
2.45.2
author reviewer
#2 lore raw

PATCH 2/2 Squash to "selftests/bpf: Add bpf_burst scheduler & test"

In reply to Geliang Tang

From: Geliang Tang <[email protected]>

Move sk_stream_memory_free check before "send_info[backup].subflow = subflow".

---
 tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c +3 -2
index 6242430d0330..f0c9f5984736 100644
@@ -87,8 +87,7 @@ static int bpf_burst_get_send(struct mptcp_sock *msk)
 		bool backup = subflow->backup || subflow->request_bkup;
 
 		ssk = mptcp_subflow_tcp_sock(subflow);
-		if (!mptcp_subflow_active(subflow) ||
-		    !sk_stream_memory_free(ssk))
+		if (!mptcp_subflow_active(subflow))
 			continue;
 
 		nr_active += !backup;
@@ -103,6 +102,8 @@ static int bpf_burst_get_send(struct mptcp_sock *msk)
 
 		linger_time = div_u64((__u64)ssk->sk_wmem_queued << 32, pace);
 		if (linger_time < send_info[backup].linger_time) {
+			if (!sk_stream_memory_free(ssk))
+				continue;
 			send_info[backup].subflow = subflow;
 			send_info[backup].linger_time = linger_time;
 		}
Signature · 1 line
2.45.2
#3 lore raw
In reply to Geliang Tang

Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Critical: 2 Call Trace(s) - Critical: Global Timeout ❌
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/11491898749

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/d6804cd6fae2
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=902508

If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

https://github.com/multipath-tcp/mptcp-upstream-virtme-docker

Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

author reviewer
#4 lore raw
Quoted 9 lines · MPTCP CI

Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Critical: 2 Call Trace(s) - Critical: Global Timeout ❌

This error seems to unrelated to this set. I have tested this set repeatedly, but there's no such error.

Thanks,
-Geliang

Quoted 39 lines

- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task:
https://github.com/multipath-tcp/mptcp_net-next/actions/runs/11491898749

Initiator: Patchew Applier
Commits:
https://github.com/multipath-tcp/mptcp_net-next/commits/d6804cd6fae2
Patchwork:
https://patchwork.kernel.org/project/mptcp/list/?series=902508

If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm
-it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker

Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

maintainer
#5 lore raw

Hi Geliang,

Quoted 5 lines · Geliang Tang
Quoted 4 lines · MPTCP CI

Hi Geliang,

Thank you for your modifications, that's great!

Quoted 8 lines
Quoted 5 lines

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Critical: 2 Call Trace(s) - Critical: Global Timeout ❌

This error seems to unrelated to this set. I have tested this set repeatedly, but there's no such error.

Indeed, it looks like it is not related.

I wonder if it is not related to an issue with the SWAP, maybe fixed by:

https://lore.kernel.org/all/[email protected]/

Instead of applying this patch in our tree, and hoping for the best, I just increased the RAM allocated to the VM used by the CI. It might be enough.

Cheers,
Matt

Signature · 1 line
Sponsored by the NGI0 Core fund.