mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops"
@ 2022-06-30 10:49 Geliang Tang
  2022-06-30 12:29 ` Squash to "bpf: Add bpf_mptcp_sched_ops": Tests Results MPTCP CI
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Geliang Tang @ 2022-06-30 10:49 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

Rename optional_ops to optional_sched_ops, rename is_optional() to
is_optional_sched(). We may add optional_pm_ops and is_optional_pm()
in bpf.c in the future for BPF path managers.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 net/mptcp/bpf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c
index e86dff4272d5..a450b0521ef6 100644
--- a/net/mptcp/bpf.c
+++ b/net/mptcp/bpf.c
@@ -21,7 +21,7 @@ extern struct btf *btf_vmlinux;
 static const struct btf_type *mptcp_sched_type __read_mostly;
 static u32 mptcp_sched_id;
 
-static u32 optional_ops[] = {
+static u32 optional_sched_ops[] = {
 	offsetof(struct mptcp_sched_ops, init),
 	offsetof(struct mptcp_sched_ops, release),
 };
@@ -92,12 +92,12 @@ static int bpf_mptcp_sched_check_member(const struct btf_type *t,
 	return 0;
 }
 
-static bool is_optional(u32 member_offset)
+static bool is_optional_sched(u32 member_offset)
 {
 	unsigned int i;
 
-	for (i = 0; i < ARRAY_SIZE(optional_ops); i++) {
-		if (member_offset == optional_ops[i])
+	for (i = 0; i < ARRAY_SIZE(optional_sched_ops); i++) {
+		if (member_offset == optional_sched_ops[i])
 			return true;
 	}
 
@@ -132,7 +132,7 @@ static int bpf_mptcp_sched_init_member(const struct btf_type *t,
 
 	/* Ensure bpf_prog is provided for compulsory func ptr */
 	prog_fd = (int)(*(unsigned long *)(udata + moff));
-	if (!prog_fd && !is_optional(moff))
+	if (!prog_fd && !is_optional_sched(moff))
 		return -EINVAL;
 
 	return 0;
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Squash to "bpf: Add bpf_mptcp_sched_ops": Tests Results
  2022-06-30 10:49 [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops" Geliang Tang
@ 2022-06-30 12:29 ` MPTCP CI
  2022-06-30 14:34 ` [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops" Mat Martineau
  2022-06-30 17:35 ` Matthieu Baerts
  2 siblings, 0 replies; 7+ messages in thread
From: MPTCP CI @ 2022-06-30 12:29 UTC (permalink / raw)
  To: Geliang Tang; +Cc: mptcp

Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal:
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/4559693640105984
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/4559693640105984/summary/summary.txt

- KVM Validation: debug:
  - Unstable: 1 failed test(s): selftest_mptcp_join 🔴:
  - Task: https://cirrus-ci.com/task/5685593546948608
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/5685593546948608/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/62923bf20fd4


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-debug

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 (Tessares)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops"
  2022-06-30 10:49 [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops" Geliang Tang
  2022-06-30 12:29 ` Squash to "bpf: Add bpf_mptcp_sched_ops": Tests Results MPTCP CI
@ 2022-06-30 14:34 ` Mat Martineau
  2022-06-30 17:35 ` Matthieu Baerts
  2 siblings, 0 replies; 7+ messages in thread
From: Mat Martineau @ 2022-06-30 14:34 UTC (permalink / raw)
  To: Geliang Tang; +Cc: mptcp

On Thu, 30 Jun 2022, Geliang Tang wrote:

> Rename optional_ops to optional_sched_ops, rename is_optional() to
> is_optional_sched(). We may add optional_pm_ops and is_optional_pm()
> in bpf.c in the future for BPF path managers.
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>

Fine to squash this, thanks Geliang.

- Mat

> ---
> net/mptcp/bpf.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c
> index e86dff4272d5..a450b0521ef6 100644
> --- a/net/mptcp/bpf.c
> +++ b/net/mptcp/bpf.c
> @@ -21,7 +21,7 @@ extern struct btf *btf_vmlinux;
> static const struct btf_type *mptcp_sched_type __read_mostly;
> static u32 mptcp_sched_id;
>
> -static u32 optional_ops[] = {
> +static u32 optional_sched_ops[] = {
> 	offsetof(struct mptcp_sched_ops, init),
> 	offsetof(struct mptcp_sched_ops, release),
> };
> @@ -92,12 +92,12 @@ static int bpf_mptcp_sched_check_member(const struct btf_type *t,
> 	return 0;
> }
>
> -static bool is_optional(u32 member_offset)
> +static bool is_optional_sched(u32 member_offset)
> {
> 	unsigned int i;
>
> -	for (i = 0; i < ARRAY_SIZE(optional_ops); i++) {
> -		if (member_offset == optional_ops[i])
> +	for (i = 0; i < ARRAY_SIZE(optional_sched_ops); i++) {
> +		if (member_offset == optional_sched_ops[i])
> 			return true;
> 	}
>
> @@ -132,7 +132,7 @@ static int bpf_mptcp_sched_init_member(const struct btf_type *t,
>
> 	/* Ensure bpf_prog is provided for compulsory func ptr */
> 	prog_fd = (int)(*(unsigned long *)(udata + moff));
> -	if (!prog_fd && !is_optional(moff))
> +	if (!prog_fd && !is_optional_sched(moff))
> 		return -EINVAL;
>
> 	return 0;
> -- 
> 2.35.3
>
>
>

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops"
  2022-06-30 10:49 [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops" Geliang Tang
  2022-06-30 12:29 ` Squash to "bpf: Add bpf_mptcp_sched_ops": Tests Results MPTCP CI
  2022-06-30 14:34 ` [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops" Mat Martineau
@ 2022-06-30 17:35 ` Matthieu Baerts
  2 siblings, 0 replies; 7+ messages in thread
From: Matthieu Baerts @ 2022-06-30 17:35 UTC (permalink / raw)
  To: Geliang Tang, mptcp

Hi Geliang, Mat,

On 30/06/2022 12:49, Geliang Tang wrote:
> Rename optional_ops to optional_sched_ops, rename is_optional() to
> is_optional_sched(). We may add optional_pm_ops and is_optional_pm()
> in bpf.c in the future for BPF path managers.

Thank you for the patch and the review!

Now in our tree:

- 546b86f8921c: "squashed" in "bpf: Add bpf_mptcp_sched_ops"
- Results: 083eb67a4d91..223590507ff9 (export)

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220630T173458
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops"
  2023-12-19 10:02 ` Geliang Tang
@ 2023-12-19 10:42   ` Matthieu Baerts
  0 siblings, 0 replies; 7+ messages in thread
From: Matthieu Baerts @ 2023-12-19 10:42 UTC (permalink / raw)
  To: Geliang Tang; +Cc: mptcp

Hi Geliang,

On 19/12/2023 11:02, Geliang Tang wrote:
> On Tue, 2023-12-19 at 10:27 +0100, Matthieu Baerts wrote:
>> This fixes a compilation issue that we have in our tree after having
>> synced with upstream. See the Fixes commit for more details.
>>
>> Fixes: 4cbb270e115b ("bpf: take into account BPF token when fetching
>> helper protos")
>> Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
>> ---
> 
> Thanks, Matt.
> 
> Reviewed-and-tested-by: Geliang Tang <geliang.tang@linux.dev>

Thank you for the quick review and test!

Now in our tree (in fact, I applied it just after having sent the patch,
not to block other tests):

New patches for t/upstream:
- 7180accd4086: Squash to "bpf: Add bpf_mptcp_sched_ops"
- Results: 518c786b5f89..0bd72c880c6d (export)

Tests are *not* in progress: I just disabled Cirrus builds as we already
reached the monthly limit:

- ac6e9cb8a375: cirrus: disable it for the moment

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops"
  2023-12-19  9:27 Matthieu Baerts
@ 2023-12-19 10:02 ` Geliang Tang
  2023-12-19 10:42   ` Matthieu Baerts
  0 siblings, 1 reply; 7+ messages in thread
From: Geliang Tang @ 2023-12-19 10:02 UTC (permalink / raw)
  To: Matthieu Baerts, mptcp

On Tue, 2023-12-19 at 10:27 +0100, Matthieu Baerts wrote:
> This fixes a compilation issue that we have in our tree after having
> synced with upstream. See the Fixes commit for more details.
> 
> Fixes: 4cbb270e115b ("bpf: take into account BPF token when fetching
> helper protos")
> Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
> ---

Thanks, Matt.

Reviewed-and-tested-by: Geliang Tang <geliang.tang@linux.dev>

> 
> Notes:
>     to be squashed in "bpf: Add bpf_mptcp_sched_ops"
> 
>  net/mptcp/bpf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c
> index 6b61dd54e69f..dfcaaf0e07dd 100644
> --- a/net/mptcp/bpf.c
> +++ b/net/mptcp/bpf.c
> @@ -35,7 +35,7 @@ bpf_mptcp_sched_get_func_proto(enum bpf_func_id
> func_id,
>         case BPF_FUNC_skc_to_tcp_sock:
>                 return &bpf_skc_to_tcp_sock_proto;
>         default:
> -               return bpf_base_func_proto(func_id);
> +               return bpf_base_func_proto(func_id, prog);
>         }
>  }
>  
> 
> base-commit: 5763f7d7b0e50d486c63e51c0495459f2eb93d2d


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops"
@ 2023-12-19  9:27 Matthieu Baerts
  2023-12-19 10:02 ` Geliang Tang
  0 siblings, 1 reply; 7+ messages in thread
From: Matthieu Baerts @ 2023-12-19  9:27 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang, Matthieu Baerts

This fixes a compilation issue that we have in our tree after having
synced with upstream. See the Fixes commit for more details.

Fixes: 4cbb270e115b ("bpf: take into account BPF token when fetching helper protos")
Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
---

Notes:
    to be squashed in "bpf: Add bpf_mptcp_sched_ops"

 net/mptcp/bpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c
index 6b61dd54e69f..dfcaaf0e07dd 100644
--- a/net/mptcp/bpf.c
+++ b/net/mptcp/bpf.c
@@ -35,7 +35,7 @@ bpf_mptcp_sched_get_func_proto(enum bpf_func_id func_id,
 	case BPF_FUNC_skc_to_tcp_sock:
 		return &bpf_skc_to_tcp_sock_proto;
 	default:
-		return bpf_base_func_proto(func_id);
+		return bpf_base_func_proto(func_id, prog);
 	}
 }
 

base-commit: 5763f7d7b0e50d486c63e51c0495459f2eb93d2d
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-19 10:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 10:49 [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops" Geliang Tang
2022-06-30 12:29 ` Squash to "bpf: Add bpf_mptcp_sched_ops": Tests Results MPTCP CI
2022-06-30 14:34 ` [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_ops" Mat Martineau
2022-06-30 17:35 ` Matthieu Baerts
2023-12-19  9:27 Matthieu Baerts
2023-12-19 10:02 ` Geliang Tang
2023-12-19 10:42   ` Matthieu Baerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).